Question: Please answer questions 4&5 asap! Consider the following relational model for a basketball league: Player (PlayerID, PName, Position, TeamID) Team (TeamID, TName, Venue) Game (GameNo,

 Please answer questions 4&5 asap! Consider the following relational model for

Please answer questions 4&5 asap!

Consider the following relational model for a basketball league: Player (PlayerID, PName, Position, TeamID) Team (TeamID, TName, Venue) Game (GameNo, Date, Time, Home TeamID, Away TeamID) Record (GameNo, PlayerID, Points) In this basketball league, each team has a unique name and each player plays for only one team. One team has at least 10 players. Two teams (home team versus away team) participate in each game at home team's venue. A team meets each of other teams twice (i.e., double round-robin tournament), one time as home team and the other time as away team. For each game, the league records the number of points scored by each player. If a player played for a game but did not score any point, there is a record for the player with zero point. If a player did not play for a game, there is no record for this player for that game (i.e., no record in the Record relation). Please answer all the following questions based on the provided relational model and information for the basketball league. Question 4. Write a SQL to retrieve the TeamID, TeamName and the number of players for each team. [20 marks] Question 5. Write a SQL to retrieve the PlayerID and PName of players who played for their team in two or more games. [20 marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!