4.1 Explain what a relational database is - NSC Information Technology - Question 4 - 2018 - Paper 2
Question 4
4.1 Explain what a relational database is.
A relational database is a database consisting of different tables which are linked with relationships.
4.1.2 Explain wh... show full transcript
Worked Solution & Example Answer:4.1 Explain what a relational database is - NSC Information Technology - Question 4 - 2018 - Paper 2
Step 1
4.1 Explain what a relational database is.
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
A relational database is a database consisting of different tables which are linked with relationships.
Step 2
4.1.2 Explain why record locking is necessary when different staff members are working on the same table in the database.
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
Record locking is required to prevent changes made by one of the staff members from being lost. If the record is locked, only one user may be allowed to make changes to the content of the record. Accessing the same record at the same time can corrupt data, and anomalies may occur, ensuring that the data remains consistent.
Step 3
4.1.3 Besides planning and creating a database, name TWO other tasks that a database administrator has to perform as part of his/her duties.
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
Two responsibilities of a database administrator can include setting up user accounts and user rights and monitoring the workings of the database.
Step 4
4.2.1 Explain what a primary key is in this context.
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
A primary key refers to a field that makes it possible that the record can be uniquely identified.
Step 5
4.2.2 What is the StudentNumber field in the tblBooksBorrowed table called in terms of the relationship between the tables?
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
It is referred to as a foreign key.
Step 6
4.2.3 What is meant by a composite primary key?
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
It means that the primary key can consist of more than one field.
Step 7
4.2.4 Identify and motivate the specific relationship that exists between the tblStudents and tblBooksBorrowed tables.
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 is one to many; one student can borrow many books.
Step 8
4.2.5 Why was referential integrity enforced when the relationship between the tables was created?
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
To ensure that a record on the one (tblStudents) side of the relationship cannot be deleted if it is linked to records on the many (tblBooksBorrowed) side of the relationship. A new record cannot be entered on the many (tblBooksBorrowed) side of a table without a corresponding record on the one (tblStudents) side of the relationship.
Step 9
4.2.6 (a) Write an SQL statement to display the name, surname and funds available of all the students with R30 or less in their account.
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
SELECT StudentName, StudentSurname, FundsAvailable
FROM tblStudents
WHERE FundsAvailable <= 30;
Step 10
4.2.6 (b) Write an SQL statement to display the student number and number of books borrowed of all the students who have more than two books on their account.
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
SELECT tblStudents.StudentNumber,
Count(ISBN) AS NumberBorrowed
FROM tblStudents, tblBooksBorrowed
WHERE tblStudents.StudentNumber = tblBooksBorrowed.StudentNumber
GROUP BY tblStudents.StudentNumber HAVING (NumberBorrowed > 2);