Beruflich Dokumente
Kultur Dokumente
Objectives
Definition of 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 6
Chapter 6
relations
Attribute
estimates
Attribute
definitions
Response
time expectations
Data
security needs
Backup/recovery
Integrity
DBMS
Decisions
needs
expectations
technology used
Chapter 6
data types
Physical
record descriptions
(doesnt always match
logical design)
Leads to
File
organizations
Indexes
and database
architectures
Query
optimization
Chapter 6
Data volumes
Chapter 6
Access Frequencies
(per hour)
Chapter 6
Chapter 6
Chapter 6
Designing Fields
Field:
data type
Coding, compression, encryption
Controlling data integrity
Chapter 6
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 6
11
Chapter 6
12
Chapter 6
13
14
Physical Records
Chapter 6
15
Denormalization
Chapter 6
16
Figure 6-3 A possible denormalization situation: two entities with oneto-one relationship
Chapter 6
17
Extra table
access
required
Chapter 6
18
Figure 6-5
A possible
denormalization
situation:
reference data
Extra table
access
required
Data duplication
Chapter 6
19
Partitioning
20
Partitioning (cont.)
Advantages of Partitioning:
Disadvantages of Partitioning:
Chapter 6
21
Data Replication
Chapter 6
22
Physical File:
Sequential storage
Pointersfield of data that can be used to locate
related fields or records
Chapter 6
23
Chapter 6
24
File Organizations
Sequential
Indexed
Hashed
Chapter 6
25
Figure 6-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 6
26
Chapter 6
27
Chapter 6
28
Figure 6-7c
Hashed file or
index
organization
Hash algorithm
Usually uses divisionremainder to determine
record position. Records
with same position are
grouped in lists
Chapter 6
29
Figure 6-8
Bitmap index
index
organization
Chapter 6
30
Chapter 6
31
Chapter 6
32
Clustering Files
Chapter 6
33
Chapter 6
34
Chapter 6
35
RAID
Chapter 6
36
Figure 6-10
RAID with
four disks
and striping
Chapter 6
37
No redundancy
One record spans across data
disks
Error correction in multiple
disks reconstruct damaged
data
Raid 4
Error correction in one disk
Multiple records per stripe
Parallelism, but slow updates
due to error correction
contention
Raid 2
Raid 3
Error correction in one disk
Record spans multiple data
disks (more than RAID2)
Not good for multi-user
environments,
Maximized parallelism
No redundancy
No error correction
no fault-tolerance
Raid 1
Raid 0
Raid 5
Rotating parity array
Error correction takes place in
same disks as data storage
Parallelism, better performance
than Raid4
Chapter 6
38
Database
Architectures (Figure
6-11)
Legacy
Systems
Chapter 6
Current
Technology
Data
Warehouses
39