DBMS Chapter 5
DBMS Chapter 5
Object-oriented
Multidimensional
4
Designing fields
Designing physical records
Designing physical files
5
Designing Fields
Field: smallest unit of data in
database
Field design
6
Choosing Data Types
CHAR – 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.)
7
Field Data Integrity
Default value – assumed value if no
explicit value
Range control – allowable value
limitations (constraints or validation
rules)
Null value control – allowing or
prohibiting empty fields
Referential integrity – range control (and
null value allowances) for foreign-key to
primary-key match-ups
8
Designing Physical Records
Physical Record: A group of fields
stored in adjacent memory locations
and retrieved together as a unit
Page: The amount of data read or
written in one I/O operation
Blocking Factor: The number of
physical records per page
9
Data Replication
Purposely storing the same data in
multiple locations of the database
Improves performance by allowing
multiple users to access the same data
at the same time with minimum
contention
Sacrifices data integrity due to data
duplication
Best for data that is not updated often
10
Designing Physical Files
Physical File:
A named portion of secondary memory allocated
for the purpose of storing physical records
Tablespace – named set of disk storage
elements in which physical files for database
tables can be stored
Extent – contiguous section of disk space
Constructs to link two pieces of data:
Sequential storage
Pointers – field of data that can be used to locate
related fields or records
11
File Organizations
Technique for physically arranging records of a file
on secondary storage
Factors for selecting file organization:
Fast data retrieval and throughput
Efficient storage space utilization
Protection from failure and data loss
Minimizing need for reorganization
Accommodating growth
Security from unauthorized use
Types of file organizations
Sequential (not used in database)
Indexed
Hashed
12
Review
Data volume and usage analysis
Designing fields
Designing physical records
Designing physical files
Using indexes
Improving file access performance
13