Download presentation
Presentation is loading. Please wait.
2
Creating a Schema John Wright
3
Where to Start We start with the ERD. We create a relation for each entity. We need to determine the attributes for each entity. We normally do this on the ERD, but for this exercise I will do it in the SCHEMA We then apply the rules of dependancy to normalize the relations. We then apply determine the primary/foreign key relationships. (See the other slide presentation for help in this.).
4
The ERD Publisher Book Patron Purchase Order CheckOut Publishes Contains Submitted Author Order Item Associative Entity AuthorBook Contains Associative Entity
5
Schema with Attributes Book Copy #ISBNPurchase DateAuthorIDTitlePublisherIDTypeNameAuthorID Author Purchase Order PublisherIDPONumberDate Order Item PONumberLineNumberCostTitleType Author Book AuthorIDISBN
6
Entities Publisher AddressPublisherIDRepresentativeIDCityStatezip CheckOut PatronIDISBNCKOutDate Patron AddressPatronIDFinesDueCityStatezip
7
Normalization Normally we normalize at this point. See the presentation on normalization. Normalization is determined by dependancies. Next, we add foreign keys using the rules found in the Schema presentation.
8
Foreign Keys Book Copy #ISBNPurchase DateAuthorIDTitlePublisherTypeNameAuthorID Author Purchase Order PublisherIDPONumberDate Order Item PONumberLineNumberCostTitleType Author Book AuthorIDISBN ISBN and AUTHORID are both foreign keys and composite keys PONumber is a foreign key as well as a composite key PublisherID is a foreign key to publisher table
9
Foreign Keys Publisher AddressPublisherIDRepresentativeIDCityStatezip CheckOut PatronIDISBNCKOutDate Patron AddressPatronIDFinesDueCityStatezip ISBN and PatronID are both foreign keys as well as composit keys
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.