CXC - Caribbean Examinations Council Information Technology: Database Management Questions and Answers — Questions and Answers
Question 1: In a relational database for a school, the 'Students' table needs a field that uniquely identifies each student. Which type of key should be used for the 'StudentID' field?
- Foreign Key
- Primary Key (Correct answer)
- Composite Key
- Sort Key
Correct answer: Primary Key
A primary key is a field in a table that uniquely identifies each record in that table. The 'StudentID' would be unique for every student, making it the perfect primary key.
Question 2: A database administrator needs to create a new table to store information about suppliers. Which of the following SQL commands belongs to the Data Definition Language (DDL) and would be used for this task?
- INSERT
- UPDATE
- SELECT
- CREATE (Correct answer)
Correct answer: CREATE
Data Definition Language (DDL) commands are used to define and manage the structure of the database. The 'CREATE TABLE' command is the standard DDL statement for building a new table. INSERT, UPDATE, and SELECT are Data Manipulation Language (DML) commands used for managing the data within the tables.
Question 3: A hospital database has a 'Patients' table and a 'Doctors' table. To establish a many-to-many relationship showing which doctors have treated which patients, a third table called 'Treatments' is created. This 'Treatments' table contains both 'PatientID' and 'DoctorID'. In the 'Treatments' table, 'PatientID' is an example of a:
- Candidate Key
- Super Key
- Foreign Key (Correct answer)
- Primary Key
Correct answer: Foreign Key
A foreign key is a field in one table that refers to the primary key in another table. In this scenario, 'PatientID' in the 'Treatments' table refers back to the primary key of the 'Patients' table, thereby creating a link between them.
Question 4: Which of the following is a primary function of a Database Management System (DBMS)?
- Creating graphical assets for a user interface.
- Compiling program code into an executable file.
- Enforcing data security and user access control. (Correct answer)
- Providing an operating system for a server.
Correct answer: Enforcing data security and user access control.
A key function of a DBMS is to provide a security system that controls user access and enforces data privacy. This ensures that only authorized users can perform specific operations (like read, write, or delete) on the data.
Question 5: The process of organizing data in a database to reduce redundancy and improve data integrity by creating smaller, well-structured tables is known as:
- Normalization (Correct answer)
- Validation
- Encryption
- Indexing
Correct answer: Normalization
Normalization is the systematic process of organizing tables and columns in a relational database to minimize data redundancy and prevent data anomalies (like insertion, update, and deletion anomalies).
Question 6: A database field is intended to store whether a customer has subscribed to a newsletter. The only possible values are 'Yes' or 'No'. Which of the following data types is the MOST efficient and appropriate for this field?
- Text/Varchar
- Number/Integer
- Date/Time
- Boolean/Logical (Correct answer)
Correct answer: Boolean/Logical
The Boolean (or Logical) data type is specifically designed to store one of two values, typically representing true/false, yes/no, or on/off. It is the most memory-efficient choice for this type of binary data.
In a relational database for a school, the 'Students' table needs a field that uniquely identifies each student.
Which type of key should be used for the 'StudentID' field?