L15 - ER Modeling

L15 - ER Modeling - Entity Relationship Model A database...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Entity Relationship Model Entity Relationship Model ± A database can be modeled as: ² a collection of entities, ² relationship among entities. ± An entity is an object that exists and is distinguishable from other objects. ² Example: student, car, account ± Entities have attributes ² Example: people have names and addresses, colors have intensity and hue, or maybe colors have red, blue, and green components ± An entity set is a set of entities of the same type that share the same properties. ² Example: set of all students, set of all courses
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
from the text from the text ’s banking example: s banking example: Entity Sets Entity Sets customer and and loan 1300 L-16 900 L-11 500 L-19 1500 L-14 1500 L-15 2000 L-23 1000 L-17 amount loan_ number loan loan Pittsfield Spring Adams 335-57-7991 Princeton Nassau Williams 963-96-3963 Rye North Curry 244-66-8800 Woodside Dupont Jackson 555-55-5555 Harrison Main Hayes 677-89-9011 Rye North Smith 019-28-3746 Harrison North Jones 321-12-3123 customer_c ity customer_s teet customer _name customer_id customer customer
Background image of page 2
from out marina example: from out marina example: Entity Sets Entity Sets sailors and and boats 38 8 Skip Marks 7 45 6 Tim Rosa 5 27 5 Tony Tuna 12 35 9 Skipper SmIth 21 55 8 Mary Salt 3 23 6 Sam Jones 1 age rating name sid sailor sailor boats boats green Spring 5 golden Knight 4 red sunset 31 aqua Jady 2 green Rosey 1 color name bid
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Relationship Sets Relationship Sets ± A relationship is an association among several entities Example: Hayes depositor A-102 customer entity relationship set account entity ± A relationship set is a mathematical relation among n 2 entities, each taken from entity sets {( e 1 , e 2 , … e n ) | e 1 E 1 , e 2 E 2 , …, e n E n } where ( e 1 , e 2 , …, e n ) is a relationship ² Example: (Hayes, A-102) depositor
Background image of page 4
Again, from the text Again, from the text s banking example: s banking example: Relationship Set Relationship Set borrower Pittsfield Spring Adams 335-57-7991 Princeton Nassau Williams 963-96-3963 Rye North Curry 244-66-8800 Woodside Dupont Jackson 555-55-5555 Harrison Main Hayes 677-89-9011 Rye North Smith 019-28-3746 Harrison North Jones 321-12-3123 customer_ city customer_ steet customer _name customer_id customer customer 1300 L-16 900 L-11 500 L-93 1500 L-14 1500 L-15 2000 L-23 1000 L-17 amount loan_ number loan loan
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Relationship Sets (cont.) Relationship Sets (cont.) ± An attribute can also be property of a relationship set. ± For instance, in the banking example, the depositor relationship set between entity sets customer and account could have the attribute access-date
Background image of page 6
The degree of a relationship set The degree of a relationship set ± Refers to number of entity sets that participate in a relationship set. ± Relationship sets that involve two entity sets are
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 29

L15 - ER Modeling - Entity Relationship Model A database...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online