Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please type answer EliteVideo is a startup company providing concierge DVD kiosk

ID: 3758533 • Letter: P

Question

Please type answer

EliteVideo is a startup company providing concierge DVD kiosk service in upscale neighborhoods. EliteVideo can own several copies (VIDEO) of each movie (MOVIE). For example, a kiosk may have 10 copies of the movie Twist in the Wind.In the database, Twist in the Wind would be one MOVIE, and each copy would be a VIDEO. A rental transaction (RENTAL) involves one or more videos being rented to a member (MEMBERSHIP). A video can be rented many times over its lifetime; therefore, there is a M:N relationship between RENTAL and VIDEO. DETAILRENTAL is the bridge table to resolve this relationship. The complete ERD is provided in Figure P7.65.

Write the SQL code to create the table structures for the entities shown in Figure P7.65. The structures should contain the attributes specified in the ERD. Use data types that are appropriate for the data that will need to be stored in each attribute. Enfore primary key and foreign key constraints as indicated by the ERD.

Explanation / Answer

SQL code to create the table structures for entities:

MEMBERSHIP
Mem_
Num Mem_
Fname Mem_
Lname Mem_Street Mem_City Mem_
State Mem_Zip Mem_
Balance

RENTAL
Rent_Num Rent_Date Mem_Num

DETAILRENTAL
Rent_Num Vid_Num Detail_Fee Detail_Duedate Detail_Returndate Detail_Dailylatefee

VIDEO
Vid_Num Vid_Indate Movie_Num

MOVIE
Movie_Num Movie_Name Movie_Year Movie_Cost Movie_Genre Price_Code

PRICE
Price_Code Price_Description Price_Rentfee Price_DailylatefeeMEMBERSHIP
Mem_
Num Mem_
Fname Mem_
Lname Mem_Street Mem_City Mem_
State Mem_Zip Mem_
Balance

RENTAL
Rent_Num Rent_Date Mem_Num

DETAILRENTAL
Rent_Num Vid_Num Detail_Fee Detail_Duedate Detail_Returndate Detail_Dailylatefee

VIDEO
Vid_Num Vid_Indate Movie_Num

MOVIE
Movie_Num Movie_Name Movie_Year Movie_Cost Movie_Genre Price_Code

PRICE
Price_Code Price_Description Price_Rentfee Price_Dailylatefee