SlideShare a Scribd company logo
Dr. Amiya Ranjan Panda
Assistant Professor [II]
School of Computer Engineering,
Kalinga Institute of Industrial Technology (KIIT),
Deemed to be University,Odisha
Relational Model
KALINGA INSTITUTE OF INDUSTRIAL
TECHNOLOGY
School Of Computer
Engineering
4 Credit Lecture Note 09
Chapter Contents
q Relational Model
q Relational Database
q Relational Data Integrity
q Database Languages
q CODD’s Rule
2
3
Relational Model
Ø Relational data model is the primary data model for commercial data-
processing applications.
Ø A relational database consists of a collection of tables, each of which is
assigned a unique name.
Ø A row in a table represents a relationship among a set of values. Thus, a table is
an entity set and a row is an entity.
Ø The columns or properties are called attributes. For each attribute, there is a
set of permitted values, called the domain of that attribute. Same domain can be
shared by more than one attribute.
Ø Degree is the number of attributes in the relation/ table, where as Cardinality is
the number of tuples or rows in the relation/table.
Ø The attribute values are required to be atomic, i.e. indivisible.
Ø Let D1, D2, and D3 are the domains. Any row of the table consists of a 3-tuple
(v1, v2, v3) where v1 ∈ D1, v2 ∈ D2 and v3 ∈ D3. Thus, the table will
contain only a subset of the set of all possible rows. Therefore, the table is a
subset of D1 x D2 x D3.
Ø Each attribute of a relation has a unique name.
Ø NULL Value is a domain value which is a member of any possible domain.
4
Relational Model
Ø Relational data model is the primary data model for commercial data-
processing applications. Database Schema is the logical design of the database.
If (a1, a2 ...an ) be the attributes, then the relation schema will be
R=(a1,a2 ...an )
Ø Database Instance is the snapshot of the data in the database at a given instant
of time
Ø Relation is denoted by lower case names and Relation Schema is the name
beginning with an uppercase letter
5
Relational Database
Ø Relational database is a database consisting of multiple relations or tables.
The information about an enterprise is broken up into parts, with each relation
storing one part of the information
Ø The normalization process deals with how to design relational schemas.
6
Relational Data Integrity
Ø Candidate key is an attribute or set of attributes that can uniquely identify a
row or tuple in a table. Let R be the relation with attributes a1, a2 ... an . The
set of attributes of R is said to be a candidate key of R iff the following two
properties holds:
ü Uniqueness: At any given time, no two distinct tuples or rows of R have
the same value for ai , the same value for aj...an
ü Minimality: No proper subset of the set (ai , aj ... an ) has the uniqueness
property
Ø The major types of integrity constraints are:
1. Domain Constraints:
ü All the values that appear in a column of a relation must be taken from the
same domain.
ü This constraint can be applied by specifying a particular data type to a
column.
2. Entity Integrity Constraints:
ü The entity integrity rule is designed to assure that every relation has a
primary key, and that the data values for that primary key are all valid.
ü Usually, the primary key of each relation is the first column.
7
Relational Data Integrity…
3. Referential Integrity:
ü In relational data model, associations between tables are defined by using
foreign keys
ü A referential integrity constraint is a rule that maintains consistency
among the rows of two relations
ü The rule states that if there is a foreign key in one relation, either each
foreign key value must match a primary key value in the other table or
else the foreign key value must be NULL
ü A foreign key that references its own relation is known as recursive
foreign key
ü The linking between the foreign key and primary key allows a set of
relations to form an integrated database
4. Operational Constraints:
ü These are the constraints enforced in the database by the business rules
or real world limitations.
ü The linking between the foreign key and primary key allows a set of
relations to form an integrated database
8
Database Languages
Ø DDL (Data Definition Language)
ü DDL is used to define the conceptual schema. The definition includes the
information of all the entity sets and their associated attributes as well as
the relationships between the entity sets.
ü The data values stored in the database must specify certain consistency
constraints. The database systems check these constraints every time the
database is updated.
ü The output of the DDL is placed in the Data Dictionary which contains the
metadata (data about data).
ü The data dictionary is considered to be a special type of table, which can
only be accessed and updated by the database system itself.
ü The database system consults the data dictionary, before querying or
modifying the actual data, for the validation purpose.
ü CREATE, ALTER, DROP, RENAME & TRUNCATE
Ø DML (Data Manipulation Language)
ü DML is used to manipulate data in the database.
ü A query is a statement in the DML that requests the retrieval of data from
the database . SELECT, INSERT, UPDATE & DELETE
9
Database Languages…
Ø DCL (Data Control Languages)
ü DCL allows in changing the permissions on database structures
ü GRANT & REVOKE
Ø TCL (Transaction Control Language)
üTCL allows permanently recording the changes made to the rows stored in a
table or undoing such changes
üCOMMIT, ROLLBACK & SAVEPOINT
10
CODD’s Rule
Ø Codd’s rules are a set of 12 rules proposed by E. F. Codd designed to
define what is required from a database management system in order for
it to be considered relational, i.e. RDBMS. Any database that satisfies
even six rules may be categorized as RDBMS.
Ø Rule0: A relational system should be able to manage databases, entirely
through its relational capabilities
Ø Rule1: Information representation: The entire information is explicitly
and logically represented by the data values of the tables in the relational
data model
Ø Rule2: Guaranteed access: In relational model, at each cell, i.e. the
interaction of each row and column, it will have one and only one value
of data (or NULL value). Each value of data must be addressable via the
combination of a table name, primary key value and the column name
Ø Rule3: Systematic treatment of NULL values: NULL values are
supported in fully relational DBMS for representing missing information
and inapplicable information in a systematic way independent of data
type.
11
CODD’s Rule
Ø Rule4: Database description rule: The database description is
represented at the logical level in the same way as ordinary data, so that
authorized users can apply the same relational language to its
interrogation as they apply to the regular data. This means, the RDBMS
should have a data dictionary
Ø Rule5: Comprehensive data sub-language: The RDBMS should have
its own extension of SQL. The SQL should support Data Definition, View
Definition, Data Manipulation, Integrity Constraint, and Authorization
Ø Rule6: Views updation: All views that are theoretically updatable are
also updatable by the system. Similarly, the views which are theoretically
non-updatable are also non-updatable by the database system.
Ø Rule7: High-level update, insert, deletes: A RDBMS should not only
support retrieval of data as relational sets, but should also support
insertion, updation and deletion of data as a relational set.
Ø Rule8: Physical data independence: Application programs and
terminal activities are not disturbed if any changes are made either in
storage representations or access methods.
12
CODD’s Rule
Ø Rule 9: Logical data independence: User programs and the user
should not be aware of any changes to the structure of the tables such
as the addition of extra columns
Ø Rule10: Distribution independence: A relational DBMS has distribution
independence. The RDBMS may spread across more than one system
and across several networks. However to the end-user, the tables
should appear no different to those that are local.
Ø Rule11: Integrity rule: Integrity rules must be supported by the
relational data sub-language; they can be stored in the catalogue and
not in the application program. Entity integrity: no component of a
primary key may have a NULL value. Referential integrity: for every
unique non-null ’foreign key’ values in the database, there should be a
matching primary key value from the same domain.
Ø Rule12: Data integrity cannot be subverted: If a relational system has
a low-level language, that low level cannot be used to subvert or bypass
the integrity rules and constraints expressed in the higher level relational
language
13

More Related Content

PDF
Dbms 10: Conversion of ER model to Relational Model
PDF
Dbms 2: Data Model
PDF
Dbms 7: ER Diagram Design Issue
PPT
RDBMS_Unit 01
PPTX
PPTX
physical and logical data independence
PPT
Dbms relational model
PPTX
DBMS - ER Model
Dbms 10: Conversion of ER model to Relational Model
Dbms 2: Data Model
Dbms 7: ER Diagram Design Issue
RDBMS_Unit 01
physical and logical data independence
Dbms relational model
DBMS - ER Model

What's hot (20)

PPTX
DBMS - Relational Model
PPTX
ER Modeling and Introduction to RDBMS
PDF
Chapter 3 Entity Relationship Model
PPTX
database management system
PPT
Lecture 03 data abstraction and er model
PPTX
Database : Relational Data Model
PDF
Database Design and the ER Model, Indexing and Hashing
PPTX
All data models in dbms
PPTX
DBMS OF DATA MODEL Deepika 2
PDF
Data Models & Introduction to UML
PPTX
PPTX
Chapter-8 Relational Database Design
PPTX
Chapter-2 Database System Concepts and Architecture
PPT
Relational Databases 2
PPT
Mca ii-dbms- u-ii-the relational database model
PPTX
Chapter-3 Data Modeling using ER Model
PPTX
Er model
PPTX
Chapter-5 The Relational Data Model
PPT
Introduction to Data Abstraction
PPTX
Logical database design and the relational model(database)
DBMS - Relational Model
ER Modeling and Introduction to RDBMS
Chapter 3 Entity Relationship Model
database management system
Lecture 03 data abstraction and er model
Database : Relational Data Model
Database Design and the ER Model, Indexing and Hashing
All data models in dbms
DBMS OF DATA MODEL Deepika 2
Data Models & Introduction to UML
Chapter-8 Relational Database Design
Chapter-2 Database System Concepts and Architecture
Relational Databases 2
Mca ii-dbms- u-ii-the relational database model
Chapter-3 Data Modeling using ER Model
Er model
Chapter-5 The Relational Data Model
Introduction to Data Abstraction
Logical database design and the relational model(database)
Ad

Similar to Dbms 9: Relational Model (20)

PPTX
Relational Database Management System part II
PDF
PDF
Sql interview questions and answers
PPTX
codd rules of dbms given by E F codd who is called father of dbms
PPTX
UNIT2-Reference ppt..pptx which weil; be leading tpo the undrsdtanding od thr...
PPTX
Codds rules & keys
PPTX
PPT_DBMS.pptx
PPTX
Unit 2 DBMS.pptx
DOCX
COMPUTERS Database
PPT
Database Technology Teaching Material For Learn
PPT
RDBMS_Concept.ppt
PPTX
ip class 12 cnsddidsnfsdifsdbfuodfd (1).pptx
PDF
DBMS and Rdbms fundamental concepts
PDF
RDBMS with MySQL
PDF
Systems Analysis and Design in a Changing World 7th Edition Satzinger Solutio...
PPTX
Relational Database.pptx
PDF
Systems Analysis and Design in a Changing World 7th Edition Satzinger Solutio...
PDF
Systems Analysis and Design in a Changing World 7th Edition Satzinger Solutio...
PPTX
Relational Model in DBMS detail explanation
PDF
Systems Analysis and Design in a Changing World 7th Edition Satzinger Solutio...
Relational Database Management System part II
Sql interview questions and answers
codd rules of dbms given by E F codd who is called father of dbms
UNIT2-Reference ppt..pptx which weil; be leading tpo the undrsdtanding od thr...
Codds rules & keys
PPT_DBMS.pptx
Unit 2 DBMS.pptx
COMPUTERS Database
Database Technology Teaching Material For Learn
RDBMS_Concept.ppt
ip class 12 cnsddidsnfsdifsdbfuodfd (1).pptx
DBMS and Rdbms fundamental concepts
RDBMS with MySQL
Systems Analysis and Design in a Changing World 7th Edition Satzinger Solutio...
Relational Database.pptx
Systems Analysis and Design in a Changing World 7th Edition Satzinger Solutio...
Systems Analysis and Design in a Changing World 7th Edition Satzinger Solutio...
Relational Model in DBMS detail explanation
Systems Analysis and Design in a Changing World 7th Edition Satzinger Solutio...
Ad

More from Amiya9439793168 (8)

PDF
Dbms 14: Relational Calculus
PDF
Dbms 13: Query Using Relational Algebra
PDF
Dbms 12: Join
PDF
Dbms 11: Relational Algebra
PDF
Dbms 8: Enhanced ER Model
PDF
Dbms 6: ER Modeling
PDF
Dbms 3: 3 Schema Architecture
PDF
Introduction to Database Management System
Dbms 14: Relational Calculus
Dbms 13: Query Using Relational Algebra
Dbms 12: Join
Dbms 11: Relational Algebra
Dbms 8: Enhanced ER Model
Dbms 6: ER Modeling
Dbms 3: 3 Schema Architecture
Introduction to Database Management System

Recently uploaded (20)

PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPT
Project quality management in manufacturing
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
PPT on Performance Review to get promotions
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Welding lecture in detail for understanding
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
Construction Project Organization Group 2.pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPT
Mechanical Engineering MATERIALS Selection
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Geodesy 1.pptx...............................................
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
OOP with Java - Java Introduction (Basics)
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
R24 SURVEYING LAB MANUAL for civil enggi
Model Code of Practice - Construction Work - 21102022 .pdf
Project quality management in manufacturing
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPT on Performance Review to get promotions
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Welding lecture in detail for understanding
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
UNIT 4 Total Quality Management .pptx
Internet of Things (IOT) - A guide to understanding
Construction Project Organization Group 2.pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Mechanical Engineering MATERIALS Selection
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Geodesy 1.pptx...............................................
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
OOP with Java - Java Introduction (Basics)

Dbms 9: Relational Model

  • 1. Dr. Amiya Ranjan Panda Assistant Professor [II] School of Computer Engineering, Kalinga Institute of Industrial Technology (KIIT), Deemed to be University,Odisha Relational Model KALINGA INSTITUTE OF INDUSTRIAL TECHNOLOGY School Of Computer Engineering 4 Credit Lecture Note 09
  • 2. Chapter Contents q Relational Model q Relational Database q Relational Data Integrity q Database Languages q CODD’s Rule 2
  • 3. 3 Relational Model Ø Relational data model is the primary data model for commercial data- processing applications. Ø A relational database consists of a collection of tables, each of which is assigned a unique name. Ø A row in a table represents a relationship among a set of values. Thus, a table is an entity set and a row is an entity. Ø The columns or properties are called attributes. For each attribute, there is a set of permitted values, called the domain of that attribute. Same domain can be shared by more than one attribute. Ø Degree is the number of attributes in the relation/ table, where as Cardinality is the number of tuples or rows in the relation/table. Ø The attribute values are required to be atomic, i.e. indivisible. Ø Let D1, D2, and D3 are the domains. Any row of the table consists of a 3-tuple (v1, v2, v3) where v1 ∈ D1, v2 ∈ D2 and v3 ∈ D3. Thus, the table will contain only a subset of the set of all possible rows. Therefore, the table is a subset of D1 x D2 x D3. Ø Each attribute of a relation has a unique name. Ø NULL Value is a domain value which is a member of any possible domain.
  • 4. 4 Relational Model Ø Relational data model is the primary data model for commercial data- processing applications. Database Schema is the logical design of the database. If (a1, a2 ...an ) be the attributes, then the relation schema will be R=(a1,a2 ...an ) Ø Database Instance is the snapshot of the data in the database at a given instant of time Ø Relation is denoted by lower case names and Relation Schema is the name beginning with an uppercase letter
  • 5. 5 Relational Database Ø Relational database is a database consisting of multiple relations or tables. The information about an enterprise is broken up into parts, with each relation storing one part of the information Ø The normalization process deals with how to design relational schemas.
  • 6. 6 Relational Data Integrity Ø Candidate key is an attribute or set of attributes that can uniquely identify a row or tuple in a table. Let R be the relation with attributes a1, a2 ... an . The set of attributes of R is said to be a candidate key of R iff the following two properties holds: ü Uniqueness: At any given time, no two distinct tuples or rows of R have the same value for ai , the same value for aj...an ü Minimality: No proper subset of the set (ai , aj ... an ) has the uniqueness property Ø The major types of integrity constraints are: 1. Domain Constraints: ü All the values that appear in a column of a relation must be taken from the same domain. ü This constraint can be applied by specifying a particular data type to a column. 2. Entity Integrity Constraints: ü The entity integrity rule is designed to assure that every relation has a primary key, and that the data values for that primary key are all valid. ü Usually, the primary key of each relation is the first column.
  • 7. 7 Relational Data Integrity… 3. Referential Integrity: ü In relational data model, associations between tables are defined by using foreign keys ü A referential integrity constraint is a rule that maintains consistency among the rows of two relations ü The rule states that if there is a foreign key in one relation, either each foreign key value must match a primary key value in the other table or else the foreign key value must be NULL ü A foreign key that references its own relation is known as recursive foreign key ü The linking between the foreign key and primary key allows a set of relations to form an integrated database 4. Operational Constraints: ü These are the constraints enforced in the database by the business rules or real world limitations. ü The linking between the foreign key and primary key allows a set of relations to form an integrated database
  • 8. 8 Database Languages Ø DDL (Data Definition Language) ü DDL is used to define the conceptual schema. The definition includes the information of all the entity sets and their associated attributes as well as the relationships between the entity sets. ü The data values stored in the database must specify certain consistency constraints. The database systems check these constraints every time the database is updated. ü The output of the DDL is placed in the Data Dictionary which contains the metadata (data about data). ü The data dictionary is considered to be a special type of table, which can only be accessed and updated by the database system itself. ü The database system consults the data dictionary, before querying or modifying the actual data, for the validation purpose. ü CREATE, ALTER, DROP, RENAME & TRUNCATE Ø DML (Data Manipulation Language) ü DML is used to manipulate data in the database. ü A query is a statement in the DML that requests the retrieval of data from the database . SELECT, INSERT, UPDATE & DELETE
  • 9. 9 Database Languages… Ø DCL (Data Control Languages) ü DCL allows in changing the permissions on database structures ü GRANT & REVOKE Ø TCL (Transaction Control Language) üTCL allows permanently recording the changes made to the rows stored in a table or undoing such changes üCOMMIT, ROLLBACK & SAVEPOINT
  • 10. 10 CODD’s Rule Ø Codd’s rules are a set of 12 rules proposed by E. F. Codd designed to define what is required from a database management system in order for it to be considered relational, i.e. RDBMS. Any database that satisfies even six rules may be categorized as RDBMS. Ø Rule0: A relational system should be able to manage databases, entirely through its relational capabilities Ø Rule1: Information representation: The entire information is explicitly and logically represented by the data values of the tables in the relational data model Ø Rule2: Guaranteed access: In relational model, at each cell, i.e. the interaction of each row and column, it will have one and only one value of data (or NULL value). Each value of data must be addressable via the combination of a table name, primary key value and the column name Ø Rule3: Systematic treatment of NULL values: NULL values are supported in fully relational DBMS for representing missing information and inapplicable information in a systematic way independent of data type.
  • 11. 11 CODD’s Rule Ø Rule4: Database description rule: The database description is represented at the logical level in the same way as ordinary data, so that authorized users can apply the same relational language to its interrogation as they apply to the regular data. This means, the RDBMS should have a data dictionary Ø Rule5: Comprehensive data sub-language: The RDBMS should have its own extension of SQL. The SQL should support Data Definition, View Definition, Data Manipulation, Integrity Constraint, and Authorization Ø Rule6: Views updation: All views that are theoretically updatable are also updatable by the system. Similarly, the views which are theoretically non-updatable are also non-updatable by the database system. Ø Rule7: High-level update, insert, deletes: A RDBMS should not only support retrieval of data as relational sets, but should also support insertion, updation and deletion of data as a relational set. Ø Rule8: Physical data independence: Application programs and terminal activities are not disturbed if any changes are made either in storage representations or access methods.
  • 12. 12 CODD’s Rule Ø Rule 9: Logical data independence: User programs and the user should not be aware of any changes to the structure of the tables such as the addition of extra columns Ø Rule10: Distribution independence: A relational DBMS has distribution independence. The RDBMS may spread across more than one system and across several networks. However to the end-user, the tables should appear no different to those that are local. Ø Rule11: Integrity rule: Integrity rules must be supported by the relational data sub-language; they can be stored in the catalogue and not in the application program. Entity integrity: no component of a primary key may have a NULL value. Referential integrity: for every unique non-null ’foreign key’ values in the database, there should be a matching primary key value from the same domain. Ø Rule12: Data integrity cannot be subverted: If a relational system has a low-level language, that low level cannot be used to subvert or bypass the integrity rules and constraints expressed in the higher level relational language
  • 13. 13