Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Base Design Steps 1.Define Entity Classes (Relations/Tables) and Keys. 2.Define Relationships between Entity Classes. Normalization Steps Eliminate.

Similar presentations


Presentation on theme: "Data Base Design Steps 1.Define Entity Classes (Relations/Tables) and Keys. 2.Define Relationships between Entity Classes. Normalization Steps Eliminate."— Presentation transcript:

1 Data Base Design Steps 1.Define Entity Classes (Relations/Tables) and Keys. 2.Define Relationships between Entity Classes. Normalization Steps Eliminate all M:M relationships Assure all fields are dependent only on the Primary Key Remove all calculated fields 3.Define Fields in the Relation. 4.Using the Data Definition Language, create the data base.

2 Video Rental Example – Step 1 Tracking the rental of videos in a store Step 1. Define the Entity Classes + Primary Key Customer  ( ID, Name, Address, Phone #, # of Videos Rented) Videos  ( ID, Type, Days Rented, Rental Price, Distributor, Phone #)

3 Video Rental Example – Step 2 Step 2 - Define Relationships between Entity Classes  Entity Relationship Diagrams (ERD) Customer Video Required Optional Many One

4 Video Rental Example – Step 2 a. Normalization  a. Eliminate all M:M relationships Customer Video RentalVideo Video Rental Customer ID Video ID Date Rented Date Returned Composite Primary Key

5 Video Rental Example – Step 2 b. Normalization  b. Assure all fields are dependent on the Primary Key Customer  ( ID, Name, Address, Phone #, # of Videos Rented) Videos  ( ID, Type, Days Rented, Rental Price, Distributor, Phone # ) Distributor  ( ID, Distributor Name, Phone #) Customer Video Rental Video Distributor

6 Video Rental Example – Step 2 c. Normalization  c. Remove all calculated fields Customer  ( ID, Name, Address, Phone #, # of Videos Rented) Customer Video Rental Video Distributor Field can be calculated

7 Video Rental Example – Step 3 Step 3 - Define Fields in the Relation  Numeric- Required or Optional  Alphanumeric- Default Value  Currency- Pull Down List  Length- Indexed

8 Video Rental Example – Step 4 Step 4 - Using the Data Definition Language, create the data base.


Download ppt "Data Base Design Steps 1.Define Entity Classes (Relations/Tables) and Keys. 2.Define Relationships between Entity Classes. Normalization Steps Eliminate."

Similar presentations


Ads by Google