Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started