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.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here