levo

Databases

Entity-relationship modelling

  • 3 things to know
  • A2 Unit 1

Overview

Entity-relationship model, one-to-one relationship and one-to-many relationship.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Why can a many-to-many relationship not be implemented directly?

Key term

What is meant by the optionality of a relationship?

Key term

Produce the entity-relationship model for a library that lends copies of books to members.

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What is an entity-relationship model?

    Model answer

    An entity-relationship model is a diagram showing the entities a system must hold data about, the relationships between them, and the degree of each relationship. It is the standard way of agreeing the logical structure of a database before it is built.

  2. 2

    What are the three degrees of relationship shown in an entity-relationship model?

    Model answer

    The three degrees are one-to-one, one-to-many and many-to-many, describing how many occurrences of each entity may be associated with an occurrence of the other.

  3. 3

    Give an example of a one-to-one relationship.

    Model answer

    An employee has one company car and a company car is allocated to one employee, so the relationship between Employee and Car is one-to-one.

  4. 4

    Give an example of a one-to-many relationship.

    Model answer

    One customer may place many orders but each order is placed by exactly one customer, so the relationship between Customer and Order is one-to-many.

  5. 5

    Give an example of a many-to-many relationship.

    Model answer

    A student studies many courses and a course is studied by many students, so the relationship between Student and Course is many-to-many.

  6. 6

    How is a one-to-many relationship implemented in tables?

    Model answer

    The primary key of the table on the one side is placed into the table on the many side as a foreign key, so each order carries the customer number of the customer who placed 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.

Systems Analysis and Development Approaches
Design, Development and Testing
Implementation and System Security
Programming

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 check requires a value.
presencerangeformat

Blank Blitz makes facts automatic

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

ANormal data is 12, which should be accepted.
BBoundary data is 1 and 50, which should be accepted.
C0 and 51, just outside the limits, should be rejected.

Build It gets the exam shape right

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

One byte is made up of 8 bits.
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 Databases, 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.