Back to 课程

Computer-Science-A-level-Ocr

0% Complete
0/0 Steps
  1. 3-3-networks
    8 主题
  2. 3-2-databases
    7 主题
  3. 3-1-compression-encryption-and-hashing
    4 主题
  4. 2-5-object-oriented-languages
    7 主题
  5. 2-4-types-of-programming-language
    4 主题
  6. 2-3-software-development
    5 主题
  7. 2-2-applications-generation
    6 主题
  8. 2-1-systems-software
    8 主题
  9. 1-3-input-output-and-storage
    2 主题
  10. 1-2-types-of-processor
    3 主题
  11. 1-1-structure-and-function-of-the-processor
    1 主题
  12. structuring-your-responses
    3 主题
  13. the-exam-papers
    2 主题
  14. 8-2-algorithms-for-the-main-data-structures
    4 主题
  15. 8-1-algorithms
    10 主题
  16. 7-2-computational-methods
    11 主题
  17. 7-1-programming-techniques
    14 主题
  18. 6-5-thinking-concurrently
    2 主题
  19. 6-4-thinking-logically
    2 主题
  20. 6-3-thinking-procedurally
    3 主题
  21. 6-2-thinking-ahead
    1 主题
  22. 6-1-thinking-abstractly
    3 主题
  23. 5-2-moral-and-ethical-issues
    9 主题
  24. 5-1-computing-related-legislation
    4 主题
  25. 4-3-boolean-algebra
    5 主题
  26. 4-2-data-structures
    10 主题
  27. 4-1-data-types
    9 主题
  28. 3-4-web-technologies
    16 主题
课 Progress
0% Complete

What is normalisation?

  • In A Level Computer Science, normalisation is the process of organising a database to reduce data duplication and improve data accuracy and consistency

  • Achieved by applying a set of guidelines (forms), each with specific rules and requirements

  • Enhances database efficiency and maintainability

  • Provides consistency within the database

First Normal Form (1NF)

What is first normal form?

  • For a table to be in first normal form it must:

    • Contain atomic values

      • Each column in a table must contain single, indivisible values

    • Have no repeating groups

      • Columns must not contain arrays or lists of values

    • Have unique column names

      • Each column must have a unique name within the table

    • Have a unique identifier (primary key)

      • Each row must have a unique identifier to distinguish it from other rows

  • This customers table below has no primary key and the name is stored in one field so is not atomic

  • This table is not in first normal form

1nf
  • This customers table below has a primary key and the name is stored in two fields so it is atomic 

  • This table is in first normal form

1nf-2

Second Normal Form (2NF)

What is second normal form?

  • For a table to be in second normal form it must:

    • Fulfil all 1NF requirements

    • Only apply to tables with a compound primary key

    • Have full functional dependency

      • All non-prime attributes (attributes not part of the primary key) must be fully dependent on the primary key

    • Have no partial dependencies

      • Non-prime attributes must not depend on only part of the primary key (in case of a composite primary key)

      • Separate tables should be created for partially dependent attributes

  • In this table below, Course Title only depends on part of the compound primary key (the course code) and not the Date so this table is not in second normal form

2nf

Third Normal Form (3NF)

What is third normal form?

  • For a table to be in third normal form it must:

    • Fulfil all 2NF requirements

    • Have no transitive dependencies

      • Non-prime attributes must not depend on other non-prime attributes

    • Have each non-prime attribute dependent solely on the primary key, not on other non-prime attributes

    • Have separate tables for attributes with transitive dependencies, and the tables should be linked using a foreign key

  • In this table below, the certificate depends on the title – this a transitive dependency and so this table is not in third normal form 

3nf

Examiner Tips and Tricks

For a table to be in second normal form it has to be in first normal form.

For a table to be in third normal form it has to be in second normal form.

So if asked for the rules of either second or third normal form make sure you say this.

Worked Example

An airport holds details of flights in a database using the table Flight. An extract of the table is shown below.

wk eg flight details table

The airline wishes to ensure the database is normalised.

i) Describe why the database can be considered to be in First Normal Form

[2]

ii) Describe why the database can be considered to be in Second Normal Form

[2]

iii) Describe why the database can not be considered to be in Third Normal form

[2]

Answer:

 No Repeating fields/data. Data is atomic. Has a primary Key [2]

Is in First Normal Form. Every field is dependent on the primary key [2]

Has a transitive relationship. A non-key field depends on another non-key field. DestinationName depends on DestinationCode [2]

Responses

您的邮箱地址不会被公开。 必填项已用 * 标注