levo

Normalisation and Structured Query Language

Second normal form

  • 3 things to know
  • A2 Unit 1
Start revising · £5/month

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.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

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

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

A null is the of one.
absencepresencetype

Blank Blitz consolidates the facts

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

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

An error is the mistake a person made.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

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.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

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