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. 4.1.2 Explain why record locking is necessary when different staff members are working on the same table in the database.... 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

Explain what a relational database is.

96%

114 rated

Answer

A relational database is a type of database that stores data in structured tables. Each table consists of rows and columns, where columns define the data fields and rows contain the records. These tables can be linked to each other through relationships, allowing for efficient data organization and retrieval.

Step 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 essential to prevent changes from being lost when multiple users are accessing the same data. If a record is locked, it ensures that only one user can make changes to it at a time, thereby avoiding conflicts and ensuring data integrity.

Step 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

  1. Setup user accounts and permissions to control access to the database.
  2. Monitor database performance to ensure efficient operation and identify any issues that may arise.

Step 4

Explain what a primary key is in this context.

98%

120 rated

Answer

In this context, a primary key is a unique identifier for each record in the tblStudents table. It ensures that each student can be individually identified and prevents duplicate entries in the database.

Step 5

What is the StudentNumber field in the tblBooksBorrowed table called in terms of the relationship between the tables?

97%

117 rated

Answer

The StudentNumber field in the tblBooksBorrowed table is referred to as a foreign key. It creates a link to the primary key in the tblStudents table, establishing a relationship between the two tables.

Step 6

What is meant by a composite primary key?

97%

121 rated

Answer

A composite primary key is a combination of two or more fields in a table that, together, uniquely identify a record. This means that no single field alone can ensure uniqueness, but the combination does.

Step 7

Identify and motivate the specific relationship that exists between the tblStudents and tblBooksBorrowed tables.

96%

114 rated

Answer

The relationship between the tblStudents and tblBooksBorrowed tables is a one-to-many relationship. This means that one student can borrow multiple books, while each book record in tblBooksBorrowed is associated with only one student.

Step 8

Why was referential integrity enforced when the relationship between the tables was created?

99%

104 rated

Answer

Referential integrity was enforced to ensure that any StudentNumber in the tblBooksBorrowed table corresponds to an existing StudentNumber in the tblStudents table. This prevents orphaned records and maintains the accuracy and consistency of the data.

Step 9

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

Write an SQL statement to display the student number and number of books borrowed of all the students who have more than two books borrowed.

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

;