CSE 441: Systems Analysis & Design ERD - DATA MODELLING LAB 3 Yusuf Altunel
What is an Entity Relationship Diagram (ERD) ? Identify the entities required by the business An entity corresponds to a Person Place Event Concept Entities have relationships “friends” may have many “addresses” Relationships are evaluated in both directions “One friend may have many telephones” or “One telephone belongs to a single friend”
Four Basic components of E-R Diagrams 1. entity: a "thing" in the real world a Book, a publisher, a customer 2. attribute: a property of an entity a Book’s Title, a customer’s name 3. key: usually one attribute identifies an entity the ISBN for a book, Account number 4. relationship: a link between two entities a book and its publisher: publishes, published by customer who placed an order for item(s) orders, ordered by
Entities: Examples In a Hospital Administration System Patient Doctor Operation Medicine ...
Look at the following list and decide which you think are likely candidates for entities A member of staff in a personal system. A book in a library system A customer’s address in a sales system A customer in a sales system A National Insurance number in a payroll system A patient in a medical records system The library in a library system * * * *
Some Data Items for each of these entities can be: 1. Name, address, date of birth 2. Book title, author, publisher 4. Name, address, credit limit 6. National Insurance number, date of birth
Attributes A special and very important type of attribute A key attribute: A special and very important type of attribute uniquely identifies a specific entity.
Choose likely key and non-key attributes for the following entities: 1. A car in a vehicle registration system Car’s registration number, type, model, date of manufacture 2. An employee in a payroll system Employee number or Payroll number, Name, address, department, tax code, etc. 3. A stock item in a stock control system Stock number, Description, amount in stock, price, etc. * * *
Reading an Entity-Relationship Diagram
Tips on Building ERD Nouns are clues to the entities of a business Start by describing the work that is done in the project, then pull out nouns in the sentences for entities. - My address book contains adresses and telephone numbers for both friends and businesses Verbs and adjectives sometimes help to get relationships between entities. - Friends have adresses