- Create a "meta data" file that
contains the
description
of the
structure/format of the
data file
The format of the
meta data file is
fixed:
Format of the Meta data:
+-----------+-----------+-----------+
| fieldName | fieldType | fieldSize |
+-----------+-----------+-----------+
fieldName = the name of a field (This is a String)
fieldType = the data type of the filed
"C" = Characters (String)
"I" = Integer
"F" = Floating point number or double
fieldSize = the number of bytes used to store the value
|
Example:
- A program that achieve
physical data independence
is written as follows:
- The program must
first
read the meta data file and
process the
structure/format description
I.e.:
- The program must first
learn about
the
structure of the data file
that it will
access !!!
|
- Using the
information on the structure,
the program accesses the
actual data file by
reading the fields
in the
format and size (# bytes)
given in the meta data file
|
|