Data Files & Data Hierarchy

While information is being used by a computer it is stored in memory. Memory is temporary. Information often must be stored is such a way that it can be retrieved at a later time by the same or a different program. Information or Data is permanently stored by computers in files. There are several different kinds of files.

At this time we are interested in Data files
 
Information about people (students, employees, customers, clients, patients) and things (inventory items, vehicles, books, accounts, recipes, contracts, invoices, sales, video or music collections etc.) is stored in data files in the form of records.
 
A file is a collection of related records. (Employees, videos, accounts, etc.)
 
Each record is composed of fields and contains all the information about one object. (Employee, video, account)
 
Each field contains one piece of information about the object (name, address, title, artist, etc.) and is composed of characters, each of which usually requires 1 byte of storage.
 
For example, a personnel file might contain records that have three fields: a name field, an address field, and a phone number field.

 

image of data file
  

One very simple kind of data file is called a comma delimited text file. In comma delimited files fields within records are separated by commas. Comma delimited files are files that contain only ASCII characters and can be created and/or opened using utility programs such as NotePad.
 
Comma delimited files useful for exporting to data between different applications and/or different platforms.
 
Example of comma delimited text file.

Comma delimited file image

 

A database is a collection of related files also called tables. For instance a bank may have a database that contains all the information about the various different kinds of accounts
 
Savings, Checking, Installment Loan, Safety Deposit Boxes, etc.
 
We often need to write programs that will access information stored on storage devices as well save information to the storage device.