Session2

Session2 - Entity-Relationship Model Entity Sets...

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

View Full Document Right Arrow Icon
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Entity Entity - - Relationship Model Relationship Model x Entity Sets x Relationship Sets x Design Issues x Mapping Constraints x Keys x E-R Diagram x Extended E-R Features x Design of an E-R Database Schema x Reduction of an E-R Schema to Tables
Background image of page 1

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

View Full DocumentRight Arrow Icon
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 2 Entity Sets Entity Sets x A database can be modeled as: s a collection of entities, s relationship among entities. x An entity is an object that exists and is distinguishable from other objects. Example: specific person, company, event, plant x Entities have attributes Example: people have names and addresses x An entity set is a set of entities of the same type that share the same properties. Example: set of all persons, companies, trees, holidays
Background image of page 2
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 3 Entity Sets Entity Sets customer customer and and loan loan customer-id customer- customer- customer- loan- amount name street city number
Background image of page 3

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

View Full DocumentRight Arrow Icon
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 4 Attributes Attributes x An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set. Example: customer = (customer-id, customer-name, customer-street, customer-city) loan = (loan-number, amount) x Domain – the set of permitted values for each attribute x Attribute types: s Simple and composite attributes. s Single-valued and multi-valued attributes •E.g. multivalued attribute: phone-numbers s Derived attributes •Can be computed from other attributes •E.g. age , given date of birth
Background image of page 4
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 5 Composite Attributes Composite Attributes
Background image of page 5

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

View Full DocumentRight Arrow Icon
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 6 Relationship Sets Relationship Sets x A relationship is an association among several entities Example: Hayes depositor A-102 customer entity relationship set account entity x 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 s Example: (Hayes, A-102) depositor
Background image of page 6
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 7 Relationship Set Relationship Set borrower borrower
Background image of page 7

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

View Full DocumentRight Arrow Icon
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 8 Relationship Sets (Cont.) Relationship Sets (Cont.) x An attribute can also be property of a relationship set. x For instance, the depositor relationship set between entity sets customer and account may have the attribute access-date
Background image of page 8
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 9 Degree of a Relationship Set Degree of a Relationship Set x Refers to number of entity sets that participate in a relationship set. x
Background image of page 9

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

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

This document was uploaded on 05/16/2010.

Page1 / 60

Session2 - Entity-Relationship Model Entity Sets...

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

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