2.2.3(c) Records Flashcards
1
Q
records stored in text files = (6 things)
A
- stored on secondary storage
- used to store data when the application is closed
- useful for small volumes of data eg.configuration files
- each entry is stored on a new line or separated with an identifier such as a comma or tab
- can require a linear search to find/read data which is slow (if there is no order to data or record structure)
- structured text files eg. CSV, XML & JSON are popular for storing and exchange data between applications
2
Q
records stored in arrays and lists (6 things)
A
- stored in RAM
- used to store data when a program is running
- useful for small volumes or data an algorithm is using
- can be single or multi-dimensional allowing for table of data to be stored
- uses indexes to refer to data items
- efficiency algorithms or linear searches can be used to find data
3
Q
records stored in databases (7 things)
A
- often stored on remote servers
- often used to store data shared by many users eg. ticket booking system
- data is stored in records and fields
- uses advanced data structures to store data efficiently
- uses very efficient algorithms to search and sort data executed on the servers
- more secure than text files
- the order of fields in database in independent of the code
4
Q
record structure (5 things)
A
- a collection of related fields
- a field is a variable
- each field in a record can have a different data type
- there are 3 steps in making use of record structures:
- what fields will be in the record
- declare a variable or array to use with the record structure
- assign and retrieve data from the variable record
- be careful to note the dot syntax when using records : records<dot> field eg.car1.Make</dot>