Database Systems Week 4

Slides for Normalisation part 1

Some notes on functional dependencies and keys

Connolly, T., Begg, C., 2005, Database Systems, 4th Ed.: Chapter 13 – FDs and normalisation

Connolly, T., Begg, C., 2010, Database Systems, 5th Ed.:Chapter 14 – FDs and normalisation

Elmasri, R., Navathe, S., Database Systems, 6th Ed.: Chapter 14 Normalisation using FDs, pp. 485 – 507

Silbershatz, A., Korth, H., Sudarshan, S., Database System Concepts, 6th Ed.: Chapter 8, pp. 323- 333

Database Systems Week 3

Materials for this week

  • Writing RA and SQL for dummies
  • Other RA operations – Union, Set Difference, Intersection and Division
  • DQL, DDL and DML

Connolly & Begg (4th ed.) Chapter 5 and 6 has sections on Data Manipulation and Data Definition. Chapter 4 has material on relational algebra (material on relational calculus isn’t required). Note that a more detailed explanation of division is offered here which may be useful later.

Ramakrishnan & Gehrke (Database Management Systems) has an excellent chapter on relational algebra, as has Elmasri & Navathe (Fundamentals of Database Systems).

Slides and lab materials based on Access can be found here

  • Problems in the relational model
  • Last part of SQL: function, grouping and subqueries

Slides and lab materials based on Access can be found here

Connolly & Begg for complete sets of DDL/DML/DQL SQL examples (Chapter 6 in 4th ed.). The other two books also have coverage.

Database Systems Week 2

Materials for this week

Lecture notes and exercises on Join, outer joins / inner joins

Notes on views in Relational DB and views in SQL

Article on query optimisation

Homework question – Q.4 (a) – (c) only  query tree example

Connolly, T., Begg, C., 2010, Database Systems, 5th Ed.: Chapter 4 – Views, Chapter 5 – Relational Algebra, Chapter 6 – SQL Data Manipulation

Elmasri, R., Navathe, S., Database Systems, 6th Ed.: Chapter 18, pp. 680-690, Query Tree Heuristics

Silbershatz, A., Korth, H., Sudarshan, S., Database System Concepts, 6th Ed.: Chapter 13, pp. 579-589, Query Optimization

Relational Databases Session 3

Relational Databases Session 3

database 3 2007 handouts 3 slides (PDF) on cartesian product and joins

sqlsession3 (PDF), containing material on CPs and joins in relational algebra and SQL.

Practical work in SQL is done using Office 2007 – session3 2007.accdb (zipped accdb file) is available for the second set of exercises

database 3 join extra 2007 3 slides handouts on different types of Join

session3 extras 2007.accdb for extra slides

Relational Databases Session 2

Relational Databases Session 2

As there is a Union meeting this week, there won’t be a lecture. The taught part of the database material has been uploaded as a video. You should watch this BEFORE the labs on Wednesday or Friday.

You can download the slides used in this video as a handout database 2 slides

The lab exercises on databases sqlsession2 (PDF), contain material on selection in relational algebra and SQL.

Practical work in SQL is done using Office 2010 – for this session you can use the database you downloaded for session 1

Relational Databases, Session 1

Relational Databases Session 1

Lecture Slides: relational database slides handout 1 (PDF) on the relational model

Lab exercises sqlsession1 2010 (PDF Office 2010), containing an introduction to the relational model, relational algebra and projection in SQL.

Practical work in SQL is done using Office 2010 – session1 2010.accdb (zipped accdb file) is available for the first set of exercises

Here are the tables as SQL statements SQL table creation

The same lab exercises are available for Office 2007 if this is the version you are using sqlsession1 (PDF Office 2007)