DB Topic 5
DB Topic 5
Topic 5:
The Relational Model 1
Learning Outcomes
By the end of this topic, students will be able to:
Understand the aims of the relational model
Understand the basic concepts of the relational
model
Define key terms of the relational model
Data Independence
Changes in the internal data representation,
such as file structure, storage and access paths
should not have an effect on the applications
programs.
Normalised Relations
By having an underpinning in set theory, it is
possible to organise relations as sets so that there
is a minimum of data redundancy. This process is
known as normalisation.
Terminology -1
Relation
Attribute
Domain
Null
Attributes
Terminology - 2
Tuple
Degree
Cardinality
Relational Database
Relational Schema
Cardinality
4 Tuples
Degree
Alternative Terminology
Formal Term Alternative 1 Alternative 2
Properties of a Relation - 1
It has a name which is unique within the relational
schema.
Each cell of a relation contains exactly one value.
Each attribute has a name.
Each tuple is unique.
The order of attributes is insignificant.
The order of tuples is insignificant.
Properties of a Relation - 2
It has a name which is unique within the relational
schema - X
Each cell of a relation contains exactly one value -
X
Each attribute has a name YES
Each tuple is unique - YES
The order of attributes is insignificant YES
The order of tuples is insignificant - YES
Students
Turned into a Student ID Name Address Course
set of normalised
28 Guy Smith History
relations...
23 Sarah 12 New Street Computing
Anusiem Lagos
Student Modules
Student ID Modules Code
Modules
28 Net
Module Code Name
23 Med 1 Med1 Medieval History 1
28 OS OS Operating Systems
Normalisation
This process of moving from data that is not in a
relational form, to a relation, and finally to a set of
ideal relations is known as normalisation.
Primary key
Super key
Candidate key
Foreign key
References
Connolly, T. & Begg, C. (2004). Database Systems: A
Practical Approach to Design, Implementation, and
Management, 4th Edition. Addison Wesley. Chapter 3.
Codd, E. F. (1970), A Relational Model for Large
Shared Data Banks. Retrieved on 20/05/11 from:
http://www.seas.upenn.edu/~zives/03f/cis550/codd.pdf
McJones, P. (1995). Discussion of System R: The
1995 SQL Reunion, People, Projects and Politics.
Retrieved on 20/05/11 from:
http://www.mcjones.org/System_R/SQL_Reunion_95/
Any Questions?