Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm not sure about my answers for the following questions. I have included my answers as picture attachments except for 10 which I have not

I'm not sure about my answers for the following questions. I have included my answers as picture attachments except for 10 which I have not been able to solve. Could you let me know if I'm doing it right?

2. Find all the players whose total points are greater than 10. Show all the attributes of these players.

image text in transcribed

5. Find the total number of TimePeriodInHour of trainning that this player has trained .

image text in transcribed

6. Find the players who failed an e.x.a.m (i.e. note that the TestResult was changed to a boolean. NowTestResult=Fail). Show all of their information.

image text in transcribed

8.Find all the player IDs who were assigned a training that needs more than 40 hours and have not played a game yet.

image text in transcribed

9. Find all the player IDs who were assigned a training that needs more than 40 hours and have not played a game yet

image text in transcribed

10. Show player IDs who have the highest total Trainingtime

----------SCHEMA---------------

Player (ID: integer, Name: varchar(64), Birthday: date, Address: varchar(128), Email: varchar(32), PhoneNumber: char(10), PlayPos: varchar(16))

Manager (ID: integer, LoginID: varchar(16), Name: varchar(64), Password: varchar(8), Birthday: date, Address: varchar(128), Email: varchar(32), PhoneNumber: char(10))

Staff (ID: integer, Name: varchar(64), Birthday: date, Address: varchar(128), Email: varchar(32), PhoneNumber: char(10), Title: varchar(16))

ManagerCertificate (ManagerID: integer, CertificateId: int, Certificate: blob)

- Foreign key: ManagerID references Manager(ID)

Doctor (Email: varchar(32), Name: varchar(64), PhoneNumber: char(10))

TakeE.x.a.m (PlayerID: integer, DocEmail: varchar(32), TestDate: date, TestResult: varchar(256))

- Foreign key: PlayerID references Player(ID)

- Foreign key: DocEmail references Doctor(Email)

Stats (PlayerID: integer, Year: char(4), TotalPoints: integer, ASPG: integer)

- Foreign key: PlayerID references Player(ID)

Training (TrainingName: varchar(256), Instruction: varchar(256), TimePeriodInHour: integer)

AssignTraining (PlayerID: integer, ManagerID: integer, TrainingName: varchar(256))

- Foreign key: PlayerID references Player(ID)

- Foreign key: ManagerID references Manager(ID)

- Foreign key: TrainingName references Training(TrainingName)

Game (GameID: integer, Date: date, Result: varchar(16), PlayingVenue: varchar(256), OpponentTeam: varchar(32))

Play (PlayerID: integer, GameID: integer)

- Foreign key: PlayerID references Player(ID)

- Foreign key: GameID references Game(GameID)

Player.ID-Stats.PlayerIDAStats.TotalPoints>10(Player Stats) Player.ID-Stats.PlayerIDAStats.TotalPoints>10(Player Stats)

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_2

Step: 3

blur-text-image_3

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

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

Q.No.1 Explain Large scale map ? Q.No.2 Explain small scale map ?

Answered: 1 week ago

Question

1. Signs and symbols of the map Briefly by box ?

Answered: 1 week ago

Question

Types of physical Maps?

Answered: 1 week ago