Assume that you have a Saudi football league player database. In this database, you have a table containing players’ attributes such as (Name, age, position, etc.) and you decided to add information about players’ agents. Would you represent the agent information as attributes in the player table or would you create an entity set for players’ agents? Justify your answer.
considering the following table for Player's of Saudi football league player database
Players (Name, age, position)
This table does not represent any information related to player's agent.
Here two options are available to retrieve such information:
1. Add attribute in player table that gives information about player's agent like this-
Players (Name, age, position, agentName)
It is possible to get data about player and agent name by using only one table. But it is possible that such a table will become complex and every time any information about player's agent is required, player table will be referenced via playerName. Moreover it is possible that one player will have only one agent. so it becomes impossible to retrieve data about multiple agents.
2. Create a separate table player_agent and add foreign keys
PlayerAgent( agentID, agentName, agent Address,playerName)
Using this separate table, it is easy to maintain all information about the agent in the player database.
This separate table can have playerName as a foreign key referring player table.
So it is more feasible to have a separate table to store player's agent data. One agent can handle multiple players so this single table can be used to refer the players information who are handled by a particular agent.
Get Answers For Free
Most questions answered within 1 hours.