Lecture 1

Organising Data

Data is organised for a number of reasons:

  • Ease of access to information
  • Efficiency of retrieval
  • Maintenance

Data Management

There are two aspects to data management: How to store the data and how to manipulate the data.

Abstraction

The manipulation layer should work with a data specification. Users who manipulate the data need not know about the storage, or how the database files are stored and organised on the storage medium

Data manipulation

Procedural: What data is needed and how to get it
Declarative: What data is needed without specifying how to get it

Keys

Super Key

A set of attributes, whose values enable uniquely identifying a tuple in any instance of the table. Using all the attributes is a Trivial Super Key. The Candidate Key is the minimal Super Key.

Primary Key

A candidate key chosen as the principal means of identifying tuples within a relation. The attribute whose value never, or very rarely changes should be chosen.