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.
- Introduction
-
Relational Algebra
-
SQL: An implementation of the RA
-
SQL: A Language for Database Applications
-
Datalog
-
ER Modelling
-
Functional Dependencies and Normalisation
-
Concurrency Control
-
Recovery
Other Material (Restricted Access)
The following requires a current DoC user account to access.
-
Complete set of worksheets used in this course
-
Answers to questions presented so far
-
Coursework 1 Feedback and Answers
-
Coursework 2 Feedback and Answers
-
Revision Exercises
-
Answers to Revision Exercises
-
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.
- bank_branch
- bank_customer
- family_history
- mondial
- uscensus1990
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
.