In: Computer Science
DATABASE MANAGEMENT SYSTEMS
After looking at the material in Section 2, go ahead and answer the following questions:
(Make sure you understand the difference between the two)
We want to track historical data of Soccer players. We want to track current data for clubs, Coaches and Soccer Balls.
A soccer player can only play for one club but over time a player would have played for one or many clubs. A club has many players.
Some players are Captains and supervise other players.
A club can have one or many Coaches, a Coach can only coach one team.
A Team has one or many soccer balls, a Soccer ball can only belong to one team. (10 Points)
Players |
Teams |
Coaches |
Soccer Balls |
To be defined |
Player ID |
Team ID |
Coach ID |
Serial Number |
….. |
First Name |
Team Name |
C_FirstName |
Maker |
….. |
Last Name |
City |
C_LastName |
Color |
….. |
Address1 |
Phone |
|||
City |
||||
State |
||||
Zip Code |
||||
Country of Origin |
1. What is a foreign key?
Answer: - Foreign key is an attribute. Which establish relationship between any two (2) tables.
So, a foreign key is a field (or) collection of fields in one table that referes to the primary key in another table.
2. What is Composite attribute? Give an example
Answer: - Composite attribute means which can be divided into smaller sub parts.
Example: -
Explanation: -
So this is Composite Attribute. So the "Name" is call it as a composite attribute.
3. What is a multivalued attribute?Give an example
Answer: - Multivalue means multiple values can be derived. It may contains more than one value.
Example:- A person can have more then one phone number.
A person can have more then one E-mail address.
4. What is a relationship Modality? What is a relationship Cardinality?
Answer: -
relationship Modality:- Modality indicates the minumum number of times an instance in one entity can be associated with an instance in the related entity.
relationship Cardinality: - Cardinality indicates the maximum number of times an instance in one entity can be associated with instances in the related entity.
Simple explanation:- "Card" which means "number". it "shows how both the entities are connected with each other".
There are three(3) types:
1. one to one
2. one to many
3. many to many