# Module quiz: Database design

1. **A logical database schema introduces a blueprint of how the data is organized and related in tables.**
    
    * False
        
    * <mark>True</mark>
        
2. **Which column is the primary key in the following Patients table?**
    
    <table><tbody><tr><td colspan="1" rowspan="1"><p></p></td><td colspan="1" rowspan="1"><p></p></td><td colspan="1" rowspan="1"><p><strong>Patients</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p><strong>Patient Name</strong></p></td><td colspan="1" rowspan="1"><p><strong>Date Of Birth</strong></p></td><td colspan="1" rowspan="1"><p><strong>Email</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p>Karl</p></td><td colspan="1" rowspan="1"><p>19/03/2000</p></td><td colspan="1" rowspan="1"><p><a target="_self" rel="noopener noreferrer nofollow" href="mailto:karl.k@luckyshrub.com" style="pointer-events: none">karl.k@luckyshrub.com</a></p></td></tr><tr><td colspan="1" rowspan="1"><p>Mark</p></td><td colspan="1" rowspan="1"><p>20/05/1999</p></td><td colspan="1" rowspan="1"><p><a target="_self" rel="noopener noreferrer nofollow" href="mailto:mark.f@luckyshrub.com" style="pointer-events: none">mark.f@luckyshrub.com</a></p></td></tr><tr><td colspan="1" rowspan="1"><p>Peter</p></td><td colspan="1" rowspan="1"><p>10/03/2001</p></td><td colspan="1" rowspan="1"><p><a target="_self" rel="noopener noreferrer nofollow" href="mailto:peter.g@luckyshrub.com" style="pointer-events: none">peter.g@luckyshrub.com</a></p></td></tr><tr><td colspan="1" rowspan="1"><p>Peter</p></td><td colspan="1" rowspan="1"><p>19/03/2000</p></td><td colspan="1" rowspan="1"><p><a target="_self" rel="noopener noreferrer nofollow" href="mailto:peter.s@luckyshrub.com" style="pointer-events: none">peter.s@luckyshrub.com</a></p></td></tr></tbody></table>
    
    * Date of Birth
        
    * <mark>Email</mark>
        
    * Patient name
        
3. **A foreign key is used to connect tables in a database.**
    
    * <mark>True</mark>
        
    * False
        
4. **The normalization process aims to reduce the negative effects of the different types of data anomalies.**
    
    * False
        
    * <mark>True</mark>
        
5. **Identify the issue with the following table of data in accordance with the rules of first normal form criteria**
    
    <table><tbody><tr><td colspan="1" rowspan="1"><p><strong>Department ID</strong></p></td><td colspan="1" rowspan="1"><p><strong>Department Name</strong></p></td><td colspan="1" rowspan="1"><p><strong>Director</strong></p></td><td colspan="1" rowspan="1"><p><strong>Course ID</strong></p></td><td colspan="1" rowspan="1"><p><strong>Course Name</strong></p></td><td colspan="1" rowspan="1"><p><strong>Tutor ID</strong></p></td><td colspan="1" rowspan="1"><p><strong>Tutor</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p>D1</p></td><td colspan="1" rowspan="1"><p>Computing</p></td><td colspan="1" rowspan="1"><p>Dr Karl</p></td><td colspan="1" rowspan="1"><p>C1</p></td><td colspan="1" rowspan="1"><p>Database</p></td><td colspan="1" rowspan="1"><p>T1</p></td><td colspan="1" rowspan="1"><p>Mark</p></td></tr><tr><td colspan="1" rowspan="1"><p>D1</p></td><td colspan="1" rowspan="1"><p>Computing</p></td><td colspan="1" rowspan="1"><p>Dr Karl</p></td><td colspan="1" rowspan="1"><p>C2</p></td><td colspan="1" rowspan="1"><p>Python</p></td><td colspan="1" rowspan="1"><p>T1</p></td><td colspan="1" rowspan="1"><p>Mark</p></td></tr><tr><td colspan="1" rowspan="1"><p>D1</p></td><td colspan="1" rowspan="1"><p>Computing</p></td><td colspan="1" rowspan="1"><p>Dr Karl</p></td><td colspan="1" rowspan="1"><p>C3</p></td><td colspan="1" rowspan="1"><p>Web</p></td><td colspan="1" rowspan="1"><p>T2</p></td><td colspan="1" rowspan="1"><p>Jack</p></td></tr><tr><td colspan="1" rowspan="1"><p>D1</p></td><td colspan="1" rowspan="1"><p>Computing</p></td><td colspan="1" rowspan="1"><p>Dr Karl</p></td><td colspan="1" rowspan="1"><p>C4</p></td><td colspan="1" rowspan="1"><p>Java</p></td><td colspan="1" rowspan="1"><p>T2</p></td><td colspan="1" rowspan="1"><p>Jack</p></td></tr><tr><td colspan="1" rowspan="1"><p>D2</p></td><td colspan="1" rowspan="1"><p>Math</p></td><td colspan="1" rowspan="1"><p>Dr Mosa</p></td><td colspan="1" rowspan="1"><p>C5</p></td><td colspan="1" rowspan="1"><p>Math</p></td><td colspan="1" rowspan="1"><p>T3</p></td><td colspan="1" rowspan="1"><p>Rose</p></td></tr></tbody></table>
    
    * <mark>Duplication of data.</mark>
        
    * Atomicity problem.
        
6. **To normalize the following table of data, you must decompose it into how many tables?**
    
    <table><tbody><tr><td colspan="1" rowspan="1"><p><strong>Department ID</strong></p></td><td colspan="1" rowspan="1"><p><strong>Department Name</strong></p></td><td colspan="1" rowspan="1"><p><strong>Director</strong></p></td><td colspan="1" rowspan="1"><p><strong>Course ID</strong></p></td><td colspan="1" rowspan="1"><p><strong>Course Name</strong></p></td><td colspan="1" rowspan="1"><p><strong>Tutor ID</strong></p></td><td colspan="1" rowspan="1"><p><strong>Tutor</strong></p></td></tr><tr><td colspan="1" rowspan="1"><p>D1</p></td><td colspan="1" rowspan="1"><p>Computing</p></td><td colspan="1" rowspan="1"><p>Dr Karl</p></td><td colspan="1" rowspan="1"><p>C1</p></td><td colspan="1" rowspan="1"><p>Database</p></td><td colspan="1" rowspan="1"><p>T1</p></td><td colspan="1" rowspan="1"><p>Mark</p></td></tr><tr><td colspan="1" rowspan="1"><p>D1</p></td><td colspan="1" rowspan="1"><p>Computing</p></td><td colspan="1" rowspan="1"><p>Dr Karl</p></td><td colspan="1" rowspan="1"><p>C2</p></td><td colspan="1" rowspan="1"><p>Python</p></td><td colspan="1" rowspan="1"><p>T1</p></td><td colspan="1" rowspan="1"><p>Mark</p></td></tr><tr><td colspan="1" rowspan="1"><p>D1</p></td><td colspan="1" rowspan="1"><p>Computing</p></td><td colspan="1" rowspan="1"><p>Dr Karl</p></td><td colspan="1" rowspan="1"><p>C3</p></td><td colspan="1" rowspan="1"><p>Web</p></td><td colspan="1" rowspan="1"><p>T2</p></td><td colspan="1" rowspan="1"><p>Jack</p></td></tr><tr><td colspan="1" rowspan="1"><p>D1</p></td><td colspan="1" rowspan="1"><p>Computing</p></td><td colspan="1" rowspan="1"><p>Dr Karl</p></td><td colspan="1" rowspan="1"><p>C4</p></td><td colspan="1" rowspan="1"><p>Java</p></td><td colspan="1" rowspan="1"><p>T2</p></td><td colspan="1" rowspan="1"><p>Jack</p></td></tr><tr><td colspan="1" rowspan="1"><p>D2</p></td><td colspan="1" rowspan="1"><p>Math</p></td><td colspan="1" rowspan="1"><p>Dr Mosa</p></td><td colspan="1" rowspan="1"><p>C5</p></td><td colspan="1" rowspan="1"><p>Math</p></td><td colspan="1" rowspan="1"><p>T3</p></td><td colspan="1" rowspan="1"><p>Rose</p></td></tr></tbody></table>
    
    * Two tables (departments and courses).
        
    * <mark>Four tables (departments, directors, courses, and tutors).</mark>
        
    * 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 |
    
    * <mark>Second normal form partial dependency</mark>
        
    * 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](https://d3c33hcgiwev3.cloudfront.net/imageAssetProxy.v1/9156f5f2-345f-43c4-9a34-028b1bc74fe7image1.png?expiry=1731283200000&hmac=NO7gVoHhud9WntunMpZu_hUq_3MwnX_rHWKnhCXRPlQ align="left")
    
    * CREATE TABLE Games( gameID int NOT NULL, playerID int, PRIMARY KEY (gameID), FOREIGN KEY (playerID) REFERENCES players(playerID));
        
    * <mark>CREATE TABLE Games( gameID int NOT NULL, playerID int, PRIMARY KEY (gameID), FOREIGN KEY (gameID) REFERENCES players(gameID));</mark>
        
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.**
    
    * <mark>Fully</mark>
        
    * 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.**
    
    * <mark>True</mark>
        
    * False
        

---

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1731151492495/82ba296f-1569-4a76-a644-918e22ba3b49.png align="center")
