levo

Normalisation and Structured Query Language

Second normal form

  • 3 things to know
  • A2 Unit 1

Overview

Partial dependency and table in first but not second normal form.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Is UnitPrice always dependent on the product alone?

Key term

Why does second normal form only matter for a composite key?

Key term

How is a partial dependency removed?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    When is data in second normal form?

    Model answer

    Data is in second normal form when it is in first normal form and every non-key attribute depends on the whole of the primary key rather than on part of it.

  2. 2

    What is a partial dependency?

    Model answer

    A partial dependency exists where a non-key attribute is determined by only part of a composite primary key. In a table keyed on order number and product code, the product description depends on the product code alone.

  3. 3

    Why does second normal form only matter for a composite key?

    Model answer

    A single-attribute key has no parts, so nothing can depend on part of it. Any table in first normal form whose key is one attribute is automatically in second normal form.

  4. 4

    How is a partial dependency removed?

    Model answer

    The attributes that depend on part of the key are moved into a new table keyed on that part, and the part remains in the original table as a foreign key linking the two.

  5. 5

    Take the order line table to second normal form.

    Model answer

    Description and UnitPrice depend on ProductCode alone, so they move to a new Product table keyed on ProductCode. OrderLine is left with OrderNo and ProductCode as its key and Quantity as its only other attribute.

  6. 6

    Why does Quantity stay in the order line table?

    Model answer

    Quantity depends on both parts of the key together: it is the quantity of that product on that order, and neither the order number alone nor the product code alone determines it.

Other ways to work this

The same content, four other ways.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Software and the Development Environment
Defining Data: Types, Variables and Classes
Program Control Structures
Objects, Classes and Data Structures

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

A null is the of one.
absencepresencetype

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

AA null means no value has been recorded.
BZero and an empty string are values.
CA null is the absence of a value.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

An error is the mistake a person made.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Normalisation and Structured Query Language, on a schedule.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.