




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An in-depth comparison between the entity-relationship (er) model and the relational model, explaining how to translate er diagrams into relational design. It covers the basics of the relational model, the differences between the two models, and the process of converting er diagrams into relations, including special cases such as many-one relations, weak entity sets, and isa relationships.
Typology: Study notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!





1
address name^ ssn^2 Person buys makes employs Company Product name category stockprice name price
Entity Set Relationship Attribute Many-one Many-many Key 3
Beers Budweiser Kirin Sapporo Heineken name manf Summerbrew Bass Piranha Ales color Beers Ales isa name manf color 4
Student University name student-ID name affiliation )
Ideas E/R model Relational model Tables: Column names: attributes rows: tuples Diagrams: Entities Attributes Relationships ER model is well-suited to capture applications’ requirements
7
8
10
Name Price Category Manufacturer gizmo $19.99 gadgets GizmoWorks Power gizmo $29.99 gadgets GizmoWorks SingleTouch $149.99 photography Canon MultiTouch $203.99 household Hitachi tuples Attribute names Table name Products:
19
Relation as Cartesian product
25
Product name category price Product : Name Category Price gizmo gadgets $19.99 26
makes Company Product name category Stock price name Relation Makes (watch out for attribute name conflicts) Product-name Product-Category Company-name Starting-year gizmo gadgets gizmoWorks 1963 Start Year price 27
28
makes Company Product name category Stock price name No need for Makes. Just modify Product : name category price StartYear companyName gizmo gadgets 19.99 1963 gizmoWorks Start Year price
name addr beer Sally 123 Maple Bud Sally 123 Maple Miller Redundancy Customers Beers name addr name manf Likes
37
Have one table: Product ( name, price, manufacturer, age-group, topic, platforms, required-memory, educational-method) Some values in the table will be NULL, meaning that the attribute not make sense for the specific product. Too many meanings for NULL 38
Three approaches: !" Object-oriented : each entity belongs to exactly one class; create a relation for each class, with all its attributes. #" E/R style : create one relation for each subclass, with only the key attribute(s) and attributes attached to that E.S.; entity represented in all relations to whose subclass/E.S. it belongs. $" Use nulls : create one relation; entities have null in attributes that don’t belong to them. 39
Beers Ales isa name (^) manf color 40
name manf Bud Anheuser-Busch Beers name manf color Summerbrew Pete’s dark Ales Beers Ales isa name (^) manf color
name manf Bud Anheuser-Busch Summerbrew Pete’s Beers name color Summerbrew dark Ales Beers Ales isa name (^) manf color
name manf color Bud Anheuser-Busch NULL Summerbrew Pete’s dark Beers Beers Ales isa name (^) manf color