Relational Database Design Quiz Quiz

  1. Primary Key Definition

    Which of the following best describes the role of a primary key in a relational database table?

    1. It ensures that all columns have the correct data type.
    2. It uniquely identifies each row in the table.
    3. It defines the relationship between two tables.
    4. It is used to store the names of the columns in a table.
    5. It determines the order in which the rows are displayed.
  2. Foreign Key Purpose

    What is the purpose of a foreign key in a relational database?

    1. To uniquely identify each record in a table.
    2. To define a relationship between two tables by referencing the primary key of another table.
    3. To store calculated values.
    4. To filter data based on a specific condition.
    5. To ensure that no column contains null values.
  3. Normalization Goal

    What is the primary goal of normalizing a relational database?

    1. To speed up data retrieval.
    2. To reduce data redundancy and improve data integrity.
    3. To increase the number of tables in the database.
    4. To complicate data relationships.
    5. To make the database more difficult to manage.
  4. One-to-Many Relationships

    In a relational database, how is a one-to-many relationship typically implemented?

    1. By including all the data from both tables in a single table.
    2. By creating a junction table.
    3. By storing multiple values in a single cell.
    4. By including the primary key of the 'one' side in the 'many' side table as a foreign key.
    5. By storing the primary key of the 'many' side in the 'one' side table.
  5. SELECT Statement

    Which SQL statement is used to retrieve data from a relational database?

    1. UPDATE
    2. INSERT
    3. DELETE
    4. SELECT
    5. CREATE TABLE
  6. Filtering data

    In SQL, which clause is used to filter the rows returned by a SELECT statement?

    1. SORT BY
    2. GROUP BY
    3. WHERE
    4. HAVING
    5. ORDER BY
  7. Junction Tables

    What is the purpose of a junction table in relational database design?

    1. To store temporary data.
    2. To resolve many-to-many relationships between two tables.
    3. To speed up data retrieval.
    4. To store only the primary key of a table.
    5. To enforce data validation rules.
  8. First Normal Form

    What is the main characteristic of a table in First Normal Form (1NF)?

    1. It must have a primary key.
    2. All non-key attributes must be fully dependent on the primary key.
    3. It contains no repeating groups of columns and each cell contains only one value.
    4. It has no transitive dependencies.
    5. It does not contain any foreign keys.
  9. Entity Integrity Rule

    According to the entity integrity rule, what is the restriction on a primary key column?

    1. It must be an integer.
    2. It must contain only unique values.
    3. It cannot contain NULL values.
    4. It must be a foreign key in another table.
    5. It must be indexed.
  10. Composite Key Definition

    What is a composite key in a relational table?

    1. A key that is automatically generated.
    2. A key that is made up of two or more columns.
    3. A key that is used to encrypt data.
    4. A key that is used to access data remotely.
    5. A key that is used for indexing only.