e r Diagram1129

13
INFM 603 – Information Technology and Organizational Context Lecture 8 Entity Relationship Diagrams

description

ERD Databases

Transcript of e r Diagram1129

Page 1: e r Diagram1129

INFM 603 – Information Technology and Organizational Context

Lecture 8

Entity Relationship Diagrams

Page 2: e r Diagram1129

2

Entity

• “An entity is a business object that represents a group, or category of data.”1

• Do we know a similar concept?

1) Stephens, R.K. and Plew. R.R., 2001. Database Design. SAMS, Indianapolis , IN.

Page 3: e r Diagram1129

3

Attribute

• “An attribute is a sub-group of information within an entity.”1

• Do we know a similar concept?

1) Stephens, R.K. and Plew. R.R., 2001. Database Design. SAMS, Indianapolis , IN.

Page 4: e r Diagram1129

4

Entity Relationship Models

• Mandatory Relationships• Optional Relationships• Many-to-Many Relationships• One-to-Many Relationships• One-to-One Relationships• Recursive Relationships

Page 5: e r Diagram1129

5

Mandatory, Many-to-Many

INSTRUCTOR STUDENT

INSTRUCTOR STUDENT

Page 6: e r Diagram1129

6

Optional, Many-to-Many

DEPARTMENT STUDENT

DEPARTMENT STUDENT

Page 7: e r Diagram1129

7

Optional/Mandatory,Many-to-Many

INSTRUCTOR SKILL

INSTRUCTOR SKILL

Page 8: e r Diagram1129

8

Optional/Mandatory,One-to-Many

PRODUCT VENDOR

PRODUCT VENDOR

Page 9: e r Diagram1129

9

Mandatory, One-to-One

AUTOMOBILE ENGINE

AUTOMOBILE ENGINE

Page 10: e r Diagram1129

10

Recursive

EMPLOYEEsupervises

is supervised by

Page 11: e r Diagram1129

11

Resolving Many-to-Many Relationships

• Many-to-many relationships should be avoided. We can resolve a many-to-many relationship by dividing it into two one-to-many relationships.

Page 12: e r Diagram1129

12

Resolving Many-to-Many Relationships

SALES ORDERS INV. ITEMS

SALES ORDERS INV. ITEMSORDER ITEMS

Page 13: e r Diagram1129

13

Example (ER Diagram)

SALES ORDERS

INV. ITEMSORDER ITEMS

CLERKSCUSTOMERS