Peripherals and File Design
Lecture 5
Chapter 4
·
Continuation
of Assignment #1 discussion
·
How
do we handle an n-way merge
·
Object
definitions
·
Field
& Record Organization
·
Fields
·
Streamed
I/O – field boundaries may be lost
·
Fields
structures – meaningful collection of bytes
·
Fixed
length – wasted space
·
Length
prefix – overhead of length field
·
Delimiter
– may occur as data
·
Keyword
– overhead of keyword
·
Record
structures – meaningful collection of fields
·
Fixed
length – wasted space
·
Predictable
number of bytes
·
Predictable
number of fields
·
Length
prefix – overhead
·
Secondary
file of record addresses
·
Delimiter
at the end of each record
·
File
dump
·
Character
vs hexadecimal representations
·
Use
the LIST.COM (public domain) program (Email to you this morning) to examine the
following records in a file:
Ames | John | 123 Maple |
Stillwater | OK | 74075
Peck | Jack | 430 Edwards
Hall | Clemson | SC | 29631-1906

®
·
Record
Key
·
Identifier
for a record
·
Often
will be distinct (unique) from keys in all other records (primary key)
·
Sometimes
will be duplicated (secondary key)
·
Primary
keys should be dataless (blind)