Lecture 4: From ER Diagrams to Relational Models

Title slideToday’s lecture reviewed the high-level conceptual language of ER diagrams and the more concrete structures of the relational model; followed by some recipes for translating from the first into the second. This isn’t always an exact match, and for any particular ER diagram we might go back to its original scenario description to decide how to best represent it as a relational model. Even so, this kind of step-by-step staging towards a fully formal representation is an effective route to capturing the subtleties of real-world systems.

The lecture covered in particular translating the following ER idioms into the relational model of linked tables.

  • Entities, relationships, and their attributes
  • Key constraints
  • Participation constraints
  • Weak entities
  • Entity hierarchies

You’ll see this material again in Tutorial 2, where you will get to apply the methods to specific examples.

There’s a recording of the lecture at the link below. You’ll need to turn up audio for the last ten minutes: the wearable microphone ran out of battery, and the desktop one picked up at a distance instead.

Link: Slides for Lecture 4; Recording

Homework

Do This

Download the exercises for Tutorial 1: Entity-Relationship Modelling. Read the instructions on the front page and work through the questions.

Where you find parts difficult, or have questions: stop and ask other students, post on Piazza, or ask at InfBASE.

Write out your solutions and bring them to your tutorial meeting.

The sheets also have several more example problems and notes on solving them. You might also find the exercises from the reading homework helpful practice.

Link: Inf1-DA Tutorials

References

Screenshot of web file management ifile.inf.ed.ac.uk
Secure web access to files in your DICE home directory.

Link: DICE ifile page

Screenshot of InfBASE home page InfBASE
Staffed drop-in study help centre for first and second-year Informatics students.

Link: InfBASE home page

Screenshot of Informatics computing help pages Computing HelpUse our help pages for DICE and Informatics computing.

Links: Informatics computing help; Remote working; Computing support form