Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a script, one step at a time, to generate the DB schema of the movie rental database. Test the partial results by inspecting the
Write a script, one step at a time, to generate the DB schema of the movie rental database. Test the partial
results by inspecting the tables in SQLDeveloper. Do not proceed to the next step until you have the previous one
working correctly.
Part I Define the MOVIE rental database.
a Use the following database schema to create a script that generates and populates the movie rental
database. You must write the script to create the tables for this schema.
b Requirements
The movie IDs should be a char string with the format USAHR
Where:
Characters : represent the country of the producer: eg USA, BRA, CAN, IND, ENG, JAP
Characters : represent the year of the movie: eg
Characters : represent an identifier of the movie genre: eg HR for Horror, CM for Comedy
Characters digit sequence
when characters from are the same as a previous entry, the sequence increments by one.
For example, if the mId USAHR already exists, the next movie to be input with the
country: USA, year: and genre: HR should have the mId USAHR
You DONT have to generate these mIds automatically, but the data you input manually must
comply with this requirement.
Customer and director IDs are represented by a digit code as well as producerID
Please choose a proper max length for first names, last names, and movie titles. Check this movie title as
a reference to pick your max length.
dob represents the date of birth of the customer or director, rented indicates the date a movie was
rented and returndate indicates when the movie is returned. If the movie has not been returned, the
value of returndate is unknown hint: the value should be null
duration is a fixed character string with the format HH: MM eg::
Any date field in the schema should be stored as a date object, not just as character strings.
The genreid and year digit integer of the movie must be consistent with the corresponding mId
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