Question: Given the following relational schema where primary keys are underlined and foreign keys are marked with #: COUNTRY(countryID, countryName, countryDialingCode) TEAM(teamID, teamName, countryId) PLAYER(playerID, playerFname,

Given the following relational schema where primary keys are underlined and foreign keys are marked with #: COUNTRY(countryID, countryName, countryDialingCode) TEAM(teamID, teamName, countryId) PLAYER(playerID, playerFname, playerLname, playerDoB, #teamID) Game(gameID, gameName, gameLevel, year) a) Express the following queries in SQL: i. Add the column gameID of type Integer as a foreign key in table TEAM. ii. Find the details of players whose first names start with S. iii. Find the number of players in each team. iv. Change the gameName of the game with id = 5 to Ping Pong. v. Display the name of the country having the highest number of teams. vi. List the details of games played by teams from Oman. b) Create view lessThan20 that contains player last name, player ID, player country ID, game name of players who are less than 20 years old.

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!