You are on page 1of 9

Fundamentals of Database Systems

1
Database and Database Users

Module 5 Relational Model

Course Learning Outcomes:


1. Understand what relational model is
2. Learn the important practical elements of the relational model

Introduction

The relational model (RM) was first described by Computer Scientist Edgar F. Codd.
A relation is nothing, but you call it as a table. Relational Model means how we will
organize the tables in a database.

Relational Model

Relational Model is a relation, or we call it a table with columns and rows. It is based
on the mathematical concept of relation which is represented physically as table. It is
used for data storage and processing.

Course Module
Informal Terms Formal terms

Table Relation

Column header / field Attributes

All possible column values Domain

Row Tuples

Table definition Schema of relation

Tables – relations are saved in the format of tables.

Tuple – A single row of a table.

Relation schema – describes the relation name or table name, attributes, and their names.

Domain – values of attribute.


Fundamentals of Database Systems
3
Database and Database Users

Degree of relation
It is the number of attributes in a relation.

Cardinality of relation
It is the number of tuples in a relation.

Properties of Relation
1. The relation has name that is distinct, from all the names in the relationship schema.
2. Each cell of the relation contains exactly one value.
3. Each attribute has distinct names
4. Each tuple is distinct. There are no duplicate tuples.
5. The order of attributes has no significance.
6. The order of tuples has no significance.

Course Module
Key
Its is one or more columns of a relation or table that is used to identify a record.

1. Unique keys
• Primary key
• Candidate key
• Alternate key
• Surrogate key

2. Foreign key
3. Composite key
Fundamentals of Database Systems
5
Database and Database Users

Candidate Key / Primary Key

Candidate key
▪ Identifies a single record or row.
▪ The value is unique in each column.

Primary key
• It is the identifying key of a candidate key; the rest will be alternate keys
• Used to uniquely identify a record
• There’s only ONE primary key for a table

Composite Key
• Contains two or more attributes (columns)
• All keys can be composite keys

Artificial Primary Key/ Surrogate Key


• Table can have multiple candidate keys. And there will be only one primary key to be
selected, the unselected or the remaining keys are known as a Surrogate key.

Relationship and Foreign Key (FK)


• Relationship describes how tables (relations) are linked. And it is defined by foreign key
(FK) constraint.
• A Foreign Key (FK) references a primary key in another table.

Course Module
Fundamentals of Database Systems
7
Database and Database Users

Course Module
Schema in Relational Database
Relational database schema commonly defines:
▪ Tables - name, primary key
▪ Columns – name, data type, size, value range
▪ Constraints – all kinds of keys
Fundamentals of Database Systems
9
Database and Database Users

References and Supplementary Materials


Books and Journals
1. Ramez Elmasri and Shamkant B. Navathe; 2016; Fundamentals of Database Systems;
USA; Pearson
2. Dr. Kashif Qureshi; 2018; Advanced concepts of information technology; educreation
publishing; India.
Online Supplementary Reading Materials
1. RelationalDBDesing; https://www.relationaldbdesign.com/basic-sql/module3/intro-
relational-databases.php; March 31, 2020
2. Advantages of Database Management System;
https://www.tutorialspoint.com/Advantages-of-Database-Management-System;
March 31, 2020
3. DesigningandManagingData;
https://www.academia.edu/36712448/Entity_Relationship_Diagram_ERD_Basics_CIS
_3730_Designing_and_Managing_Data; April 01, 2020
4. DesigningandManagingData; http://jackzheng.net/teaching/archive/cis3730-2010-
fall/; April 03,2020
Online Instructional Videos
1. Introduction to Database; https://www.youtube.com/watch?v=8e-
wgQnsFxE&list=PLJ5C_6qdAvBHKccG0ZyOxcf_2YO6r4Q4l; March 21, 2020
2. Three levels of Architecture/DBMS;
https://www.youtube.com/watch?v=j6xh8wKfjkY; April 01,2020
3. Relational Data Model; https://www.youtube.com/watch?v=TsSf1Z3g0Kk; Arpil 06,
2020.

Course Module

You might also like