Sei sulla pagina 1di 7

Functional Requirements

I have been hired to manage the implementation of a new database management system for a client that wants to rent videos and dvds. Below are the functional requirements: 1. System must be able to differentiate between a DVD and a Video 2. System must be able to contain unlimited number of copies of DVD and Video movies 3. Pricing is dependent on shipment quantities and past business 4. DVD and Video pricing of the same movie can be different 5. Distributor provides movie types 6. Movie types are suspense, horror, mystery, comedy 7. Single distributors can provide up to all movie types for both DVD and Video movies 8. System will have a unique identifier for Video and DVDs 9. System will keep Distributors unique identifier for movies 10. Movies will have a title 11. System will have information from distributors movie catalogs 12. System will record when DVD or Video is rented 13. System will record when DVD or Video is returned 14. System will record late fees 15. System will record damaged fees 16. System will record failure to rewind fees 17. System will record taxes 18. System will report on which videos are returned late 19. System will have the ability to apply discount prices for certain movies, or movie types 20. System will be able to display a report showing movies based on the following criteria a. Actors b. Actresses c. Length d. Movie type e. Rating f. Year released g. Director h. Oscars won i. Movie title ii. Actors iii. Actresses iv. Directors v. Actors / actresses / directors 21. System will be able to display a report showing total rented DVDs and or Videos in the last 30 days, 90 days, 180 days, 365 days. 22. System will contain common customer information

Project Deliverables
1. 2. 3. 4. BrianRenoProject2Step1.sql BrianRenoProject2Step2.sql BrianRenoProject3Step2.sql BrianRenoProject4Step2.sql

Project Requirements:
1. 2. 3. 4. 5. Create Tables using DDL SQL Development must be done in PL SQL Declare PK for each table Declare all appropriate FKs Develop CREATE TABLE statements a. Show integrity constraints for the following: i. NOT NULL ii. UNIQUE iii. PK iv. FK v. REFERENCES vi. CHECK b. Ensure all tables normalized to 3NF form c. Test to ensure script works d. Save Script as BrianRenoProject2Step1.sql 6. Develop 2 examples of PL SQL DDL command that fail different table integrity constraints set up for the table a. Explain why they failed b. Save as BrianRenoProject2Step2.sql 7. Populate each table with 7 valid rows of data a. Data can be made up b. Populate other tables as needed to satisfy referential integrity c. Save as BrianRenoProject2Step3.sql 8. Develop the following queries a. Retrieve all customers names, account numbers and addresses (street and zip only), sort by account number b. Retrieve all videos rented in the last 30 days and sort in rental date order c. List distributors and all their information sorted in order of company name d. Update customer names to change their maiden names to married name, I can choose which records to update e. Delete 3 customers from the database, choose any 3

f.

Save as BrianRenoProject2Step4.sql

TABLES

ZIPCODE Attributes Zipcode PK City State

CUSTOMER Attributes Customer ID PK First Name MI Last Name Street Address Zipcode FK (references Zipcode PK in Zipcode table) Comments DISTRIBUTOR Attributes Distributor ID PK Distributor Name Distributor Address Distributor Phone Number

Distributor Movie ID

ORDERS Attributes Order ID PK DateOrderedDateDelivered FK (references both in ORDER DETAILS table below) ORDER DETAILS Attributes Date Ordered - PK Date Delivered - PK Order Quantity Price Per Unit Distributor ID (references Distributor ID in DISTRIBUTOR table, in order to link to Distributor MovieID attribute)

UNIT RATE Attributes UnitRate ID PK Unit Rental Price ID FK (references Unit Rental Price ID PK in Unit Rental Price Table) Unit ID FK (references the Unit ID pk in UNIT Table) UNIT RENTAL PRICE Attributes UnitRentalPrice ID PK Discount Type

Discount Amount Unit Rental Price Effective Date Expiration Date Order ID FK (references Order ID PK in ORDERS table since pricing is based on order prices) MOVIE Attributes Movie ID PK Distributor ID FK (references DISTRIBUTOR table to link distributor ID to Movie ID) Actors Actresses Length Movie Title Rating Year Released Director Movie Type Oscar ID FK (references OSCAR table to be able to link movies to Oscars won)

OSCAR Attributes Oscar ID PK Actors Director

Actresses Movie UNIT Attributes Unit ID PK Video ID DVD ID Unit Type Total Units Owned Total Units Rented Total Units Not Rented Movie ID FK (references Movie ID in MOVIE) Unit Rate ID FK (references Unit Rate ID in UNIT RATE) Rental ID FK (references RENTAL ID in RENTAL)

RENTAL Attributes Rental ID PK Late Fees Rewind Fees Damage Fees Taxes Date/Time Rented Date/Time Due Date/Time Returned

Daily Late Charge Total Charge Customer ID FK (links to Customer ID in CUSTOMER) Unit Rate ID FK (links to Unit Rate ID in UNIT RATE) Unit ID FK ( links to Unit ID in UNIT)

Potrebbero piacerti anche