Photo AI

4.1 Explain what a relational database is - NSC Information Technology - Question 4 - 2018 - Paper 2

Question icon

Question 4

4.1-Explain-what-a-relational-database-is-NSC Information Technology-Question 4-2018-Paper 2.png

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

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

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

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

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

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

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

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

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

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

Answer

SELECT tblStudents.StudentNumber, Count(ISBN) AS NumberBorrowed FROM tblStudents, tblBooksBorrowed WHERE tblStudents.StudentNumber = tblBooksBorrowed.StudentNumber GROUP BY tblStudents.StudentNumber HAVING (NumberBorrowed > 2);

Join the NSC students using SimpleStudy...

97% of Students

Report Improved Results

98% of Students

Recommend to friends

100,000+

Students Supported

1 Million+

Questions answered

;