10
CSE 441: Systems Analysis & Design ERD - DATA MODELLING LAB 3 Yusuf Altunel

CS E 4 4 1: Systems Analysis & Design

  • Upload
    oria

  • View
    18

  • Download
    1

Embed Size (px)

DESCRIPTION

CS E 4 4 1: 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 - PowerPoint PPT Presentation

Citation preview

Page 1: CS E  4 4 1: Systems  Analysis & Design

CSE 441: Systems Analysis & Design

ERD - DATA MODELLINGLAB 3Yusuf Altunel

Page 2: CS E  4 4 1: Systems  Analysis & Design

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”

Page 3: CS E  4 4 1: Systems  Analysis & Design

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

Page 4: CS E  4 4 1: Systems  Analysis & Design

Entities: Examples

In a Hospital Administration SystemPatient Doctor Operation Medicine...

Page 5: CS E  4 4 1: Systems  Analysis & Design

Look at the following list and decide which you think are likely candidates for entities

1. A member of staff in a personal system.2. A book in a library system 3. A customer’s address in a sales system4. A customer in a sales system5. A National Insurance number in a

payroll system6. A patient in a medical records system7. The library in a library system

*

*

*

*

Page 6: CS E  4 4 1: Systems  Analysis & Design

1. Name, address, date of birth2. Book title, author, publisher4. Name, address, credit limit6. National Insurance number,

date of birth

Some Data Items for each of these entities can be:

Page 7: CS E  4 4 1: Systems  Analysis & Design

Attributes

A key attribute:A special and very important

type of attribute uniquely identifies a specific entity.

Page 8: CS E  4 4 1: Systems  Analysis & Design

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.

Choose likely key and non-key attributes for the following entities:

*

*

*

Page 9: CS E  4 4 1: Systems  Analysis & Design

Reading an Entity-Relationship Diagram

Page 10: CS E  4 4 1: Systems  Analysis & Design

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