M1G505190
Introduction to Database Development

Announcements:

Announcements for this module will be posted on Blackboard.

Jim Paterson - GCU Modules:M1G505190

  • Lectures
  • Tutorials
  • Labs
  • Assessment
  • Reading
  • Staff

Click on a title to see the list of topics in that chapter. Use the download links to get full notes or lecture slides in PDF format.

1. Databases and database design

Download - notes | slides

Contents
What is a database?
Databases vs. Database Management Systems
Relational and other database systems
Databases and enterprise information systems
The language of relational databases – SQL
Popular relational database systems
Designing a database
The  data model
From data model to relational database

2. Creating a database

Download - notes | slides

Contents
Designing the database schema
Representing Classes and Attributes
Data types
Additional constraints
Choosing the right fields
Implementing a table in SQL
Inserting data into a table
Primary keys
Representing relationships
Altering a table

3. Getting data out: database queries

Download - notes | slides | database

Contents
Querying
Queries and use cases
The GCUTours database tables
Queries in Access
Project operations
Select operations
Date formats in queries
Aggregates
Grouping
Subqueries

4. Improving the database design

Download - notes | slides

Contents
Database normalisation
Problems with un-normalised data
Functional dependencies
Normalisation and normal forms
First normal form (or 1NF)
Second Normal Form (2NF)
Third normal form (3NF)
Summing up the first three normal forms
Higher normal forms
When to use normalisation

5. Doing more with queries

Download - notes | slides

Contents
Improving query performance with indexes
Joining tables
Different kinds of join
Data definition queries
Insert queries
Update queries
Delete queries
Parameter queries

6. Building applications

Download - notes | slides | database

Contents
Databases and applications
Types of application
Database servers
Web applications with WebMatrix
Reports
Connecting to databases

Some notes are in PDF format - you may need Adobe Reader to view and print them. You can download it using the link below:

Get Adobe Reader

Note that tutorial sheets will be available before the relevant tutorials, and solutions will be available when all groups have completed the tutorial.

Tutorial 1

Tutorial 2 | solutions

Tutorial 3 | solutions

Tutorial 4 | solutions

Tutorial 5 | solutions

 

 

 

Note that solutions are sample solutions, and there may be alternative valid answers in some cases.

Note that lab sheets will be available before the relevant labs, and solutions will be available when all groups have completed the lab.

Lab 1 task | AddDriver.txt

Lab 2 task | listkeys.txt (SQL statement which will list all the primary and foreign key fields in a database)
Lab 2 solution | gcucars complete database

Lab 3 task | gcutours database (gcutourswm.zip)
Lab 3 solution

Lab 4 task  | gcutours_app.mdb | Booking.java | BookingDAO.java | Package.java | PackageDAO.java | Tour.java | TourDAO.java | User.java | UserDAO.java
Lab 4 solution

Lab 5 task | gcutours database (gcutourswm.zip) | gcucars database (gcucars.zip)
Lab 5 solution

 

 

 

Class test
Week 4, worth 30% of overall module mark
See Blackboard announcements for further details.

Hand-in assignment:
Week 5-6, worth 70% of overall module mark

 

There is no set text for this module, but you may find the following useful:

W3Schools SQL Tutorial
Beginning Database Design: From Novice to Professional  (Clare Churcher, Apress, ISBN 1-59059-769-9)
Head First SQL (Lynn Beighley, O'Reilly, ISBN 0-596-52684-9)

Jim Paterson, Room M628, 0141 331 3028, James.Paterson-at-gcal.ac.uk

 

 


When sending e-mail please substitute -at- with the usual internet e-mail name/address separator