SlideShare a Scribd company logo
Relation Database Model
Unit 3
By
Anjan Baniya
Anjan Phuyal
Asis Subedi
Prakash Ghimire
Niraj Giri
Introduction to Relational Model
• The relational model is the theoretical basis of relational databases.
• The relational model of data is based on the concepts of relations.
• A “Relation” is a mathematical concept based on the ideas of sets.
• The Relational Model was purposed by Edgar Frank Codd for IBM in
1970 to model data in the form of relations or tables.
• Relational Model represents how data is stored in Relational
Databases. A relational database stores data in the form of
relations(tables).
What is RDBMS?
• RDBMS stands for Relational Database Management System. RDBMS
is the basic for SQL and for all modern database system like MS SQL
Server,IBM,DB2,Oracle,mysql and Microsoft access.
• A Relational database management system(RDBMS) is a database
management system(DBMS) that is based on the relational model.
Properties of Relational Model
• Each Relation has unique name.
• Each Tuple /row is unique : No duplicate row (Each Row is called
Tuple)
• Entries in any column have the same domain.
• Each attributes has a unique name.
• Orders of the columns or rows is irrelevant. i.e. relations are
unordered.
• Each cell of relation contains exactly one value. i.e. attributes values
are required to be atomic.
Fig: Keywords used in Relational database model
Schema Diagram
• Schema diagram is a graphical representation of database schema
along with primary key and foreign key dependencies.
• In schema diagram, each relation is represented by box where
attributes are listed inside box and relation name is specified above it.
Fig: Schema Diagram
Keys
• It is an attributes or set of attributes that uniquely identifies any
record or row of data from the table.
• It is also used to establish and identify relationships between tables.
• Keys play an important role in the relational database.
Types of keys
1. Super key is a combination of all possible attributes that can
uniquely identify the row or tuple in the given relation.
2. Candidate key is an attribute or set of attributes that can uniquely
identify a tuple.
3. Primary key is one of the candidate key chosen to uniquely identify
the tuple in the relation.
4. Foreign key is a mechanism used to establish a relationship
between two tables. It is a column or a set of columns in one table
that refers to the primary key of another table.
5. Composite key is the key that have more than one attributes.
Relational Algebra
• Relational Algebra is a procedural query language which takes a
relation as an input and generates a relation as an output.
• Relational Algebra is a language for expressing relational database
queries.
• It uses operators to perform queries. An operator can be either unary
and binary.
Types of Operation in Relational Algebra
• Basic operations:
1. Selection (σ) Selects a subset of rows from relation.
2. Projection (π) Selects a subset of columns from relation.
3. Cross-product (×) Allows us to combine two relations.
4. Set-difference (−) Tuples in relation 1, but not in relation 2.
5. Union (U) Tuples in relation 1 and in relation 2.
6. Rename( ρ) Use new name for the Tables or fields.
• Additional operations:
1. Intersection (∩), join, division(÷): Not essential, but (very!) useful.
Types of Join
• Inner join: Contains
only those tuples that
satisfy the matching
condition
• Outer join: Contains matching
tuples that satisfy the matching
condition, along with some or all
tuples that do not satisfy the
matching conditions. Contains all
rows from either one or both
relation.
1. Left Outer join:
Left relation tuples will always be in
result whether the value is matched
or not.
2. Right outer join:
Right relation tuples will always be
in result whether the value is
matched or not.
3. Full Outer Join:
Tuples from both relations are
present in result whether the value
is matched or
not.
Thank You

More Related Content

Similar to relationalDatabaseModel.pptx

Islamic University Previous Year Question Solution 2019 (ADBMS)
Islamic University Previous Year Question Solution 2019 (ADBMS)Islamic University Previous Year Question Solution 2019 (ADBMS)
Islamic University Previous Year Question Solution 2019 (ADBMS)
Rakibul Hasan Pranto
 
The relational database model
The relational database modelThe relational database model
The relational database model
Dhani Ahmad
 
Dbms relational data model and sql queries
Dbms relational data model and sql queries Dbms relational data model and sql queries
Dbms relational data model and sql queries
Tetala Vishnu Vardhan Reddy
 
Query Decomposition and data localization
Query Decomposition and data localization Query Decomposition and data localization
Query Decomposition and data localization
Hafiz faiz
 
DBMS:Relational Modal
DBMS:Relational ModalDBMS:Relational Modal
DBMS:Relational Modal
VaishnaviVaishnavi17
 
Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data Model
Kunal Anand
 
Database Engineering: Part one
Database Engineering: Part oneDatabase Engineering: Part one
Database Engineering: Part one
Christoph Becher
 
DATABASE DESIGN.pptx
DATABASE DESIGN.pptxDATABASE DESIGN.pptx
DATABASE DESIGN.pptx
SaranCreations
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdf
TamiratDejene1
 
Relational Data Model.pptx
Relational Data Model.pptxRelational Data Model.pptx
Relational Data Model.pptx
KhawajaMuhammadAwais
 
Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Jotham Gadot
 
19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf
GOWTHAMR721887
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
Jayant Dalvi
 
relational database
relational databaserelational database
relational database
Surya Swaroop
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
harshalkwagh999
 
ch2-slide Data Models.pptx
ch2-slide Data Models.pptxch2-slide Data Models.pptx
ch2-slide Data Models.pptx
TamiratDejene1
 
COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database
Rc Os
 
DBMS
DBMSDBMS
DBMS
emran nur
 
overview of database concept
overview of database conceptoverview of database concept
overview of database concept
gourav kottawar
 

Similar to relationalDatabaseModel.pptx (20)

Islamic University Previous Year Question Solution 2019 (ADBMS)
Islamic University Previous Year Question Solution 2019 (ADBMS)Islamic University Previous Year Question Solution 2019 (ADBMS)
Islamic University Previous Year Question Solution 2019 (ADBMS)
 
The relational database model
The relational database modelThe relational database model
The relational database model
 
Dbms relational data model and sql queries
Dbms relational data model and sql queries Dbms relational data model and sql queries
Dbms relational data model and sql queries
 
DATA MODELS.pptx
DATA MODELS.pptxDATA MODELS.pptx
DATA MODELS.pptx
 
Query Decomposition and data localization
Query Decomposition and data localization Query Decomposition and data localization
Query Decomposition and data localization
 
DBMS:Relational Modal
DBMS:Relational ModalDBMS:Relational Modal
DBMS:Relational Modal
 
Chapter-5 The Relational Data Model
Chapter-5 The Relational Data ModelChapter-5 The Relational Data Model
Chapter-5 The Relational Data Model
 
Database Engineering: Part one
Database Engineering: Part oneDatabase Engineering: Part one
Database Engineering: Part one
 
DATABASE DESIGN.pptx
DATABASE DESIGN.pptxDATABASE DESIGN.pptx
DATABASE DESIGN.pptx
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdf
 
Relational Data Model.pptx
Relational Data Model.pptxRelational Data Model.pptx
Relational Data Model.pptx
 
Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03
 
19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf19IS305_U2_LP4_LM4-22-23.pdf
19IS305_U2_LP4_LM4-22-23.pdf
 
Structured system analysis and design
Structured system analysis and design Structured system analysis and design
Structured system analysis and design
 
relational database
relational databaserelational database
relational database
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
 
ch2-slide Data Models.pptx
ch2-slide Data Models.pptxch2-slide Data Models.pptx
ch2-slide Data Models.pptx
 
COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database
 
DBMS
DBMSDBMS
DBMS
 
overview of database concept
overview of database conceptoverview of database concept
overview of database concept
 

Recently uploaded

Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
Javier Lasa
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
nhiyenphan2005
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 

Recently uploaded (20)

Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdfJAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
JAVIER LASA-EXPERIENCIA digital 1986-2024.pdf
 
Bài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docxBài tập unit 1 English in the world.docx
Bài tập unit 1 English in the world.docx
 
The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 

relationalDatabaseModel.pptx

  • 1. Relation Database Model Unit 3 By Anjan Baniya Anjan Phuyal Asis Subedi Prakash Ghimire Niraj Giri
  • 2. Introduction to Relational Model • The relational model is the theoretical basis of relational databases. • The relational model of data is based on the concepts of relations. • A “Relation” is a mathematical concept based on the ideas of sets. • The Relational Model was purposed by Edgar Frank Codd for IBM in 1970 to model data in the form of relations or tables. • Relational Model represents how data is stored in Relational Databases. A relational database stores data in the form of relations(tables).
  • 3. What is RDBMS? • RDBMS stands for Relational Database Management System. RDBMS is the basic for SQL and for all modern database system like MS SQL Server,IBM,DB2,Oracle,mysql and Microsoft access. • A Relational database management system(RDBMS) is a database management system(DBMS) that is based on the relational model.
  • 4. Properties of Relational Model • Each Relation has unique name. • Each Tuple /row is unique : No duplicate row (Each Row is called Tuple) • Entries in any column have the same domain. • Each attributes has a unique name. • Orders of the columns or rows is irrelevant. i.e. relations are unordered. • Each cell of relation contains exactly one value. i.e. attributes values are required to be atomic.
  • 5. Fig: Keywords used in Relational database model
  • 6. Schema Diagram • Schema diagram is a graphical representation of database schema along with primary key and foreign key dependencies. • In schema diagram, each relation is represented by box where attributes are listed inside box and relation name is specified above it. Fig: Schema Diagram
  • 7. Keys • It is an attributes or set of attributes that uniquely identifies any record or row of data from the table. • It is also used to establish and identify relationships between tables. • Keys play an important role in the relational database.
  • 8. Types of keys 1. Super key is a combination of all possible attributes that can uniquely identify the row or tuple in the given relation. 2. Candidate key is an attribute or set of attributes that can uniquely identify a tuple. 3. Primary key is one of the candidate key chosen to uniquely identify the tuple in the relation. 4. Foreign key is a mechanism used to establish a relationship between two tables. It is a column or a set of columns in one table that refers to the primary key of another table.
  • 9. 5. Composite key is the key that have more than one attributes.
  • 10. Relational Algebra • Relational Algebra is a procedural query language which takes a relation as an input and generates a relation as an output. • Relational Algebra is a language for expressing relational database queries. • It uses operators to perform queries. An operator can be either unary and binary.
  • 11. Types of Operation in Relational Algebra • Basic operations: 1. Selection (σ) Selects a subset of rows from relation. 2. Projection (π) Selects a subset of columns from relation. 3. Cross-product (×) Allows us to combine two relations. 4. Set-difference (−) Tuples in relation 1, but not in relation 2. 5. Union (U) Tuples in relation 1 and in relation 2. 6. Rename( ρ) Use new name for the Tables or fields. • Additional operations: 1. Intersection (∩), join, division(÷): Not essential, but (very!) useful.
  • 12. Types of Join • Inner join: Contains only those tuples that satisfy the matching condition
  • 13. • Outer join: Contains matching tuples that satisfy the matching condition, along with some or all tuples that do not satisfy the matching conditions. Contains all rows from either one or both relation. 1. Left Outer join: Left relation tuples will always be in result whether the value is matched or not. 2. Right outer join: Right relation tuples will always be in result whether the value is matched or not. 3. Full Outer Join: Tuples from both relations are present in result whether the value is matched or not.