You are on page 1of 22

Adding Detail to the Diagram

Data Modeling and Relational


Database Design
Objectives

• Identify layout conventions


• Analyze information requirements for attributes
• Model attributes
• Identify multi-valued attributes
• Validate attributes
• Identify common and derived data
• Understand the use of domains
• Identify the components of a data warehouse

5-2 Adding Detail to the Diagram


Lay Out the ER Diagram

• Neat and tidy

• Unambiguous text

• Memorable patterns

5-3 Adding Detail to the Diagram


Layout Guidelines

Dead Crows Fly East !

5-4 Adding Detail to the Diagram


Attributes

Badge Number - Identifies an employee

Name - Qualifies an employee

Payroll category (weekly or salaried) -


Classifies an employee

Date of birth - Quantifies an employee

Employment status (active, leave, terminated) -


Expresses the status
of an employee

5-5 Adding Detail to the Diagram


Finding Attributes

Is this attribute really needed ?

Beware of obsolete requirements from previous systems

Beware of derived data

5-6 Adding Detail to the Diagram


Attribute Diagramming Conventions

• Inside the entity's soft


box
EMPLOYEE
badge num
first name • Singular
last name
payroll num
• Lowercase
date of birth
employment status

5-7 Adding Detail to the Diagram


Meaningful Components

PERSON PERSON
last name
name first name

Break down aggregate attributes

ITEM ITEM
type
code vendor
num

5-8 Adding Detail to the Diagram


Verify for Single Value

RENTAL
transaction date
Can an attribute have more than one
total amount paid value for an instance of the entity?
item

5-9 Adding Detail to the Diagram


Verify for Single Value

RENTAL
transaction date
Can an attribute have more than one
total amount paid value for an instance of the entity?
item

Yes, more than one item may be rented at a time. An entity is missing.

5-10 Adding Detail to the Diagram


Verify for Single Value

RENTAL
transaction date
Can an attribute have more than one
total amount paid value for an instance of the entity?
item

Yes, more than one item may be rented at a time. An entity is missing.

RENTAL ITEM RENTAL


item num
transaction date
total amount paid

5-11 Adding Detail to the Diagram


Attributes Which Have Attributes

TITLE
product code
title
description Does information need to be stored about
review details any of the attributes?

5-12 Adding Detail to the Diagram


Attributes Which Have Attributes

TITLE
product code
title
description Does information need to be stored about
review details any of the attributes?

Yes, review details. An entity is missing.

5-13 Adding Detail to the Diagram


Attributes Which have Attributes

TITLE
product code
title
description Does information need to be stored about
review details any of the attributes?

Yes, review details. An entity is missing.

REVIEW TITLE
product code
author title
comment description
date recorded review details

5-14 Adding Detail to the Diagram


Finding Common or Derived Data

12
• Count 08
30
• Total 22
----
• Maximum, Minimum, Average 72
----
• Calculation

Derived attributes are redundant and


can lead to inconsistent values

5-15 Adding Detail to the Diagram


Attribute Optionality

Mandatory Attributes
• A value must be stored for each entity instance

• Tagged with
*
Optional Attributes
• A value may be stored for each entity instance

• Tagged with o
5-16 Adding Detail to the Diagram
Attribute Optionality

EMPLOYEE

*
badge num

*
first name

*o last name
title
o weight

5-17 Adding Detail to the Diagram


Attribute Details and Volumes

Attribute - * Engine Size


Format Type Number
Maximum length 4
Average length 4
Decimal place 1
Unit of measure cc
Allowable values 900,1000,1500,1800,2000

Volume Initial 100%

5-18 Adding Detail to the Diagram


Using a Domain

Movie
Mono

AUDIO
Stereo
MON
Audio STE
SUR
Game

Surround

Sound

5-19 Adding Detail to the Diagram


Data Warehousing

Fact data Reference data

Summary Meta data


data

Load management

Warehouse management

Query management
5-20 Adding Detail to the Diagram
Summary

• Layout conventions
• Identification of attributes
• Attributes which have attributes
• Common and derived data
• Attribute optionality
• Validation of attributes
• Data Warehouses

5-21 Adding Detail to the Diagram


Practice

• 5-1 Develop an ER Model including attribute


optionality

5-22 Adding Detail to the Diagram

You might also like