Académique Documents
Professionnel Documents
Culture Documents
Project Identification
and Selection
Project Initiation
and Planning
Analysis
Logical Design
Physical Design
Database activity
physical database design
Implementation
Maintenance
Chapter 6
Prentice Hall,
Prentice Hall,
Decisions
relations
Attribute
estimates
Physical
Attribute
definitions
Response
time expectations
Data
security needs
Backup/recovery
Integrity
DBMS
needs
expectations
technology used
Chapter 6
data types
record descriptions
(doesnt always match logical
design)
Leads to
File
organizations
Indexes
and database
architectures
Query
Prentice Hall,
optimization
Chapter 6
Prentice Hall,
Data volumes
Chapter 6
Prentice Hall,
Access Frequencies
(per hour)
Chapter 6
Prentice Hall,
Chapter 6
Prentice Hall,
Chapter 6
Prentice Hall,
Designing Fields
Field:
Prentice Hall,
10
fixed-length character
VARCHAR2 variable-length character
(memo)
LONG large number
NUMBER positive/negative number
DATE actual date
BLOB binary large object (good for
graphics, sound clips, etc.)
Chapter 6
Prentice Hall,
11
Figure 6.2
Example code-look-up table (Pine Valley Furniture Company)
Chapter 6
Prentice Hall,
12
Chapter 6
Prentice Hall,
13
Chapter 6
Prentice Hall,
14
Physical Records
Physical
Prentice Hall,
15
Denormalization
Chapter 6
Prentice Hall,
16
Fig 6.5
A possible
denormalization
situation:
reference data
Extra table
access
required
Data duplication
Chapter 6
Prentice Hall,
17
Partitioning
rows
Three types: Key Range Partitioning, Hash Partitioning, or
Composite Partitioning
columns
The primary key must be repeated in each file
Prentice Hall,
18
Partitioning
Advantages
of Partitioning:
Disadvantages
of Partitioning:
Prentice Hall,
19
Data Replication
Purposely
Prentice Hall,
20
File:
Constructs
Sequential storage.
Pointers.
File
Organization:
Access
Method:
Chapter 6
Prentice Hall,
21
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.
n
Chapter 6
Prentice Hall,
22
Chapter 6
Prentice Hall,
23
Chapter 6
Prentice Hall,
24
Fig 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
Prentice Hall,
25
Fig 6-8
Bitmap index
index
organization
Chapter 6
Prentice Hall,
26
Chapter 6
Prentice Hall,
27
Clustering Files
In
Prentice Hall,
28
Prentice Hall,
29
Chapter 6
Prentice Hall,
30
RAID
Redundant Array
of Inexpensive Disks
A set of disk drives that appear to the user
to be a single disk drive
Allows parallel access to data (improves
access speed)
Pages are arranged in stripes
Chapter 6
Prentice Hall,
31
Figure 6-10
RAID with four
disks and
striping
Chapter 6
Prentice Hall,
32
Raid 0
Maximized parallelism
No redundancy
No error correction
no fault-tolerance
Raid 1
No redundancy
One record spans across data disks
Error correction in multiple disks
Raid 4
Error correction in one disk
Multiple records per stripe
Parallelism, but slow updates due to
error correction contention
Raid 2
Chapter 6
Raid 3
Raid 5
Rotating parity array
Error correction takes place in same disks as
data storage
Parallelism, better performance than Raid4
Prentice Hall,
33
(figure 6-12
Database Architectures
Legacy
Systems
Chapter 6
Current
Technology
Data
Warehouses
Prentice Hall,
34
Query Optimization
Parallel
Query Processing
Override Automatic Query Optimization
Data Block Size -- Performance tradeoffs:
Block contention
Random vs. sequential row access speed
Row size
Overhead
Balancing
Chapter 6
35
Query Optimization
Wise
use of indexes
Compatible data types
Simple queries
Avoid query nesting
Temporary tables for query groups
Select only needed columns
No sort without index
Chapter 6
Prentice Hall,
36