Chapter 13

    Cards (58)

    • What is the simplest method of file organisation?

      Serial file organisation
    • Why are serial files primarily used as transaction files?
      To record transactions in the order they occur
    • How are new records added in a serial file?
      Appended to the end of the file
    • What is the key difference between a sequential file and a serial file?
      Sequential files are ordered based on a key field
    • What is the primary key used for in sequential files?
      To order the records in the file
    • Why are sequential files ideal for master files and batch processing applications?
      Because they have a high file hit rate
    • What is the main characteristic of random file organisation?
      Records are stored in random order
    • How is the location of a record determined in a random file?
      By a mapping function using the record key
    • What are the two methods of file access?
      Sequential access and direct access
    • Why is sequential access efficient for files with a high hit rate?
      Because nearly every record is used when the program is run
    • What is required to use direct access in a sequential file?
      An index of all the key fields
    • What is the purpose of a hashing algorithm in random file organisation?
      To calculate the address of the file location for a record
    • What is a collision in hashing algorithms?
      When two records try to use the same file location
    • What are the two ways to deal with collisions in hashing algorithms?
      Open hash and closed hash
    • If a file has space for 2000 records and the key field value is 3024, what address would a hashing algorithm using modulo 2000 give?
      1024
    • Why must the key field be checked when reading a record using direct access?
      To ensure it matches the original key field
    • What are the characteristics of a good hashing function?
      • Quick to calculate
      • Covers the complete range of the address space
      • Gives an even distribution
      • Does not generate addresses that cluster
    • What are the steps to read a record using direct access with a hashing algorithm?
      1. Calculate the address using the hashing algorithm
      2. Read the key field at the calculated address
      3. Check if the key field matches the original key
      4. If no match, search the next records or overflow area
    • What are the differences between serial, sequential, and random file organisation?
      • Serial: Records stored in order of creation, unordered
      • Sequential: Records stored in a logical sequence based on a key field
      • Random: Records stored in random order with a mapping function
    • What are the advantages and disadvantages of sequential access?
      Advantages:
      • Efficient for high hit rate files
      • Simple to implement

      Disadvantages:
      • Inefficient for low hit rate files
      • Requires searching from the start
    • What are the advantages and disadvantages of direct access?
      Advantages:
      • Quick access to specific records
      • Efficient for low hit rate files

      Disadvantages:
      • Requires additional indexing or hashing
      • Potential for collisions in hashing
    • What are the differences between open hash and closed hash collision resolution?
      • Open hash: Store the record in the next free space
      • Closed hash: Store the record in an overflow area
    • What are the typical applications of serial, sequential, and random file organisation?
      • Serial: Transaction files (e.g., customer meter readings)
      • Sequential: Master files and batch processing (e.g., payroll systems)
      • Random: Direct access applications (e.g., updating a single customer record)
    • What are the key considerations when selecting a file organisation method?
      • Frequency of access (hit rate)
      • Need for ordered records
      • Requirement for direct access
      • Size of the file
    • What are the key considerations when selecting a file access method?
      • Frequency of access (hit rate)
      • Need for direct access to specific records
      • Efficiency of searching and updating records
    • What are the key considerations when designing a hashing algorithm?
      • Speed of calculation
      • Coverage of the address space
      • Even distribution of addresses
      • Minimization of collisions
    • What are the key considerations when dealing with collisions in hashing algorithms?
      • Method of collision resolution (open hash or closed hash)
      • Efficiency of searching for the correct record
      • Impact on overall performance
    • What are the key considerations when implementing direct access in sequential files?
      • Maintenance of an index of key fields
      • Efficiency of searching the index
      • Impact on overall performance
    • What are the key considerations when implementing direct access in random files?
      • Design of the hashing algorithm
      • Efficiency of calculating the address
      • Impact of collisions on performance
    • What are the key considerations when implementing sequential access in serial files?
      • Efficiency of searching from the start
      • Impact of file size on performance
      • Need for ordered records
    • What are the key considerations when implementing sequential access in sequential files?
      • Efficiency of searching based on key field
      • Impact of file size on performance
      • Need for ordered records
    • What are the key considerations when implementing random access in random files?
      • Design of the hashing algorithm
      • Efficiency of calculating the address
      • Impact of collisions on performance
    • What are the key considerations when implementing random access in sequential files?
      • Maintenance of an index of key fields
      • Efficiency of searching the index
      • Impact on overall performance
    • What are the key considerations when implementing hashing algorithms in random files?
      • Speed of calculation
      • Coverage of the address space
      • Even distribution of addresses
      • Minimization of collisions
    • What are the key considerations when implementing hashing algorithms in sequential files?
      • Maintenance of an index of key fields
      • Efficiency of searching the index
      • Impact on overall performance
    • What are the key considerations when implementing hashing algorithms in serial files?
      • Efficiency of searching from the start
      • Impact of file size on performance
      • Need for ordered records
    • What are the key considerations when implementing hashing algorithms in random files?
      • Design of the hashing algorithm
      • Efficiency of calculating the address
      • Impact of collisions on performance
    • What are the key considerations when implementing hashing algorithms in sequential files?
      • Maintenance of an index of key fields
      • Efficiency of searching the index
      • Impact on overall performance
    • What are the key considerations when implementing hashing algorithms in serial files?
      • Efficiency of searching from the start
      • Impact of file size on performance
      • Need for ordered records
    • What are the key considerations when implementing hashing algorithms in random files?
      • Design of the hashing algorithm
      • Efficiency of calculating the address
      • Impact of collisions on performance
    See similar decks