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?
    Antwoord
    (C)
    Range check
  • 2
    What is a database schema?
    Antwoord
    A
    C
  • 3
    What is the main advantage of storing data in a database compared to storing it in separate files?
    Antwoord
    A
    B
    C
  • 4
    What SQL command is used to filter records based on a condition?
    Antwoord
    (B)
    WHERE
  • 5
    Which SQL command is used to retrieve data from a table?
    Antwoord
    (C)
    SELECT
  • 6
    Which data type would be most appropriate for storing a yes/no value?
    Antwoord
    (C)
    Boolean
  • 7
    Which of the following are common data types used in databases?
    Antwoord
    A
    B
    C
    D
  • 8
    What is a 'field' in a database table?
    Antwoord
    (C)
    A column in a database table.
  • 9
    What is the correct SQL syntax to sort results in descending order?
    Antwoord
    (C)
    ORDER BY field DESC
  • 10
    Which data type would be most appropriate for a 'TelephoneNumber' field in a database?
    Antwoord
    (B)
    Short Text
  • 11
    What type of data is most often represented in a 'VARCHAR' data type?
    Antwoord
    (C)
    Variable-length text
  • 12
    Which SQL clause is used to order the results of a query?
    Antwoord
    (B)
    ORDER BY
  • 13
    What does the 'Format check' validation rule usually verify?
    Antwoord
    (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?
    Antwoord
    (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?
    Antwoord
    (B)
    Database
  • 16
    What is the purpose of an Input Mask?
    Antwoord
    (B)
    To control the format of the data input.
  • 17
    Which statement is true about data types in a database?
    Antwoord
    (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?
    Antwoord
    (C)
    SELECT * FROM table_name;
  • 19
    What does the acronym SQL stand for?
    Antwoord
    (A)
    Structured Query Language
  • 20
    What SQL command is used to add a new primary key to a table?
    Antwoord
    (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'?
    Antwoord
    (A)
    Not available
  • 22
    In a database table, what do records consist of?
    Antwoord
    (A)
    Fields
  • 23
    What is a key characteristic of a relational database?
    Antwoord
    (B)
    Data is organized into tables with relationships between them.
  • 24
    What does the term 'normalization' refer to in database design?
    Antwoord
    (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?
    Antwoord
    (B)
    To filter aggregated data after the `GROUP BY` clause.
  • 26
    What are the advantages of using indexes in a database?
    Antwoord
    A
    D
  • 27
    What is the role of a database transaction?
    Antwoord
    (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?
    Antwoord
    (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?
    Antwoord
    (D)
    All of the above.
  • 30
    What is the purpose of an `ORDER BY` clause in an SQL query?
    Antwoord
    (B)
    To sort the results of the query.
  • 31
    Which SQL command is used to insert new data into a table?
    Antwoord
    (C)
    INSERT
  • 32
    Which of the following could be used as a primary key?
    Antwoord
    A
    B
    D
  • 33
    Which of the following data types would be best suited for storing a patient's date of birth?
    Antwoord
    (C)
    Date/Time
  • 34
    Which of the following is an example of a NoSQL database?
    Antwoord
    (C)
    MongoDB
  • 35
    Which of the following statements are true about a foreign key?
    Antwoord
    B
    C
    D
  • 36
    Which of the following is NOT a common operation in a relational database?
    Antwoord
    (D)
    Compile a program.
  • 37
    What does the term 'database schema' refer to?
    Antwoord
    (B)
    The structure and organization of a database.
  • 38
    Which of the following is NOT a valid benefit of using databases?
    Antwoord
    (C)
    Data access is restricted to administrators only.
  • 39
    What is a database schema?
    Antwoord
    (B)
    The structure and design of the database, including tables and relationships.
  • 40
    What is referential integrity in a database?
    Antwoord
    (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?
    Antwoord
    (D)
    DECIMAL
  • 42
    What is a primary key used for in a database table?
    Antwoord
    (B)
    To uniquely identify each record in the table.
  • 43
    What is the purpose of a 'foreign key' in a database?
    Antwoord
    (B)
    To create relationships between tables.
  • 44
    What is data redundancy, and why is it undesirable in a database?
    Antwoord
    (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)?
    Antwoord
    A
    B
    C
  • 46
    In a relational database, what does referential integrity ensure?
    Antwoord
    (C)
    That relationships between tables are maintained.
  • 47
    What are the benefits of data normalization in database design?
    Antwoord
    A
    B
    C
  • 48
    What is the benefit of a 'many-to-many' relationship?
    Antwoord
    (C)
    It allows efficient modeling of complex relationships between entities.
  • 49
    What is the purpose of data validation in a database?
    Antwoord
    (C)
    To maintain the data integrity by ensuring accurate and consistent data.
  • 50
    What does the acronym SQL stand for?
    Antwoord
    (A)
    Structured Query Language