Computer Science for IGCSE & O level - Databases (Section 4)
1
In the context of database design, what is the primary purpose of a primary key?
პასუხი(B)
To uniquely identify each record in a table.
2
What is the purpose of a primary key in a database table?
პასუხი(B)
To uniquely identify each row (record) in the table.
3
What does the SQL command `COUNT(*)` do?
პასუხი(B)
Counts the total number of rows in a table.
4
Which of the following are valid types of relationships that can exist between tables in a database?
5
Which SQL statement is used to add a new column to a table?
პასუხი(B)
ALTER TABLE ... ADD COLUMN
6
Which of the following is NOT typically a component of a database system?
პასუხი(D)
The operating system kernel.
7
Which command is used to remove data from a table?
8
What is the role of fields in the context of databases?
პასუხი(C)
To define individual pieces of data within a record.
9
What is a 'join' in SQL used for?
პასუხი(A)
To combine data from two or more tables
10
Which keyword is used in SQL to retrieve all columns from a table?
11
Which of the following is an advantage of using a database system?
12
Which are the benefits of using SQL?
13
Which of the following statements is true about indexes in database?
პასუხი(B)
Indexes speed up data retrieval.
14
What is the main advantage of using databases?
პასუხი(B)
Databases prevent problems because if any changes or additions are made it only has to be done once.
15
What are the characteristics of a primary key?
პასუხი(C)
It uniquely identifies each record in a table.
16
Which is used to ensure data consistency?
17
Which of the following is a characteristic of a well-designed database?
პასუხი(C)
Efficient data retrieval.
18
Which data type would be used to store true/false values?
19
What is the difference between `TRUNCATE` and `DELETE` statements?
პასუხი(A)
TRUNCATE is faster and removes all rows, while DELETE is slower and removes specific rows.
20
What does the acronym SQL stand for?
პასუხი(B)
Structured Query Language
21
What is the purpose of the HAVING clause in SQL?
პასუხი(A)
To filter rows based on conditions applied to aggregate functions.
22
Which component of an SQL command specifies the table to retrieve data from?
23
In the context of a database, what does 'record' refer to?
24
What is the main purpose of using a database management system (DBMS)?
პასუხი(B)
To manage and organize data efficiently.
25
Which SQL statement is used to update data in a table?
26
What is data normalization primarily used for in database design?
პასუხი(B)
To reduce data redundancy and improve data integrity.
27
What is a view in a database?
პასუხი(B)
A virtual table based on the result-set of an SQL statement.
28
What is the primary purpose of data validation in a database?
პასუხი(A)
To ensure data accuracy and consistency.
29
What are the two main components in a database?
30
Which data type would be best suited for storing a unique ID (e.g., customer ID) that is an integer?
31
What does the `COUNT(*)` function typically return in SQL?
პასუხი(B)
The number of rows that meet a certain criteria.
32
Which of the following data types is used to store large blocks of text?
33
In the context of a database, what is a 'record'?
პასუხი(B)
A single instance of an entity in a table.
34
What is the purpose of an index in a database?
პასუხი(B)
To speed up data retrieval.
35
What does the term 'referential integrity' refer to in the context of databases?
პასუხი(B)
The consistency of data across related tables.
36
What are the fundamental principles of database normalization aimed at?
პასუხი(B)
Reducing data redundancy and improving data integrity.
37
What does the `WHERE` clause in an SQL query typically do?
პასუხი(C)
Filters the results based on a condition.
38
What is the purpose of a database trigger?
პასუხი(B)
To automatically execute a set of actions in response to a specific event on a table.
39
Which of the following can be a validation rule?
40
Which data type would be most appropriate for storing the ward number of a patient in a hospital database?
41
Which SQL command is used to remove data from a database table?
42
In SQL, what does the `INSERT` statement do?
პასუხი(B)
Adds new data into a table.
43
In SQL, what does the FROM clause specify?
პასუხი(B)
The table to retrieve data from.
44
Which of the following is a task typically performed by a database administrator (DBA)?
45
What does the `SELECT` statement in SQL typically do?
პასუხი(B)
Retrieves data from one or more tables.
46
What is the purpose of an index in a database?
პასუხი(B)
To speed up data retrieval.
47
Which SQL command is used to remove a table from a database?
48
What does the `WHERE` clause do in an SQL query?
პასუხი(C)
Filters the data based on specified conditions.
49
What is a key characteristic of a primary key field?
პასუხი(C)
It uniquely identifies each record.
50
What is the purpose of normalization in database design?
პასუხი(B)
To eliminate data redundancy and improve data integrity.