Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need to know how to write the sequences for my final database project. Instructions: In this project you are going to create tables and

I need to know how to write the sequences for my final database project.

Instructions:

In this project you are going to create tables and constraints based on an entity relationship diagram. This project will reinforce the learning objectives from Modules 1 - 3. You will use the tables created in the mid term project as part of the final project where you will create a functional database that is appropriate for a small business. You will use the SQL Workshop - SQL Scripts page to create a single script file to complete the assignment.

Save your script to a file named LastName_FirstName_Final.sql (where LastName is your last name and FirstName is your first name). Once you create the script in APEX, you will have the ability to save it and download for submission. Your script should be well-formatted and should contain comments regarding what the particular section of the script is supposed to do. See the file sample_script.PNG for suggested script format.

If you did not complete the mid term project you will not be able to proceed without first creating the following tables and columns using the entity relationship diagram in the file OracleFlix_Project_ERD.pdf. You will need to choose the appropriate data types for each column in your database. You will also need to create primary keys (#) and foreign keys to link the tables using the identified relationships in the ERD. You will need to set the columns identified with an asterisk (*) to NOT NULL.

Complete the following objectives using APEX:

Background Information:

You have been contracted by a small company named OracleFlix to create a database for storing information about their inventory and rentals. Use the entity relationship diagram in the file OracleFlix_Project_ERD.pdfas your guide to building the required tables.

Assignment Deliverable:

Using the tables created for the mid term project

In order to be eligible for full credit, you must complete the following tasks.

  1. Create a view called TITLE_UNAVAIL to show the movie titles and media_id of the media not returned yet.
    1. The view should not allow any DML operations.
  2. Create the following sequences to be used for primary key values:
    1. Use a sequence to generate PKs for CUSTOMER_ID in CUSTOMERS table
      1. Begin at 101 and increment by 1
    2. Use a sequence to generate PKs for TITLE_ID in MOVIES table
      1. Begin at 1 and increment by 1
    3. Use a sequence to generate PKs for MEDIA_ID in MEDIA table
      1. Use a sequence to generate PKs for MEDIA_ID in MEDIA table
    4. Use a sequence to generate PKs for ACTOR_ID in ACTOR table
      1. Begin at 1001 and increment by 1
  3. Create records in your tables. You can use the file, OracleFlix_SQL_Project_Tables.pdf

    Actions

    as a guide to loading data in your tables.
    1. Use www.imdb.com (Links to an external site.) to find at least 6 titles for your movies table.
    2. Create at least 6 fake records for your customers table.
    3. You will add data to the rest of the tables based on what is loaded into customers and movies.
  4. Create an index on the last_name column of the Customers table.
  5. Create a synonym called TU for the TITLE_UNAVAIL view.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions