C40007 Introduction to Databases: Course Home Page 2023-24 Session

General information about the course

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.

There is also

  • 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 lecturesand are available on CATE, 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

    Seminar Material

    This material is non-examinable, and is provided for general interest.
    1. RDF, OWL, SPARQL
    2. GraphLDA tool to execute SPAQL queries and visualise the results

    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 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.

    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.