File Organization Notes

Only available on StudyMode
  • Download(s) : 660
  • Published : January 7, 2013
Open Document
Text Preview
FILE DESIGN- The study of file structures involves the investigation of the data structures used to organize a large collection of data into one or more external files that are stored on secondary storage devices.

FILE - is a collection of related data. Example: payroll file

FILE ORGANIZATION -refers to the way in which records are stored in an external file - refers to the data structures used for organizing the data.  FOUR COMMON FILE ORGANIZATIONS

1.SEQUENTIAL FILE ORGANIZATION - records are written consecutively - files are stored in ascending or descending order according to a key field. ADVANTAGE: - easier to maintain than other organizations – especially in terms of adding and deleting records

2.RANDOM FILE ORGANIZATION - implies a predictable relationship between the key used to identify an individual record and that record's location in an external file.

3.INDEXED SEQUENTIAL FILE ORGANIZATION- combines sequential access and ordering with the capabilities of random access. Example: a simple linear search on a 1,000 record sequentially organized file. An average of 500 key comparisons is needed (and this assumes the search keys are uniformly distributed among the data keys). However, using an index evenly spaced with 100 entries, the total number of comparisons is reduced to 50 in the index file plus 50 in the data file: a five to one reduction in the operations count!

TWO PARTS OF INDEXED SEQUENTIAL FILE:

a.A collection of records stored in contiguous locations within blocks in a relative file and ordered by a key field. b.An index (a hierarchical structure of record keys and relative block numbers) to the file of ordered records.

4.MULTIKEY FILE ORGANIZATION - allows access to a data file by several different key fields. Example: Library file that requires access by author and by subject matter and title.

DATA FILE TYPES
1.MASTER FILE - contains records of permanent data that are updated by adding, deleting, or changing. Example: Payroll master file contains an employee's social security number, the rate pay, marital status, number of exemptions claimed, and year-to-date deductions and earnings.

2.TRANSACTION FILE- contains records of changes, additions, and deletions made to a master file.

3.TABLE FILE - consists of a table of data, such as a price list, a tax rate table, or some other form or reference data that is static and is referenced by one of the other type of files. 4.REPORT FILE- contains information that has been prepared for the user. 5.CONTROL FILE - is small and contains information concerning a particular maintenance run, such as the date of the run; the number of master records read, added, deleted, and written; and the number of transaction records read, processed and in error 6.HISTORY FILE - consists of all the backup master files, transaction files, and control files from past runs.

FILE CHARACTERISTICS
1. Activity of a file is a measure of the percentage of existing master records changed during a maintenance run. 2. Volatility of a file is a measure of the number of records added and deleted compared to the original number of records.

FILE MANIPULATION
1. Queries involve searching a file for records containing certain values in particular key fields. 2. Merging

Hierarchy of File Organization
oBit –all data is stored in a computer’s memory or storage devices in the form of binary digits( 0,1) or ON or OFF. oByte –is a group of 8 bits. One byte can represent one character or in different contexts, other data such as a sound, part of a picture. oData Field – is a group of characters, holds a single fact oRecord – collection of related fields

oFile- collection of related records
oDatabase –an organized collection of data usually in digital form

Storage media- Physical material on which data, instructions, and information are stored

Storage Devices- Records and retrieves items to...
tracking img