DBS211 -LAB02
LAB 02 – SUBMISSION
You will be submitting a Word document with the screenshots of a completed database relationship diagram of the following 5 questions.
In the ERD picture have your Name, Student ID number, section. This can be achieved by creating a simple box in the diagram before saving it.
QUESTION 1
Draw the Entity Relationship diagram of the following tables PRODUCTLINES and RETAILPRODUCTS
QUESTION 2
Draw the Entity Relationship diagram of the following table RETAILEMPLOYEES. QUESTION 3
Draw an Entity Relationship diagram for the following.
The online movie rental service offers a catalog of movies available for rental.
Each movie has a unique Movie_ID. Movies have attributes such as Title, Genre, Director, Release Year, and Rating. A movie catalog requires at least the title and Genre as required fields.
Customers can register for an account to rent movies. Each customer has a unique Customer_ID. Customer information includes attributes such as Name, Email, Address, and Payment Information. A customer catalog requires at least the name and email address of the customer.
Each rental transaction is recorded. A rental has a unique Rental_ID. Rental information includes attributes such as Customer_ID, Movie_ID, Rental Date, Due Date. Each customer can rent more than 1 movie and each movie can be rented by many or zero customers.
QUESTION 4
Find the primary keys and foreign keys for all the tables created in LAB 01. See an example below and follow the same way to find these keys from constraints tab in the tables. Mention “n/a” if there is no primary key or foreign key.
Table Name
Primary Key fieldname
Foreign key fieldname(Reference Parent table name)
RETAILEMPLOYEES
EMPLOYEENUMBER
OFFICECODE(RETAILOFFICES), REPORTSTO(RETAILEMPLOYEES)