OCR H446, section 1.3.2 (b)
Data goes through a life cycle: it is captured, selected and managed, and often exchanged with other systems. Each stage must be done carefully, because poor quality data gives poor results ("garbage in, garbage out").
Capturing data
Capturing data means getting it into the system.
| Method | Examples |
|---|---|
| Manual entry | Typing into forms (web forms, data entry screens) |
| Automatic capture | Sensors (temperature, GPS), barcode and RFID readers, card readers |
| Scanning | Optical mark recognition (OMR) for exam answer sheets and surveys, optical character recognition (OCR) to read printed text |
| Online collection | Questionnaires, web forms, logs of user activity (clicks, purchases) |
| Importing | Receiving data from other systems and files |
Design a good data capture form so the data is accurate: clear labels, drop-down lists and tick boxes instead of free text where possible, and validation.
Validation and verification
- Validation checks that the data is reasonable and in the right form. It can't prove that it is correct. Examples:
- range check: age between 0 and 120;
- type check: a number where a number is expected;
- length check: a postcode of the right length;
- format check: a date as DD/MM/YYYY;
- presence check: a required field isn't blank;
- lookup check: the value is in a list of allowed values.
- Verification checks that the data has been entered correctly and matches the source. Examples: double entry (type it twice and compare), and proofreading.
Selecting data
Selecting means choosing the data that is needed from the whole set. In a database this is done with queries (SQL, 1.3.2 (d)), which filter by conditions, sort the results, and combine tables.
- Selecting only what is relevant avoids overload, and speeds up processing.
- It is also about choosing what to collect in the first place: only the data that has a purpose. (Collecting less personal data also protects privacy, see 1.5.1 (a).)
Managing data
Managing data means looking after it so that it stays accurate, available and secure. A database management system (DBMS) helps with:
- Storage and organisation: tables, keys and indexes.
- Integrity: keeping the data correct and consistent, using keys, validation and referential integrity (1.3.2 (e)).
- Security: user accounts, access rights (who can view or change what), and encryption.
- Backup and recovery: regular copies, so that data can be restored after a failure.
- Concurrent access: letting many users work at once without clashes (record locking, 1.3.2 (f)).
- Maintenance: updating, archiving, and deleting data that is out of date or no longer needed.
- Data quality: removing duplicates and fixing errors.
Exchanging data
Exchanging data means transferring it between different systems, such as between a school's database and an exam board, or between a shop and a bank. For this to work, the systems must agree on a format and a method.
Common formats
| Format | Description | Example |
|---|---|---|
| CSV (comma separated values) | Plain text, one record per line, values separated by commas. Simple and small, but no structure beyond rows and columns | Asha,12,Maths |
| XML (extensible markup language) | Text with tags that describe the data. Self-describing and can represent complex, nested data | <student><name>Asha</name></student> |
| JSON (JavaScript object notation) | Text of name and value pairs. Compact and easy for programs to read. Widely used by web services | {"name": "Asha", "year": 12} |
CSV: name,year,subject
Asha,12,Maths
JSON: {"name": "Asha", "year": 12, "subject": "Maths"}
XML: <student>
<name>Asha</name><year>12</year><subject>Maths</subject>
</student>
Methods
- Files sent by email or uploaded.
- APIs (application programming interfaces): one system requests data from another over the Internet and gets a response, usually in JSON or XML.
- Direct database connections between systems.
- Electronic data interchange (EDI) standards between businesses.
Issues when exchanging data
- Compatible formats: both sides must understand the format and structure. Agreed standards help.
- Security: the data should be encrypted in transit, and only sent to authorised parties.
- Accuracy: validate data as it arrives, since the sender's system may have different rules.
- Legal issues: personal data may only be shared where the law allows it (see 1.5.1 (a)).
Worked example
Task: a school collects pupils' contact details with a paper form and then types them into its database. Suggest improvements for capturing and managing the data.
- Capture: replace the paper form with an online form, with drop-down lists and validation (for example a format check on the phone number and a presence check on required fields), so errors are caught at once. Parents could also verify their details on a screen before submitting.
- Selecting: collect only the data the school needs.
- Managing: store the data in a relational database with access rights, so only authorised staff see it, take regular backups, and delete details of pupils who have left.
- Exchanging: to send the data to the local authority, export it as a CSV or XML file, encrypted while it is sent.
Exam tip: be clear about the difference between validation (is it reasonable?) and verification (is it the same as the source?). Name the methods and formats you would use (such as a range check, or JSON), and link them to the scenario.
Check yourself
What is the difference between validation and verification?
Validation checks that data is reasonable and in the right form, but can't prove it is correct. Verification checks that data has been entered correctly, matching the source, for example by double entry.
Give two methods of automatically capturing data
Any two of: sensors; barcode readers; RFID; card readers; optical mark recognition; optical character recognition.
Give two formats used to exchange data between systems
Any two of: CSV, XML, JSON.
Give one thing a database management system does to manage data
Any one of: controls access with user accounts and permissions; keeps data consistent and valid; takes backups; allows many users at once safely; helps with maintaining and deleting old data.