C70040 Databases: Course Home Page 2024-25 Session

General Information about the course

The entire course will be taught by Peter McBrien, and comprise of four hours per week of combined lectures and tutorials. Lectures for the course will run in weeks 2-8 (and maybe the start of 9) of the Spring Term. The exam for the course will be held at the start of the Summer term.

There are also

  • Panopto recordings made of the lectures
  • An EdStem Discussion Forum where questions about the course material may be placed. I expect that the more simple questions are answered by class, and will check those answers are complete and correct.
  • Scientia where coursework exercises are handed out and marked coursework is returned.
  • A Syllabus and Book List contains some material that you should consult is you find some aspect of the course hard to follow.
  • Lecture Slides

    The slides are placed here at the time of the lecture. Slides with grey links are provisional versions of the slides. Note that the course content is what is presented verbally during the lectures: you are expected to attend all lectures. Worksheets will be provided during lectures, and answers to those worksheets provided also during lectures.

    1. Introduction
    2. Relational Algebra
    3. SQL: An implementation of the RA
    4. SQL: A Language for Database Applications
    5. Datalog
    6. ER Modelling
    7. Functional Dependencies and Normalisation
    8. Concurrency Control
    9. Recovery

    Other Material (Restricted Access)

    The following requires a current DoC user account to access.
    1. Complete set of worksheets used in this course
    2. Answers to questions presented so far
    3. Coursework 1 Feedback and Answers
    4. Coursework 2 Feedback and Answers
    5. Revision Exercises
    6. Answers to Revision Exercises
    7. RASQL A tool produced by a third year group project to visualise RA and SQL queries. Download either a Windows or Mac version of the tool to your own computer.

    ER Diagrams in LaTeX

    erdiagram.sty is an alpha release tikz based package for drawing in LaTeX ER diagrams like those presented in the course. There is no documentation for the package, but er-models.tex contains an example of a LaTeX document that uses the package to draw an ER Schema containing all the constructs supported by the package.

    Example Databases

    There are five relational databases used in the course for examples, and these databases are made available for running example queries on Postgres.

    Further examples to download into your own database are found in my databases tools and data mini site.

    Examples hosted on a Postgres DBMS

    To connect to the databases hosted on Postgres, issue commands in the following form on a CSG Linux machine (and using password 'lab'):

    psql -h db -U lab -d bank_branch -W

    Once connected, queries may be entered, terminated with a semicolon. Online help may be accessed with \help, and \exit used to exit the psql tool.

    Note that this version of Postgres does not support CUBE or ROLLUP.