2.1 Physical Files and Logical Files
Physical file
A file as seen by the operating system, and which actually exists on secondary
storage.
Logical file
A file as seen by a program.
Programs read and write data from logical files.
Before a logical file can be used, it must be associated with a physical file.
This act of connection is called "opening" the file.
Data in a physical file is persistent.
Data in a logical file is temporary.
A logical file is identified (within the program) by a program variable or constant.
The name and form of the physical file are dependent on the operating system, not
on the programming language.
A file as seen by the operating system, and which actually exists on secondary
storage.
Logical file
A file as seen by a program.
Programs read and write data from logical files.
Before a logical file can be used, it must be associated with a physical file.
This act of connection is called "opening" the file.
Data in a physical file is persistent.
Data in a logical file is temporary.
A logical file is identified (within the program) by a program variable or constant.
The name and form of the physical file are dependent on the operating system, not
on the programming language.