Module quiz: Database design

Module quiz: Database design

  1. A logical database schema introduces a blueprint of how the data is organized and related in tables.

    • False

    • True

  2. Which column is the primary key in the following Patients table?

    Patients

    Patient Name

    Date Of Birth

    Email

    Karl

    19/03/2000

    karl.k@luckyshrub.com

    Mark

    20/05/1999

    mark.f@luckyshrub.com

    Peter

    10/03/2001

    peter.g@luckyshrub.com

    Peter

    19/03/2000

    peter.s@luckyshrub.com

    • Date of Birth

    • Email

    • Patient name

  3. A foreign key is used to connect tables in a database.

    • True

    • False

  4. The normalization process aims to reduce the negative effects of the different types of data anomalies.

    • False

    • True

  5. Identify the issue with the following table of data in accordance with the rules of first normal form criteria

    Department ID

    Department Name

    Director

    Course ID

    Course Name

    Tutor ID

    Tutor

    D1

    Computing

    Dr Karl

    C1

    Database

    T1

    Mark

    D1

    Computing

    Dr Karl

    C2

    Python

    T1

    Mark

    D1

    Computing

    Dr Karl

    C3

    Web

    T2

    Jack

    D1

    Computing

    Dr Karl

    C4

    Java

    T2

    Jack

    D2

    Math

    Dr Mosa

    C5

    Math

    T3

    Rose

    • Duplication of data.

    • Atomicity problem.

  6. To normalize the following table of data, you must decompose it into how many tables?

    Department ID

    Department Name

    Director

    Course ID

    Course Name

    Tutor ID

    Tutor

    D1

    Computing

    Dr Karl

    C1

    Database

    T1

    Mark

    D1

    Computing

    Dr Karl

    C2

    Python

    T1

    Mark

    D1

    Computing

    Dr Karl

    C3

    Web

    T2

    Jack

    D1

    Computing

    Dr Karl

    C4

    Java

    T2

    Jack

    D2

    Math

    Dr Mosa

    C5

    Math

    T3

    Rose

    • Two tables (departments and courses).

    • Four tables (departments, directors, courses, and tutors).

    • Three tables (departments, courses, and tutors).

  7. The table below contains a composite primary key made up of the columns "Tutor ID" and "Subject". What kind of normalization problem does this composite key create?

    | Tutor ID | Subject | Credits | | --- | --- | --- | | T1 | Java | 20 | | T1 | Web | 15 | | T2 | Math | 15 | | T2 | History | 20 |

    • Second normal form partial dependency

    • First normal form data redundancy

  8. Which of the following statements is the correct syntax to define a foreign key that links the "Players" and "Games" table in an ER diagram?

    Players and Games table connected by foreign key

    • CREATE TABLE Games( gameID int NOT NULL, playerID int, PRIMARY KEY (gameID), FOREIGN KEY (playerID) REFERENCES players(playerID));

    • CREATE TABLE Games( gameID int NOT NULL, playerID int, PRIMARY KEY (gameID), FOREIGN KEY (gameID) REFERENCES players(gameID));

  9. A database relation is in second normal form if it is in first normal form and every non key attribute is __________ functionally dependent on the primary key.

    • Fully

    • Partially

  10. Database normalization is a progressive process, which means that the database relation cannot be in the third normal form if it is not already applying the rules of the first and the second normal forms.

    • True

    • False