Unit 2
Files and Databases



Records and Files


Field - group of characters e.g. surname


Record - e.g. all the information about one person


File - collection of records (extended to mean source code program written in high level language, word processed letter, bitmapped graphics file, ASCII text file


Variable length records



File Organisation


Transaction files - contain details of all transactions that have occurred in the last period

Master files - permanent files kept up-to-date by applying transactions that occur during the operation of the business


Reference file - contains data used by a program during processing


SERIAL


SEQUENTIAL


RANDOM FILES


Hashing algorithm - used to translate record key into an address


Synonyms - two record keys generate the same address -> use overflow area and flag



File Processing


Operations carried out on files:


'Updating by copying' - transaction file must be sorted in same order as master file


'Updating by overlay'


File maintenance - updating more permanent fields on each record, adding / deleting records


Hit rate - proportion of records being accessed on any one run



File Security Methods


Data security - keeping data safe from the various hazards to which it mat be subjected


Call-back procedure - when a remote user logs on the computer automatically calls them back at a prearranged number to verify their access request before allowing them to log on


Methods of encryption:


Cryptography


Access rights


Biometric security methods


Periodic backups - copy files regularly and keep them in a safe place


Contingency plan



Data Processing Integrity Methods


Data integrity - correctness of data


'Direct data capture' - data entered automatically e.g. bar-code scanning


Hash total - sum of values calculated purely for validation purposes (use ASCII codes)


Control total - sum which has meaning


Validation checks - check data is likely


Check digit


Verification - entering data twice


Checksum


Entity Relationship Modelling



Conceptual data model - describes how data elements in a system are grouped


Entity - thing of interest about which data is to be held


Attribute - property or characteristic of an entity


Relationship - link / association between entities



Database Concepts

Unproductive maintenance - programs still dependent of record structure and all departments affected by minor changes in another department


Problems of security - confidential information accessible by every application since held centrally


Database - consists of many different files linked so that information can be retrieved from several files simultaneously


Primary Key - unique identifier given to each individual record in a file


Secondary Key - not unique to each record but may be used to quickly locate a group of records


Foreign Key - key field from one table used in a second table (common field)


Index - list of numerical values which gives the order of the records when they are sorted on a particular field


Query by example (QBE)