Download presentation
Presentation is loading. Please wait.
Published byCory Harrell Modified over 8 years ago
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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.