levo

Data Structures

Records and fields

  • 3 things to know
  • AS Unit 1
Start revising · £5/month

Overview

Key field and record type definition.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Give a suitable record structure for a book in a library system.

Key term

Why is a record better than several parallel arrays for describing one entity?

Key term

How does a record differ from an array?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    Define a record.

    Model answer

    A record is a composite data structure that groups several related items, called fields, under one identifier, and those fields may each be of a different data type.

  2. 2

    How does a record differ from an array?

    Model answer

    An array holds many items of one single type reached by their position, while a record holds a fixed set of named items that may each be of a different type.

  3. 3

    Give a suitable record structure for a book in a library system.

    Model answer

    It could hold a catalogue number as a string, a title as a string, an author as a string, the year of publication as an integer and a flag as a Boolean showing whether it is out on loan.

  4. 4

    How is one field of a record referred to in a program?

    Model answer

    By naming the record variable and the field, usually separated by a full stop, as in book.title.

  5. 5

    What is a key field?

    Model answer

    A key field is one whose value identifies a single record uniquely within the collection, such as a membership number.

  6. 6

    Why must a key be a value that neither repeats nor changes?

    Model answer

    If two records could share it the wrong one might be retrieved, and if it could change the record could no longer be found by the value already recorded elsewhere.

Other ways to work this

The same content, four other ways.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

Fetch, , execute.
decodecompilestore

Blank Blitz consolidates the facts

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

A bit is a single binary digit.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Data Structures, on a schedule.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.