entity relationship diagrams (erds). entity relationship diagram (erd) documentation technique to...

16
Entity Relationship Diagrams (ERDs)

Upload: fay-peters

Post on 12-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

Entity Relationship Diagrams (ERDs)

Page 2: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

2

Entity Relationship Diagram (ERD) documentation technique to represent

relationship between entities in system. Think of entities as “nouns” – nouns on

which a company would want to track information. A few examples: Vehicles Accounts Receivable Customers Vendors

Page 3: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

3

Entity Relationship Diagram (ERD)

Think of the relationship as a “verb” The verb connects (relates) one entity

to another. A few examples:ReceiveAssignPrepareSend

Page 4: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

4

Cardinality between entities

represents the numerical mapping between entities: one-to-one one-to-many many-to-many

Depends

on

business

rules !!

Page 5: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

Sales-person

Car

Customer

is assigned

Entity Relationship Entity

1 1

Cardinalities

Company A

Page 6: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

Sales-person

Car

Customer

is assigned

Entity Relationship Entity

M1

Cardinalities

Company B

Page 7: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

7

Customer Orderplaces

Entity Relationship Entity

M1

Cardinalities

This cardinality is probably true for most businesses.

Page 8: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

8

Vendor Inventorysupplies

Entity Relationship Entity

M M

Cardinalities

This cardinality would depend on the business.

Page 9: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

ERD – Expenditure Cycle

Page 10: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

10

Describe the business rules represented by the cardinalities in the ERD.

P.O.

REC. RPT.

INVENTORY

VENDOR

M

M

1

M

1

M

M

M

1

1

Page 11: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

11

Add 3 attributes for each entity.

P.O.

REC. RPT.

INVENTORY

VENDOR

M

M

1

M

1

M

M

M

1

1

Page 12: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

12

3 attributes for each entity.

P.O.

REC. RPT.

INVENTORY

VENDOR

M

M

1

M

1

M

M

M

1

1

Page 13: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

13

Modify the ERD, based on the following information:

The Vendor sends an invoice for each shipment.The invoice is matched tothe RR; a Cash Disbursement (CD) is prepared for each invoice.

13

P.O.

REC. RPT.

INVENTORY

VENDOR

M

M

1

M

1

M

M

M

1

1

Page 14: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

14

P.O.

REC. RPT.

INVENTORY

VENDOR

M

M

1

M

1

M

M

M

1

1

Page 15: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

15

P.O.

REC. RPT.

INVENTORY

VENDOR

M

M

1

M

1

M

M

M

1

1

Add 3 attributes for each new entity.

Page 16: Entity Relationship Diagrams (ERDs). Entity Relationship Diagram (ERD) documentation technique to represent relationship between entities in system. Think

16

The End