Computer Science for IGCSE & O level - Databases (Section 6)
1
Which clause is used to sort the records in an SQL query?
2
What is the purpose of a validation rule for a field?
Answer(B)
To ensure data accuracy and consistency
3
Which SQL command is used to remove a table from a database?
4
Which of the following is an example of a data type?
5
What is the benefit of using a database system over a simple file system for storing data?
Answer(B)
Databases offer better data organization, data integrity, and allow for more efficient data retrieval.
6
What does the term 'data warehousing' refer to?
Answer(C)
A system for storing and analyzing large volumes of historical data.
7
What is the purpose of the `GROUP BY` clause in SQL?
Answer(C)
To combine rows with the same values in a specified column into a summary row.
8
Which SQL command is used to change existing data in a table?
9
What is the purpose of the `GROUP BY` clause in an SQL query?
Answer(C)
To combine rows that have the same values in one or more columns into a summary row.
10
What are the benefits of using a database?
11
In a database, what does the term 'field' represent?
Answer(B)
A single item of data within a record.
12
What is the purpose of a SQL script?
Answer(B)
To perform a task on a database.
13
What is the main function of a database management system (DBMS)?
Answer(C)
To manage and organize data.
14
What is the main function of a 'query' in a database?
Answer(B)
To retrieve or manipulate data.
15
What is the purpose of the 'WHERE' clause in an SQL query?
Answer(C)
To filter the results based on specified criteria.
16
What is a transaction in the context of databases?
Answer(B)
A logical unit of work that is treated as a single operation.
17
What is a database index used for?
Answer(A)
To speed up data retrieval.
18
What is the purpose of the `ROLLBACK` statement in a database transaction?
Answer(B)
To discard the changes made during a transaction and restore the database to its previous state.
19
What is a primary key used for in a database table?
Answer(B)
To ensure the unique identification of each record in the table.
20
What is a transaction in a database context?
Answer(B)
A sequence of operations performed as a single unit of work.
21
What is the primary function of the `GROUP BY` clause in SQL?
Answer(C)
To aggregate data based on one or more columns.
22
What is a field in a database table?
Answer(B)
The individual piece of information stored in a database.
23
Which of the following is an example of a database relationship?
24
What is the purpose of the `FROM` clause in an SQL statement?
Answer(B)
To identify the table(s) from which to retrieve data.
25
What is data redundancy in a database?
Answer(B)
The duplication of data within the database.
26
Which of the following are part of the ACID properties?
27
Which keyword is used to add a primary key to a table?
Answer(B)
ALTER TABLE ... ADD PRIMARY KEY
28
In the context of a database table, what is a 'field' also known as?
29
Which of the following data types would be most appropriate for storing a person's date of birth?
30
Which of the following is a type of database relationship?
31
Which components must be set up in database?
32
What is the role of a 'data type' in a database?
Answer(B)
To determine how data is stored and displayed.
33
What is the purpose of using a database management system (DBMS)?
34
Which of the following is a key component of database design?
35
In an SQL query, what does the `NULL` value represent?
Answer(C)
A missing or unknown value.
36
Which of the following is an example of a DDL command?
37
What does ACID properties stand for in database transaction?
Answer(A)
Atomicity, Consistency, Isolation, Durability
38
In SQL, what does the `UPDATE` statement allow you to do?
39
What does a database table store?
Answer(B)
Data organized in rows and columns.
40
Which command is used to insert new data into a database table?
41
What type of data should be stored in a column with the data type `VARCHAR`?
Answer(C)
Text strings of varying lengths.
42
What is a foreign key used for?
43
What are the purposes of using indexes in a database?
Answer(A)
To speed up data retrieval
44
Which of the following is a key advantage of using a relational database?
Answer(C)
Ease of data retrieval and manipulation.
45
Which factors should be considered when choosing a data type for a database field?
46
What does the acronym DDL stand for in the context of databases?
47
What is the purpose of `JOIN` command in SQL?
Answer(C)
To combine rows from two or more tables based on a related column.
48
What is the main goal of the validation rules?
49
Which of the following is often used to identify multiple records in a relational database?
50
What is the purpose of a 'constraint' in a database?
Answer(B)
To enforce rules and restrictions on data.