Eduqas A-Level Computer Science A500QS
Data Structures: Arrays, Records and Hash Tables
Stacks, Queues, Linked Lists and Trees
Boolean Logic and Simplification
Algorithms, Pseudo-Code and Programming Constructs
Variables, Scope, Parameters and Identifiers
Recursion and Modular Programming
Sorting Algorithms
Searching and Shortest-Path Algorithms
Big O Notation and Algorithm Efficiency
Validation, Verification and Testing
Data Compression
Programming Paradigms and Computer Languages
Systems Analysis, Maintenance and Documentation
System Design and Human-Computer Interaction
Software Engineering Tools and Translators
Computing, Society and the Law
Computer Architecture, the Processor and Assembly Language
Input, Output and Secondary Storage
Networks, Protocols and the Internet
Data Transmission and Network Performance
Number Systems and Binary Arithmetic
Data Types, Characters and Floating Point
Files, Records and File Organisation
Databases, Normalisation and Entity Modelling
SQL, Big Data and Distributed Systems
The Operating System and Its Modes
Interrupts, Memory Management and Scheduling
Types of Software System
Data Security, Cryptography and Attack
Files, Records and File Organisation
Direct access and hashing algorithms
- 3 things to know
- Component 2
Overview
Direct file access and hashing algorithm.
What you need to know
Answer each one before you reveal it.
What is a hashing algorithm?
Describe a simple modulo hashing algorithm.
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is direct file access?
Model answer
Direct access calculates the storage address of a record from its key. Any record can then be reached in one operation, whatever its position.
- 2
What is a hashing algorithm?
Model answer
A hashing algorithm is a calculation that turns a record key into a storage address. The same key always produces the same address, so the record can be found again.
- 3
Describe a simple modulo hashing algorithm.
Model answer
The key is divided by the number of available addresses and the remainder is taken. A key of 3,127 with 1,000 addresses hashes to address 127.
- 4
Why is a prime number often used as the divisor in a modulo hash?
Model answer
A prime divisor spreads keys more evenly, because it shares fewer factors with patterned key values. Clustering at a few addresses is therefore reduced.
- 5
What is a collision?
Model answer
A collision happens when two different keys hash to the same address. Only one record can occupy the address, so the second must be placed elsewhere.
- 6
Give two properties of a good hashing algorithm.
Model answer
A good algorithm spreads keys evenly across the whole address space. The calculation must also be fast, because it runs on every access.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Files, Records and File Organisation, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.