Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.[1.5] ii. Find the details of players whose first names start with S. [1] iii. Find the number of players in each team. [1] iv. Change the gameName of the game with id = 5 to Ping Pong. [1] v. Display the name of the country having the highest number of teams.[1.5] vi. List the details of games played by teams from Oman. [1.5] 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. [2.5]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions