Database Concepts
Section A (compulsory) and Section B1. Covers Database and file systems; Relational data model; Keys; Relational algebra.
About this unit
This unit introduces databases: why organisations moved from simple files to database management systems, and how the relational model organises data into tables. You will meet the vocabulary used throughout SQL work, such as relation, attribute, tuple, domain, degree and cardinality, and the different kinds of keys that identify rows and link tables. The unit ends with relational algebra, the set of operations on which SQL queries are built.
Key ideas
- A file system stores data in separate files; a DBMS stores related data centrally and controls access to it.
- Problems of file systems: redundancy, inconsistency, difficult access, poor sharing and weak security.
- A relation is a table; its rows are tuples and its columns are attributes.
- Degree is the number of attributes; cardinality is the number of tuples.
- Candidate, primary, alternate and foreign keys identify and link tuples.
- Relational algebra operations include selection, projection, union, set difference and Cartesian product.
How to prepare
Learn the definitions exactly, because questions often swap terms such as degree and cardinality. Practise counting degree and cardinality of results, especially for Cartesian products. Draw two small tables and identify every key in them.
Topics in this chapter
Database and file systems
Database concepts and how a database differs from a file system.
5 questionsRelational data model
Domain, tuple and relation.
5 questionsKeys
Candidate, primary, alternate and foreign keys.
5 questionsRelational algebra
Selection, projection, union, set difference and Cartesian product.
5 questions