Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that you are given the following relational schemas for the basketball team Player (ID: integer, Name: varchar (64), Birthday: date, Address: varchar (128), Email:

Assume that you are given the following relational schemas for the basketball team

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))

ManagerCertificate (ManagerID: integer, CertificateId: integer, Certificate: blob) - Foreign key:

ManagerID references Manager (ID)

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

TakeExam (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)

Write a relational Algebra query for each of the following:

1.) Show the names, IDs and emails of all players whose play position is Middle.

2.) Show the total points that player Lobo Louie has scored each year (assume there is only one Lobo

Louie).

3.) Show the names of every player who has played a game at PanAm and lost (Result = lose).

4.) Find the average points scored by all players.

5.) Find the maximum points scored in each year.

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

More Books

Students also viewed these Databases questions

Question

13. You always should try to make a good first impression.

Answered: 1 week ago