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
Know when and how to use denormalization
Chapter 5
Chapter 5
relations
Attribute
estimates
Attribute
definitions
Response
time expectations
Data
security needs
Backup/recovery
Integrity
DBMS
Decisions
needs
expectations
technology used
Chapter 5
data types
Physical
record descriptions
(doesnt always match
logical design)
Leads to
File
organizations
Indexes
and database
architectures
Query
optimization
Chapter 5
Data volumes
Chapter 5
Access Frequencies
(per hour)
Chapter 5
Chapter 5
Chapter 5
Designing Fields
Field:
data type
Coding, compression, encryption
Controlling data integrity
Chapter 5
10
CHARfixed-length character
VARCHAR2variable-length character (memo)
LONGlarge number
NUMBERpositive/negative number
INEGERpositive/negative whole number
DATEactual date
BLOBbinary large object (good for graphics,
sound clips, etc.)
Chapter 5
11
Chapter 5
12
Chapter 5
13
14
Physical Records
Chapter 5
15
Denormalization
Chapter 5
16
Figure 5-3 A possible denormalization situation: two entities with oneto-one relationship
Chapter 5
17
Extra table
access
required
Chapter 5
18
Figure 5-5
A possible
denormalization
situation:
reference data
Extra table
access
required
Data duplication
Chapter 5
19
Partitioning
20
Partitioning (cont.)
Advantages of Partitioning:
Disadvantages of Partitioning:
Chapter 5
21
Range partitioning
Hash partitioning
List partitioning
Composite partitioning
Chapter 5
22
Physical File:
Sequential storage
Pointersfield of data that can be used to locate
related fields or records
Chapter 5
23
Chapter 5
24
File Organizations
Sequential
Indexed
Hashed
Chapter 5
25
Figure 5-7a
Sequential file
organization
Records of the
file are stored
in sequence by
the primary key
field values
1
2
If sorted
every insert or
delete requires
resort
If not sorted
Average time to
find desired record
= n/2
Chapter 5
26
Chapter 5
27
Chapter 5
28
Figure 5-7c
Hashed file
organization
Hash algorithm
Usually uses divisionremainder to determine
record position. Records
with same position are
grouped in lists.
Chapter 5
29
Chapter 5
30
Chapter 5
31
Clustering Files
Chapter 5
32
Chapter 5
33
Chapter 5
34
Query Optimization
Chapter 5
35
Chapter 5
36