The entire course will be taught by Peter McBrien, and comprise of
three hours per week of combined lectures and tutorials. Lectures for
the course will run in weeks 2-10. The exam for the course will be
held at the start of the Summer term.
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 lecturesand are available on CATE, 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
Seminar Material
This material is non-examinable, and is provided for general interest.
- RDF, OWL, SPARQL
- GraphLDA tool to execute SPAQL queries and visualise the results
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
-
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 four relational databases used in the course for examples, and these
four databases are made available for running example queries on both SQL Server and Postgres.
- bank_branch
- bank_customer
- 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.