You are on page 1of 15

DBMS Physical Design

Physical design is
concerned with the
placement of data and
selection of access
methods for efficiency
and ongoing maintenance
File Organization
Physical arrangement of the records of a file on
secondary storage devices

•Sequential
•Linked List
•Indexed
•Hashed
Sequential File
Sequential file sorted in alphabetical order.
Sequential files are usually sorted in ID
sequence order to facilitate batch processing.

a ddr
00 Ayers ACCT
01 Buckley MGT
02 Daley ACCT
03 Dejoie MGT
04 Kenderdine MKT
05 Linn FIN
06 Lusch MKT
07 Price MGT
08 Razook MKT
09 Schwarzkopf MGT
Sequential File Processing

Old Master
Process New Master
Transaction

Sequential files must be recopied from the point of


any insertion or deletion to the end of the file. They
are commonly used in batch processing where a
new master file will be generated each time the file
is updated.
Linked List
Linked list to sort data alphabetically within department.
An external reference must point to the start record (05).

a ddr pointe r
00 Pric e MGT 01
01 Schwarzkopf MGT 02
02 Kenderdine MKT 03
03 Lusch MKT 08
04 Buc kley MGT 09
05 Ayers ACCT 06
06 Daley ACCT 07
07 Linn FIN 04
08 Raz ook MKT ##
09 Dejoie MGT 00
Linked List File Processing

The next record in a linked list is found at the address


stored in the record. Records are added at any
location in the DASD and pointers adjusted to include
them. Deletions are not erased, but pointers
changed to omit the deleted record.
Indexed File
(sequential index)

ACCT 00
ACCT 01
Index to access data by FIN 02
department abbreviation. MGT 00
MGT 01
MGT 04
MKT 03

addr
00 Price MGT Ayers ACCT
01 Schwarzkopf MGT Daley ACCT
02 Kenderdine MKT Linn FIN
03 Lusch MKT Razook MKT
04 Buckley MGT Dejoie MGT
Indexed File Processing

Index Index

Data File

When a record is inserted or deleted in a file the data


can be added at any location in the data file. Each index
must also be updated to reflect the change. For a
simple sequential index this may mean rewriting the
index for each insertion.
Segmented Index
addr
Index
pointer pointer pointer

Root 100
101
101
200
Kenderdine
Buckley
102
201
Razook
Dejoie
103
204
102 203 Lusch 202
Nodes 103 205 Schwarzkopf 206
200 00 Ayers 04 Buckley 201
201 01 Daley 04 Dejoie 204
202 00 Price 03 Razook 205
Leaf 203
204
02
02
Linn
Kenderdine
03 Lusch 202
203
205 01 Schwarzkopf 206
206 5 Van Horn

Data
addr
00 Price MGT Ayers ACCT
01 Schwarzkopf MGT Daley ACCT
02 Kenderdine MKT Linn FIN
03 Lusch MKT Razook MKT
04 Buckley MGT Dejoie MGT
05 Van Horn MGT
Indexed File Processing
(segmented index)

Index

Data File

Data can be inserted or deleted at any location in the


data file. The index(es) must be updated for each
change, but only the affected segments need to be
rewritten.
Physical Design

 Volume and Usage analysis


 Distribution Strategy
 File Organizations
 Indexes and Access Methods
 Integrity Constraints
Physical Design Issues

 Size
 Speed of access
 Speed of update
 Growth issues: performance and
degradation
 Security
 Maintenance
DBMS Organization
Structured Relational
 Relationships: physical  Relationships: logical data
address pointers references
 Links generated when data is  Links generated when data is
entered retrieved
 Efficient but not flexible  Flexible but not efficient
 Ad hoc design  Theoretical base
 Query dependent on specific  SQL
DBMS (may support SQL)
DBMS Technology
• CPU
• Components
• Operation
• DASD
• Technology
• Organization
• Data Transfer
• Access methods
Physical Design
Data Distribution

 Centralized
 Partitioned
Horizontal
Vertical
 Replicated
 Hybrid

You might also like