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.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
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.
Exam-style practice questions
Practice questions written in the style of QCAA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
QCAA 20227 marksA canteen app stores each menu item as a record with name, price and a stock count. Justify the choice of an array of records to hold the full menu, and use pseudocode to symbolise reading the menu and outputting the name and price of every item that is in stock.Show worked answer →
A 7 mark justify-and-symbolise answer rewards a defended structure choice plus a correct traversal.
Justify: each item has several related fields, so a record groups them as one unit; the menu is a list of like items, so an array (or list) of records stores the whole menu and allows iteration by index. This is more appropriate than parallel arrays, which can fall out of step.
Symbolise the traversal:
FOR i = 0 TO menu.length - 1
IF menu[i].stock > 0 THEN
OUTPUT menu[i].name, menu[i].price
END IF
END FOR
Markers reward the record-plus-array justification, a correct loop over the array, dotted field access, and the in-stock selection.
QCAA 20234 marksAnalyse the difference between a fixed-size array and a list (dynamic array) and recommend which is more appropriate when the number of records is unknown until run time.Show worked answer →
A 4 mark analyse-and-recommend answer needs the size contrast and a justified choice.
A fixed-size array has its length set when declared, so it is efficient but wastes space if over-sized and fails if the data exceeds it. A list (dynamic array) grows and shrinks at run time, trading a little overhead for flexibility.
When the count is unknown until run time, recommend the list, because it adapts to however many records arrive without risking overflow or wasted capacity. Markers reward the fixed-versus-dynamic distinction and a recommendation justified by the unknown size.
