Relational databases

From MAPH09_2
Revision as of 16:57, 5 November 2009 by Sbrown (Talk | contribs)

Jump to: navigation, search
Erpshome.jpg

Required reading

Geekgirls.com databases: Database design from scratch. Step by step guides to designing and building databases including tutorials and exercises [1].

The guidance notes on Base: http://documentation.openoffice.org/manuals/userguide3/0108GS3-GettingStartedWithBase.pdf

This next reference refers to 'normalisation' http://www.island-data.com/downloads/papers/normalization.html. Read down to and including 'First Normal Form' to understand what normalisation is and why it is so important in relational database systems.

The 'Entity-Relationship' model is the first thing to build when designing a database: please read this short introduction (down to 'Diagramming conventions') http://en.wikipedia.org/wiki/E-R_diagram

Introduction

So far we have been working with a small, simple data set but useful research resources are often larger and more complex than this. See for example the Correspondence of William Henry Fox Talbot at http://foxtalbot.dmu.ac.uk or Exhibitions of the Royal Photographic Society Web site at http://erps.dmu.ac.uk. Collections like these are more difficult to manage in a single table and it's much harder to sort through all the information they contain to find what you are looking for or to see connections between different bits without some additional help. In this session you will learn how to use "relational" databases to manage large/complex sets of information and you will have the opportunity to model a small relational database.



Learning outcomes

By the end of this session you will be able to:

Explain the differences betwen "flat" and "relational" databases.

Break a set of information down into distinct "entities" and justify your decisions.

Create a diagram that illustrates the relationships between the different "entities" in your data.

Use the diagram to construct a set of interlinked tables.


To help you learn how to do this you have access to the Geekgirls.com databases tutorials dealing with: Database design from scratch [2].


Activity: Building a simple realtional database

Have a look at the Library of Congress collection of Fenton pictures http://www.loc.gov/rr/print/coll/251_fen.html. Click on the link to "view all images", Some of these images are referred to in the letters. Build a simple E-R diagram of your Fenton Letters database then build and populate another table in Base to hold images and a description of them, so that one letter can link to more than one image. Identify the primary and foreign keys - be prepared to explain the difference between these. Use the thumbnails from the Library of Congress site.

1b. An image exists for each letter. Build another table to contain the image and link it to the Letters table. Update your E-R diagram to describe all three tables.

2. Take a look at http://erps.dmu.ac.uk.

Examine this site and develop the E-R diagrams for each of the main components (exhibits, exhibitions, judges and exhibitors). Be as comprehensive as possible regarding the attributes of any entities you identify.

Select 2 of the main entities and describe the database tables diagrammatically. Identify primary and foreign keys.

Seminar preparation

Prepare a brief presentation (maximum 5 wiki pages or Powerpoint slides, not counting references) on what you have done and what you have learned from this session.


Follow this link to the Photography Resources in a Digital Age Contents page to return to the module contents.

Back to the MA: Photographic History Main Page to return to the Course contents.