Professional Documents
Culture Documents
OBJECTIVES
Define terms
Describe the physical database design
process
Choose storage formats for attributes
Select appropriate file organizations
Describe three types of file organization
Describe indexes and their appropriate use
Translate a database model into efficient
structures, and know when/how to
denormalize
Chapter 5
PHYSICAL DATABASE
DESIGN
Decisions
relations
Attribute
estimates
Attribute
Physical
record
descriptions (doesnt always
match logical design)
definitions
Response
time
expectations
Data
Leads to
security needs
Backup/recovery
Integrity
DBMS
data types
needs
expectations
File
organizations
Indexes
and database
architectures
Query
optimization
technology used
Chapter 5
DESIGNING FIELDS
Chapter 5
Chapter 5
Chapter 5
Chapter 5
10
DENORMALIZATION
Chapter 5
11
Figure 5-2 A possible denormalization situation: two entities with oneto-one relationship
Chapter 5
12
Extra table
access
required
Chapter 5
13
Figure 5-4
A possible
denormalization
situation:
reference data
Extra table
access
required
Data duplication
Chapter 5
14
DENORMALIZE WITH
CAUTION
Denormalization can
Chapter 5
15
Physical File:
Tablespace components
Chapter 5
16
Chapter 5
17
FILE ORGANIZATIONS
Sequential
Indexed
Hashed
Chapter 5
18
FILE ORGANIZATIONS
Chapter 5
19
Figure 5-6a
Sequential file
organization
Records of the
file are stored
in sequence by
the primary key
field values
If sorted every
insert or delete
requires re-sort
If not sorted
Average time to
find desired record
= n/2
Chapter 5
20
INDEXED FILE
ORGANIZATIONS
Chapter 5
21
Chapter 5
22
Figure 5-6c
Hashed file
organization
Hash algorithm
Usually uses divisionremainder to determine
record position. Records
with same position are
grouped in lists.
Chapter 5
23
Chapter 5
24
Chapter 5
25
Chapter 5
26
Chapter 5
27
Chapter 5
28
QUERY OPTIMIZATION
29