Computer Science for IGCSE & O level - Databases (Section 2)

1
Which type of validation check could be used to ensure that a date entered is not in the future?
Answer
(C)
Range check
2
What is a database schema?
Answer
A
C
3
What is the main advantage of storing data in a database compared to storing it in separate files?
Answer
A
B
C
4
What SQL command is used to filter records based on a condition?
Answer
(B)
WHERE
5
Which SQL command is used to retrieve data from a table?
Answer
(C)
SELECT
6
Which data type would be most appropriate for storing a yes/no value?
Answer
(C)
Boolean
7
Which of the following are common data types used in databases?
Answer
A
B
C
D
8
What is a 'field' in a database table?
Answer
(C)
A column in a database table.
9
What is the correct SQL syntax to sort results in descending order?
Answer
(C)
ORDER BY field DESC
10
Which data type would be most appropriate for a 'TelephoneNumber' field in a database?
Answer
(B)
Short Text
11
What type of data is most often represented in a 'VARCHAR' data type?
Answer
(C)
Variable-length text
12
Which SQL clause is used to order the results of a query?
Answer
(B)
ORDER BY
13
What does the 'Format check' validation rule usually verify?
Answer
(B)
The content of the data matches a required pattern.
14
Which of the following is NOT a basic data type commonly used in databases?
Answer
(C)
Image
15
What is the term for a structured collection of data that allows people to extract information in a way that meets their needs?
Answer
(B)
Database
16
What is the purpose of an Input Mask?
Answer
(B)
To control the format of the data input.
17
Which statement is true about data types in a database?
Answer
(C)
Each field requires a data type to ensure correct storage and handling of data.
18
Which SQL command would you use to display the contents of a table?
Answer
(C)
SELECT * FROM table_name;
19
What does the acronym SQL stand for?
Answer
(A)
Structured Query Language
20
What SQL command is used to add a new primary key to a table?
Answer
(C)
ALTER TABLE... ADD PRIMARY KEY
21
In the provided examples, what does the 'N' indicate in the context of 'Seat materials' and 'Car paint colours'?
Answer
(A)
Not available
22
In a database table, what do records consist of?
Answer
(A)
Fields
23
What is a key characteristic of a relational database?
Answer
(B)
Data is organized into tables with relationships between them.
24
What does the term 'normalization' refer to in database design?
Answer
(B)
The process of organizing data to reduce redundancy and improve integrity.
25
What is the role of the `HAVING` clause in an SQL query?
Answer
(B)
To filter aggregated data after the `GROUP BY` clause.
26
What are the advantages of using indexes in a database?
Answer
A
D
27
What is the role of a database transaction?
Answer
(A)
To combine multiple queries into a single operation, ensuring atomicity and consistency.
28
What is meant by the term 'record' in the context of a database?
Answer
(B)
A single row of data in a table.
29
Which of the following is an example of a validation rule for a text field?
Answer
(D)
All of the above.
30
What is the purpose of an `ORDER BY` clause in an SQL query?
Answer
(B)
To sort the results of the query.
31
Which SQL command is used to insert new data into a table?
Answer
(C)
INSERT
32
Which of the following could be used as a primary key?
Answer
A
B
D
33
Which of the following data types would be best suited for storing a patient's date of birth?
Answer
(C)
Date/Time
34
Which of the following is an example of a NoSQL database?
Answer
(C)
MongoDB
35
Which of the following statements are true about a foreign key?
Answer
B
C
D
36
Which of the following is NOT a common operation in a relational database?
Answer
(D)
Compile a program.
37
What does the term 'database schema' refer to?
Answer
(B)
The structure and organization of a database.
38
Which of the following is NOT a valid benefit of using databases?
Answer
(C)
Data access is restricted to administrators only.
39
What is a database schema?
Answer
(B)
The structure and design of the database, including tables and relationships.
40
What is referential integrity in a database?
Answer
(B)
The consistency of relationships between tables.
41
Which data type would be suitable for storing a student's GPA (Grade Point Average), which might include decimal values?
Answer
(D)
DECIMAL
42
What is a primary key used for in a database table?
Answer
(B)
To uniquely identify each record in the table.
43
What is the purpose of a 'foreign key' in a database?
Answer
(B)
To create relationships between tables.
44
What is data redundancy, and why is it undesirable in a database?
Answer
(A)
Data redundancy is the same data stored in multiple places, leading to inconsistencies and increased storage requirements.
45
Which of the following is a typical function of a database management system (DBMS)?
Answer
A
B
C
46
In a relational database, what does referential integrity ensure?
Answer
(C)
That relationships between tables are maintained.
47
What are the benefits of data normalization in database design?
Answer
A
B
C
48
What is the benefit of a 'many-to-many' relationship?
Answer
(C)
It allows efficient modeling of complex relationships between entities.
49
What is the purpose of data validation in a database?
Answer
(C)
To maintain the data integrity by ensuring accurate and consistent data.
50
What does the acronym SQL stand for?
Answer
(A)
Structured Query Language