Document 7901570
Download
Report
Transcript Document 7901570
File Processing : File
Organization
2005, Spring
Pusan National University
Ki-Joune Li
PNU
STEM
Logical Structure of File
Field
Field
Field
Record (Tuple)
Fixed Size Record
Record
Record
Block
File
Variable Size Record
PNU
STEM
Fixed Size Record
Fixed Size
Fixed Number of Fields, and
Fixed Size of each Field
Easy to implement
Disk Address
(n-1)*srecord
Deletion of a record
Like Array but no movement
Free Record List or
Pointer to Next Record
PNU
STEM
Variable Length Record
Variable Length due to
Variable Number of Fields, or
Variable Size of each Field
Complicated to implement
Implementation
Delimiter (, size, or pointer)
Slotted Page
Fixed Length
Overflow Area
Reserved Space
PNU
STEM
Delimiters
Record
Record
…
Delimiters
Record
Record
Record
Pointer/Size
• Difficult to handle deletions and insertions
…
Record
PNU
STEM
Slotted Page
Pointer to Record
Records can be moved around within a page
to keep them contiguous with no empty space between them
entry in the header must be updated.
Pointers should not point directly to record
But to the entry for the record in header.
PNU
STEM
Reserved Space
Maximum # of Fields
PNU
Overflow Area
First field of record
Rest records
STEM
PNU
STEM
Binary Large Object Block (BLOB)
If size (field) > size (block)
e.g. Image or Video
Name
ID#
Photo
Block size
BLOB : Type of field where its size is greater than block size
cf. CLOB : Text rather than binary
Name
ID#
Contiguous Reserved
Block for BLOB