Skip to main content
QLDDigital SolutionsSyllabus dot point

How are data structures chosen and used to organise data inside a digital solution?

Select and use appropriate data structures, including variables, one-dimensional arrays and lists, and records, to organise and manipulate data within a programmed solution

A focused answer to the QCE Digital Solutions Unit 3 dot point on data structures. Variables and primitive types, one-dimensional arrays and lists, records and dictionaries, and how to choose the right structure for the data a solution must store and process.

Generated by Claude Opus 4.76 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. Variables and primitive types
  3. One-dimensional collections: arrays and lists
  4. Records and dictionaries
  5. Matching the structure to the data
  6. How structures connect to the database

What this dot point is asking

QCAA wants you to choose data structures that fit the data a solution handles, then use them correctly in code. The syllabus names variables, one-dimensional collections (arrays and lists) and records as the core structures. A data structure is a way of organising values in memory so the program can store, find and update them efficiently. Picking the wrong structure makes algorithms longer and slower, so this dot point underpins both IA1 design and IA2 implementation.

Variables and primitive types

A variable is a named container for a single value of a given type. The common primitive types are integer, real (float), Boolean, character and string. Choosing the right type matters: storing a phone number as an integer drops leading zeros, so a string is correct. Type also controls which operations are valid, because you can add integers but you concatenate strings.

student_count = 24          # integer
average_mark = 71.5         # real / float
is_enrolled = True          # Boolean
postcode = "4000"           # string, not integer

One-dimensional collections: arrays and lists

When you have many values of the same kind, a single collection is far better than dozens of separate variables. A one-dimensional array or list stores an ordered sequence accessed by a zero-based index. You can loop over it, search it and update individual elements.

marks = [58, 71, 84, 63, 90]
total = 0
for mark in marks:          # iterate the collection
    total += mark
average = total / len(marks)   # 73.2
print(marks[2])                # 84  (index starts at 0)

A list lets you store, traverse and aggregate repeated data with one loop, which is exactly why the accumulator and min/max patterns from the algorithms dot point operate over collections.

Records and dictionaries

A record (often a dictionary in Python) groups several named fields that describe one thing. Where an array holds many values of the same type, a record holds one value of each of several types under field names.

student = {
    "id": 1042,
    "name": "Priya Nguyen",
    "year": 12,
    "enrolled": True
}
print(student["name"])      # Priya Nguyen

Combining the two gives the structure most real solutions use: a list of records, which maps directly onto rows in a database table.

students = [
    {"id": 1042, "name": "Priya", "mark": 84},
    {"id": 1043, "name": "Sam",   "mark": 67}
]
for s in students:
    print(s["name"], s["mark"])

Matching the structure to the data

The selection logic is straightforward:

  • One value that changes over time, use a variable.
  • Many values of the same kind in order, use an array or list.
  • Several named attributes of one entity, use a record or dictionary.
  • Many entities each with attributes, use a list of records.

This choice is part of your IA1 data dictionary and your justification. QCAA expects you to name the structure, state why it suits the data and show it interacting with the user interface and the database.

How structures connect to the database

Data structures in code are the in-memory mirror of the relational tables you design for the databases and SQL dot point. A record maps to a table row, a field maps to a column, and a list of records maps to a result set returned by an SQL SELECT. Designing them to match keeps the data flowing cleanly between the interface, the program and the stored data.