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

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