File Organisation Flashcards
(34 cards)
Give examples of different tile types
Word processing, spreadsheet files and so on
How is the content stored in a file?
Defined binary code that allows the file to be used in the way intended
What do computers, that store files for a specific purpose, store them as?
Binary File or
Text File
What is meant by a text file?
It contains data stored by a defined character code (ASCII).
How can you create a text file?
Using a text editor
How does a binary file store data?
In its internal representation i.e. an integer value might be stored in 2 bytes in 2s complement representation
How is a binary file created?
Via a specific program
How are binary files organised?
Based on a record
Explain what is meant by a record?
A file contains a record, and each record contains fields. Each field consists of a value
What is meant by a serial file?
It contains records which have no defined order.
How is a serial file used?
For banks to record transactions involving customer accounts. A program would be running. Each time there was a withdrawal or a deposit the program would receive the details as data input and would record these in a transaction file. The records would enter the file in chronological order but otherwise the file would have no ordering of the records.
What type of file is a text file?
Serial but it the file has repeating lines which are defined by an end of line character or characters. There is no end of record character.
Why must must a record in a serial file have a defined format?
To allow correct input and output
What is meant by a sequential file?
Records that are ordered
Why use sequential files?
For long term storage of data
What would be an alternative to a sequential file?
Database
What is the difference between a sequential file and a serial file?
In banking, a sequential file could be used as a master file for an individual customer account. Periodically, the transaction file would be read and all affected customer account master files would be updated
How are sequential files ordered?
Using a key field where the values are unique and sequential but not always consecutive
What is the difference between a key field and a database primary key?
Primary key values are required to be unique but not sequentia
How are records in a sequential file found?
By sequentially reading the value of the key field until the required value is found.
State what is meant by direct access files?
It is known as random-access files where the randomness is only that the access is not defined by a sequential reading of the file.
Where is direct access files used?
For large files
Why is direct access used for large files?
It saves time compared to searching through a sequential file
How is data stored in a direct access file?
In an identifiable record where finding it may involve an initial direct access to a nearby record followed by a limited serial search