بسم هللا الرحمن الرحيم
Ministry of Higher Education
Nangarhar University
Computer Science Faculty
Database and Information System Department
Fundamentals of Database
Lecture9
4/14/2025 BY HABIBI 1
Contents
RELATIONAL MODEL
RELATIONAL DATABASE MANAGEMENT SYSTEM
TYPES OF RELATIONS
4/14/2025 BY HABIBI 2
Relational Model
Introduced by Dr. E.F Codd.
The relational model for database management is a method to logically
represent and manage the data stored in a database. It is simple to implement.
It uses the concept of relations to represent each and every file.
Relations are Two-Dimensional Tables, and It is easy to implement and easy to
simplify the operations to manipulate the data.
4/14/2025 BY HABIBI 3
Cont.…
Relational Model is used to solve the following problems of earlier databases.
Data Integrity
Data Redundancy
Relational Model is used to handle large amount of data.
4/14/2025 BY HABIBI 4
Relational Database Terminologies
Some important terminologies used in relational database are as follows:
1- Relation:
In a relational model, data is stored in relations. Relation is another term used
Roll. No Name Class
for table.
101 Ahmad DBA
102 Mahmood CCNA
103 Watan JAVA
Figure1: An example of Relation
4/14/2025 BY HABIBI 5
Cont.….
2- Tuple:
In a relational model, every relation consists of many tuples. Tuples are also
called Records or Rows. 102 Mahmood CCNA Figure2: Tuple of Relation
3- Attributes:
An attribute is a named column of a relation. Attributes are also called
Ahmad
characteristics or Field. Figure3: Attributes of a Relation
Mahmood
4/14/2025 BY HABIBI 6
Cont.….
4- Domain:
A domain is a collection of all possible values of one or more attributes.
For example, the value in the field “Class” can be the name of any taught class.
It is known as Class Domain.
5- Degree:
The number of attributes are called the degree of that relation.
4/14/2025 BY HABIBI 7
Cont.….
Domain Roll. No Domain Name Domain Class
Primary Key Roll. No Name Class Attribute
101 Ahmad DBA
Relation Tuples
102 Mahmood CCNA
103 Watan JAVA
Figure4: Database Terminologies
4/14/2025 BY HABIBI 8
Advantages of Relational Model
Some important advantages of Relational Model are as Follows:
1. Data Integrity:
Data integrity is a concept and process that ensures the accuracy and
completeness, of an organization’s data.
By following the process, organizations not only ensure the integrity of the data
but guarantee they have accurate and correct data in their database.
4/14/2025 BY HABIBI 9
Cont.….
2. Data Redundancy:
Data redundancy occurs when the same piece of data is stored in two or more
separate places in database.
Sometimes data redundancy happens by not implementing constraints to
database.
This challenge occur in all size’s industries and leads to make high storage
costs, errors, and etc.
4/14/2025 BY HABIBI 10
Relational Database Management System
A relational database management system (RDBMS) is a program used to create,
update, and manage relational databases.
A RDBMS is a collection of software programs for creating, maintaining,
modifying and manipulating a relational database.
Some of the most well-known RDBMSs include MySQL, PostgreSQL,
MariaDB, Microsoft SQL Server, and Oracle Database.
4/14/2025 BY HABIBI 11
Components of RDBMS
A RDBMS contains several components.
Each component has a special role in the functioning of system.
These components are also called the functional components.
They are as follows:
File Manager, Database Manager, Query Processor, Data Dictionary, DML,
DDL.
4/14/2025 BY HABIBI 12
Cont.….
1- File Manager: File Manger Allocate Space on the disk. It also organized
Data Storage.
2- Database Manager: Database Manager acts as an interface between the
users and the data in the database.
3- Query Processor: Query Processor reads the queries issued by the database
users.
4/14/2025 BY HABIBI 13
Cont.….
4- Data Dictionary: Data Dictionary stores information about data. It stores the
description of the structure and data of the relation within a database.
5- DML: Stands for Data Manipulation Language. It has commands to insert,
delete ands update data in the database.
6- DDL: Stands for Data Definition Language. It has commands to create, alter,
Truncate and drop the structure of database and objects of data.
4/14/2025 BY HABIBI 14
Types of Relations
Different types of relations in relational database system are as follow:
1- Base Table: it is a table that is created by the user. It can be create, alter and
remove from a database.
2- Query Result: it is a table that is derived from another table, using different
operation.
3- Views: it is a virtual table. Used to hide sensitive data of the original table.
4/14/2025 BY HABIBI 15
Properties of Relation
1- Atomic Values in Fields: there can be no repeating groups in a Field.
2- Entries from Same Domain: in a relation, all entries in a given column belong
to the same domain.
3- Unique Tuples: each tuple in a relation must be unique. It is guaranteed by
assigning a Primary key.
4- Unique Attribute Name: the name of each attribute of a relation should be
unique.
4/14/2025 BY HABIBI 16
4/14/2025 BY HABIBI 17