A database is used at a mall to store details of stores, staff, clients and other information - NSC Information Technology - Question 4 - 2021 - Paper 2
Question 4
A database is used at a mall to store details of stores, staff, clients and other information. A staff member can work at only one store. One of the tables is called... show full transcript
Worked Solution & Example Answer:A database is used at a mall to store details of stores, staff, clients and other information - NSC Information Technology - Question 4 - 2021 - Paper 2
Step 1
4.1.1 Explain the purpose of a primary key.
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The purpose of a primary key is to uniquely identify each record in a table. This ensures that every entry can be referenced distinctly, which helps maintain data integrity and facilitates efficient data retrieval.
Step 2
4.1.2 Give a reason why using the DateOpened as a primary key may be inappropriate.
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Using DateOpened as a primary key may be inappropriate because multiple stores can open on the same date, leading to duplicate entries. A primary key should be unique to each record.
Step 3
4.1.3 Recommend a more suitable primary key for the table tblStores, that could have been included in the tblStores table.
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
A more suitable primary key for the tblStores table could be StoreID, which would provide a unique identifier for each store, ensuring there are no duplicates.
Step 4
4.2.1 Explain the term normalisation.
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Normalisation is the process of organizing data in a database to reduce redundancy and improve data integrity. It involves dividing large tables into smaller, related tables and defining relationships between them to eliminate data anomalies.
Step 5
4.2.2 Why does the inclusion of the NumYearsOpen field violate normalisation rules?
97%
117 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Including the NumYearsOpen field violates normalisation rules because it is derived from the DateOpened field. In a normalized table, all data should be stored in atomic form, and derived values should not be included to avoid redundancy.
Step 6
4.3 Name TWO validation tests that can be performed on the DateOpened field when data is entered into the field.
97%
121 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Format Validation: Ensure the date is in the correct format (e.g., YYYY-MM-DD).
Future Date Check: Validate that the entered date is not set in the future.
Step 7
4.4.1 Describe the relationship between the tables using a suitable action verb.
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
The relationship between the tables can be described as the STORE 'employs' STAFF.
Step 8
4.4.2 What is the type of relationship between the STORE entity and the STAFF entity? Choose the answer and write only the letter (A–C) next to the question number, e.g. 4.4.2 D.
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
B
Step 9
4.5.1 A primary key and a foreign key to establish a relationship between two tables must have the exact same field name in both tables.
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
false
Step 10
4.5.2 Data saved in a foreign key field in a table can contain duplicates.
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
true
Step 11
4.5.3 Referential integrity can be applied in a single table.
97%
117 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
true
Step 12
4.5.4 Database redundancy can lead to database anomalies.
97%
121 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
true
Step 13
4.5.5 An advantage of data independence is that multiple applications can interface to the same data, as the physical structure of the database is independent of the application.
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
true
Step 14
4.6 Give TWO reasons why the outdated records need to be transformed before it is combined with the data in the data warehouse.
99%
104 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Data Standardization: To ensure that the outdated records match the format of current data, making it easier to analyze and use.
Data Compression: To limit the size of the data, ensuring efficient storage and faster retrieval in the data warehouse.
Step 15
4.7 Why are these records flagged as deleted and not removed from the database?
96%
101 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Records are flagged as deleted to allow for potential recovery if needed. This helps maintain historical data and provides options for auditing.
Step 16
4.8 State TWO potential problems in using a single centralised database serving a large number of connected users and requests.
98%
120 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Performance Issues: High traffic can slow down the database, affecting response times for users.
Single Point of Failure: If the central database goes down, all connected applications will lose access to the data.
Step 17
4.9 List TWO ways of preventing an SQL injection attack on the database by hackers.
97%
117 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Input Validation: Ensure all data inputs are sanitized and validated to prevent malicious data from executing SQL commands.
Use Parameterized Queries: Always utilize prepared statements and parameterized queries to separate SQL code from input data.
Step 18
4.10.1 Define the term online data collection.
97%
121 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
Online data collection refers to the process of gathering data through electronic means, where information is processed immediately or in real-time using digital tools.
Step 19
4.10.2 Give ONE example of online data collection at the pay point in a supermarket AND explain how the data can be used for the benefit of the supermarket.
96%
114 rated
Only available for registered users.
Sign up now to view full answer, or log in if you already have an account!
Answer
One example of online data collection at the pay point is when customers use a loyalty card. This data can be used to analyze purchasing habits, allowing the supermarket to tailor marketing strategies and improve customer experience.