9
REVIEW MORE ON ERD’S DBS201

R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called

Embed Size (px)

Citation preview

Page 1: R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called

REVIEW

MORE ON ERD’S

DBS201

Page 2: R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called

Why ERDs

• Why ERDs• What is an ERD• What is represented by boxes• What is the connection between boxes called

Page 3: R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called

Equivalent Terms:

Relational Model

Table-Oriented DBMS

Conventional File Systems

Conceptionally Represents

Table File

Row Record

Column Field

Column Type Data Type

Column Value Field Value

Page 4: R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called

Steps in Designing an ERD

• Create Entities• Define Attributes• Select Unique Identifier• Define Relationships• Determine Optionality and Cardinality• Name Relationships• Eliminate Many-toMany Relationships• Determine Data Types

Page 5: R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called

Case Study• Each employee may be assigned to one and only one

department. Some employees may not be assigned to any department. The employee data is stored in the employee entity.

• Each department could have many employees assigned to it. Some departments nay not have any employees assigned to them. The department data is stored in the department entity.

• Each employee may have one and only one job title. Under certain circumstances, some employees may not be assigned a job title.

Page 6: R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called

Case Study• Each job title may be assigned to many employees.

Some job titles may not be assigned to any employees. The job data is stored in the job entity.

• Each employee may be assigned to many projects. Sometimes an employee may be off work and is not assigned to any projects.

• Each project must be assigned to at least one employee. Some projects may have several employees assigned to them. The project data is stored in the project entity

Page 7: R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called

Identify Entities

• Employee• Department• Job• Project

Page 8: R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called
Page 9: R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called

Supplier and Parts

• Each supplier may supply zero, one or many parts

• Each part may be supplied by zero, one or many suppliers

• Supplier name, part description and price.• Draw ERD without a bridge entity first• Redraw ERD with a bridge entity