Programming - data structures Flashcards

1
Q

What is a data structure?

A

A data structure is an organisation that data fits into. Different structures are used for particular purposes and choosing the correct data structure is an important part of designing a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are records?

A

Records are like a database they use tables and fields.

A database is a collection of data.

Data about one topic is stored in a table. e.g. information
about all of the students in a school

A row in a table that stores data about a single item is a record. e.g information about one student.

The columns in a table store categories that are called fields, Name, Address, Gender, and Date of Birth.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are arrays?

A

An array is a type of variable that can hold several values (unlike a normal variable which can only hold one at a time, e.g. score = 3). In simple terms they can be though of as tables with a number of rows and columns.

Each piece of data in an array is referred to by a number, which starts at 0 and marks the position of the data.

The dimensions of the array are the different groups of data stored, e.g. 1D array has one group of data, 2D has two related groups, 3D has three related groups

How well did you know this?
1
Not at all
2
3
4
5
Perfectly