meljun cortes computer information processing chapter 9 with notes

Upload: meljun-cortes-mbampa

Post on 05-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    1/31

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    2/31

    OBJECTIVES Describe the types of data processing files

    Describe the types of file organization

    Data validation

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    3/31

    FILE, RECORD & FIELD

    - Field Data item

    e.g. student name

    - Record A group of related data items or fields

    e.g. student record

    - File A collection of related records e.g. Student file

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    4/31

    ENTITY SET, ENTITY & ATTRIBUTES

    - Attributes

    Describe the properties of the entity (I.e. field)

    - Entity

    Which or when we store facts (i.e. records)

    - Entity set A collection of logically related entities (i.e. file)

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    5/31

    1. Physical file :

    Refers to how the data is stored i.e. the actual arrangement of

    data in storage device

    2. Logical file :

    What a file contains & how the data should be processed

    Logical File & Physical Files

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    6/31

    It is a field within the record which is used for locating &processing the recorde.g. student number

    Key Field

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    7/31

    FILE LENGTH

    Fixed-length records

    Each record has the same length

    Advantage: Easier to design

    Disadvantage: Wasted storage space

    Variable-length records

    Each record does not have the same length Advantage: Saves storage space

    Disadvantage: More difficult to design

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    8/31

    1. Writing :

    The act of transferring a record from main memory to secondarystorage.

    2. Insertion :

    Adding a new record to an existing file.

    3. Deleting : Removing a record from a file.

    INFORMATION RETRIEVAL

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    9/31

    4. Updating : Making changes to the contents of a record to show the new

    status of information.

    5. Sorting :

    Rearranging the records in a file for the purpose of producingordered reports.

    6. Merging :

    Combination of 2 or more files to produce a single output file.

    INFORMATION RETRIEVAL

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    10/31

    7. Matching : Where 2 or more output files are compared record

    against record to ensure there is a complete set ofrecords for each key. Mismatched records arehighlighted for action.

    8. Searching : Involves looking for a record with a certain key value

    9. Appending :- Adding a record at the last available space of anexisting file

    INFORMATION RETRIEVAL

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    11/31

    The number of records that are changed as a result ofupdating when compared to the total number of recordsin the file.

    HIT RATE

    =

    Volatility :

    Measuring the number of additions and deletions in a file.

    File growth No of records additions number of records deletions

    number or records affected

    total records on file

    ACTIVITY RATIO (HIT RATE)

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    12/31

    1. Master file

    Permanent or semi-permanent data

    Used for reference and updating

    Shows the current status of data

    Never empty except at its time of creation

    E.g. stock master file

    TYPES OF DP FILES

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    13/31

    2. Transaction file

    Contains source or transaction data

    Used for updating master file

    E.g. sales transaction file

    3. Work file

    Temporary file

    Used for storing intermediate data for further processing

    E.g. file used by sort utility

    TYPES OF DP FILES

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    14/31

    4. Transition file

    Temporary file for specific use

    E.g. meter readings, customers detail for printout

    5. Security & backup file

    Extra copy of file against damage/loss

    6. Audit file

    Enables auditor to check correct functioning of computer based

    procedures Keeps a copy of all transactions

    TYPES OF DP FILES

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    15/31

    FILE ORGANISATIONS 4 Types

    1. Serial

    2. Sequential

    3. Indexed-sequential

    4. Random

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    16/31

    Simplest, not in any order

    Placed record in next available space

    Suitable for Unsorted transaction files

    Print files

    Dump files

    Temporary data files

    Access in order of records placed

    SERIAL ORGANISATION

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    17/31

    SERIAL ORGANISATION

    Advantages :

    File design is simple

    Efficient for high activity file

    Effective use of low cost file media suitable for batch processing

    Disadvantage :

    File are to be processed from beginning to the end

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    18/31

    Predefined order

    A designated field within the record is selected as basis inordering records

    This key is also known as Record key orSimply key

    Suitable for master file

    Not for fast response on line enquiring systems

    E.g. Payroll transaction file

    SEQUENTIAL ORGANISATION

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    19/31

    SEQUENTIAL ORGANISATION

    Advantages :

    File design is simple

    Efficient for high activity file

    Effective use of low cost file media suitable for batched transactions

    Disadvantage :

    Entire file must be processed even if activity is low

    Transactions required sorting

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    20/31

    Physical sequence to primary key

    Builds an index separate from the data or

    records Accessed randomly and sequentially

    3 main parts

    Prime (Home) area

    Overflow area

    Index area

    INDEXED SEQUENTIAL

    ORGANISATION

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    21/31

    INDEXED SEQUENTIAL

    ORGANISATION When insufficient space in home area (prime area), overflow

    area will be used

    Overflow areas created at cylinder & track level

    Access controlled by means of pointers

    File reorganization to be done

    Overflow records recovered & indexes rebuilt

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    22/31

    - Support three types of processing :

    1. Sequential processing

    2. Selective sequential processing/ Random access

    3. Block is searched record by record until record is found/Direct access/ Dynamic access

    INDEXED-SEQUENTIAL FILES

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    23/31

    Predictable relationship between record key &records location on disc

    Not in sequence physically, scattered in random

    Direct addressing

    Key as physical address of record

    Device dependent

    RANDOM ORGANISATION

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    24/31

    INDEXED-SEQUENTIAL ORGANISATION

    Advantages :

    Transactions may be sorted or unsorted

    Only the affected master records are processed during updating

    Response time is reasonably fast

    Facilities file enquiry Be processed sequentially and randomly

    Disadvantage :

    Each master file access requires index file access

    Requires direct access storage devices (still costly)

    Storage space required for indexes

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    25/31

    RANDOM ORGANIZATION

    Predictable relationship between record key and record

    location on disc

    Records may be scattered in random

    Direct addressing

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    26/31

    RANDOM ORGANIZATION

    Key transformation techniques used

    1. Division remainder method

    Divide key value by an appropriate number

    Remainder of division as address of record

    Number used to divide is prime number

    2. Mid Square Hashing

    The key is squared, specified digits extracted from middle of the

    result to yield address of the results

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    27/31

    RANDOM ORGANIZATION

    3. Hashing By Folding

    Key is divided into 2 or more parts which are then addedtogether

    Truncation to bring result into required range of numbers

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    28/31

    RANDOM ORGANISATION

    Advantages :

    As index are not required, space and searching time are saved

    Insertion and deletion or records can take place

    Disadvantage :

    Variable-length records are difficult to handle

    Gaps in keys can caused wasted space

    Synonym can occur

    Allocation of efficient overflow areas is difficult

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    29/31

    Double punching method

    Sight verification

    DATA VERIFICATION

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    30/31

    Presence

    Size

    Range

    Character check

    Format

    Reasonableness

    Check digits

    DATA VALIDATION

  • 7/31/2019 MELJUN CORTES Computer Information Processing Chapter 9 With Notes

    31/31

    Adequate program checkpoint/ restart facilities

    File dumps

    Generations of backup files

    ERROR RECOVERY