PrimeVideo is a startup company providing concierge DVD kiosk service in upscale neighborhoods. PrimeVideo 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 an M:N relationship between RENTAL and VIDEO. DETAILRENTAL is the bridge table to resolve this relationship. The complete ERD is provided in the figure. Write the SQL code to create the table structures for the entities shown in the figure. The structures should contain the attributes specified in the ERD. Use data types (and lengths, if applicable) that are appropriate for the data that will need to be stored in each attribute. Enforce primary key and foreign key constraints as indicated by the ERD. Make sure there are no errors when the script is executed. If it does, you will automatically get a zero for this item.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

PrimeVideo is a startup company providing concierge DVD kiosk service in upscale neighborhoods. PrimeVideo 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 an M:N relationship between RENTAL and VIDEO. DETAILRENTAL is the bridge table to resolve this relationship. The complete ERD is provided in the figure.



Write the SQL code to create the table structures for the entities shown in the figure. The structures should contain the attributes specified in the ERD. Use data types (and lengths, if applicable) that are appropriate for the data that will need to be stored in each attribute. Enforce primary key and foreign key constraints as indicated by the ERD. Make sure there are no errors when the script is executed. If it does, you will automatically get a zero for this item.


DETAILRENTAL
MEMBERSHP
PKFKI RENT NUM
PKFK2 VID NUM
RENTAL
PK MEM NUM
PK RENT NUM
H--O
MEM FNAME
MEM LNAME
MEM STREET
MEM CITY
MEM STATE
MEM ZIP
MEM_BALANCE
DETAIL FEE
DETAL DUEDATE
DETAL RETURNDATE
DETAIL DAILYLATEFEE
RENT DATE
FK1 MEM NUM
MOVIE
VIDEO
PK MOVIE NUM
PK
H-O
VID NUM
PRICE
MOVIE_TITLE
MOVIE YEAR
MOVIE COST
MOVIE GENRE
FK1 PRICE CODE
VID INDATE
FK1 MOVIE NUM
PK PRICE CODE
to--o
PRICE DESCRIPTION
PRICE RENTFEE
PRICE DAILYLATEFEE
Transcribed Image Text:DETAILRENTAL MEMBERSHP PKFKI RENT NUM PKFK2 VID NUM RENTAL PK MEM NUM PK RENT NUM H--O MEM FNAME MEM LNAME MEM STREET MEM CITY MEM STATE MEM ZIP MEM_BALANCE DETAIL FEE DETAL DUEDATE DETAL RETURNDATE DETAIL DAILYLATEFEE RENT DATE FK1 MEM NUM MOVIE VIDEO PK MOVIE NUM PK H-O VID NUM PRICE MOVIE_TITLE MOVIE YEAR MOVIE COST MOVIE GENRE FK1 PRICE CODE VID INDATE FK1 MOVIE NUM PK PRICE CODE to--o PRICE DESCRIPTION PRICE RENTFEE PRICE DAILYLATEFEE
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Knowledge Booster
Types of Database Architectures
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education