Question
1. Write the correct SQL statements to create the appropriate tables with all of the correct attributes, data types, and keys. All foreign key (except
1. Write the correct SQL statements to create the appropriate tables with all of the correct attributes, data types, and keys. All foreign key (except HomeTeam and GuestTeam) values must be set to NULL if a referenced record is deleted. (For HomeTeam and GuestTeam foreign keys, you will need to set it to ON DELETE NO ACTION) 2. Write the correct SQL statements to enter 5 real NBA teams with the correct attribute data, 5 real NBA games with the correct attribute data, 5 real NBA players with the correct attribute data, 5 real injuries associated with playing basketball, and 5 fictional player injuries in the InjuryDetail table. 3. Write the correct SQL statements to update 2 players weight for the new season 4. Write the correct SQL statements to delete 2 injury records from the database. 5. Add DROP TABLE statements to the beginning of your text document that correctly drop all tables.
You are an IS employee for the NBA. You have been asked to create a database based on a design created by the web development team. Use the following ERD to create the database. Team Game PK TeamID PK GameID TeamName GameDate City Can have FK HostTeam Coach FK Guest Team Mascot HostTeamScore Can have Guest Team Score Player PK PlayerID InjuryDetail First Name PK InjuryDetailid Last Name O FK PlayerID Can have # Height FK Injuryl D Weight ReturnDate Position Can have Salary FK TeamlD Injury PK Injuryl D InjuryNameStep 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