SlideShare a Scribd company logo

Relational Data Model Introduction

Nishant Munjal
Nishant Munjal
Nishant MunjalAssistant Professor at Gurukula Kangri University

These are created to teach students of Engineering.

Relational Data Model Introduction

1 of 21
Download to read offline
UNIT-II
RELATIONAL DATA MODEL AND LANGUAGE
Relational Data Model
'The 'Relational Database Model is the most common model in industry today.
A relational database is based on the relational model developed by E.F. Codd.
A relational database allows the definition of data structures, storage and retrieval operations
and integrity constraints. In such a database the data and relations between them are organized
into tables. A table is a collection of records and each record in a table contains the same fields.
Properties of the Relational database
model
Properties of Relational Tables:
1. Data is presented as a collection of relations.
2. Each relation is depicted as a table.
3. Columns are attributes that belong to the entity modelled by the table (ex. In a student
table, you could have name, address, student ID, major, etc.).
4. Each row ("tuple") represents a single entity (ex. In a student table, John Smith, 14 Oak St,
9002342, Accounting, would represent one student entity).
5. Every table has a set of attributes that taken together as a "key" (technically, a "superkey")
uniquely identifies each entity (Ex. In the student table, “student ID” would uniquely identify
each student – no two students would have the same student ID).
Concepts
Tables − In relational data model, relations are saved in the format of Tables. This format stores
the relation among entities. A table has rows and columns, where rows represents records and
columns represent the attributes.
Tuple − A single row of a table, which contains a single record for that relation is called a tuple.
Relation instance − A finite set of tuples in the relational database system represents relation
instance. Relation instances do not have duplicate tuples.
Relation schema − A relation schema describes the relation name (table name), attributes, and
their names.
Relation key − Each row has one or more attributes, known as relation key, which can identify
the row in the relation (table) uniquely.
Attribute domain − Every attribute has some pre-defined value scope, known as attribute
domain.
Relational Integrity Constraints
Every relation has some conditions that must hold for it to be a valid relation. These conditions
are called Relational Integrity Constraints. There are three main integrity constraints −
1. Key constraints
2. Domain constraints
3. Referential integrity constraints
Example
The diagram below shows a
conceptual model with two
associations: WrittenBy and
PublishedBy. The Book entity
type has a property, PublisherId,
that references the entity key of
the Publisher entity type when
you define a referential integrity
constrainst on the PublishedBy
association.

Recommended

Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMSPadamNepal1
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational modelChirag vasava
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database ModelShishir Aryal
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data ModelSmriti Jain
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraintsmadhav bansal
 
Constraints In Sql
Constraints In SqlConstraints In Sql
Constraints In SqlAnurag
 
SQL Queries Information
SQL Queries InformationSQL Queries Information
SQL Queries InformationNishant Munjal
 

More Related Content

What's hot (20)

Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
DBMS: Types of keys
DBMS:  Types of keysDBMS:  Types of keys
DBMS: Types of keys
 
11 Database Concepts
11 Database Concepts11 Database Concepts
11 Database Concepts
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
 
The Relational Model
The Relational ModelThe Relational Model
The Relational Model
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
joins in database
 joins in database joins in database
joins in database
 
Transaction management DBMS
Transaction  management DBMSTransaction  management DBMS
Transaction management DBMS
 
ER Model in DBMS
ER Model in DBMSER Model in DBMS
ER Model in DBMS
 
Data models
Data modelsData models
Data models
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level Architecture
 
trigger dbms
trigger dbmstrigger dbms
trigger dbms
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
 
set operators.pptx
set operators.pptxset operators.pptx
set operators.pptx
 

Viewers also liked

Database Management System
Database Management SystemDatabase Management System
Database Management SystemNishant Munjal
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relationalJafar Nesargi
 
4 the relational data model and relational database constraints
4 the relational data model and relational database constraints4 the relational data model and relational database constraints
4 the relational data model and relational database constraintsKumar
 
Technical education benchmarks
Technical education benchmarksTechnical education benchmarks
Technical education benchmarksNishant Munjal
 
Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Jotham Gadot
 
Lecture 4 software process model (2)
Lecture 4   software process model (2)Lecture 4   software process model (2)
Lecture 4 software process model (2)IIUI
 
Virtualization, A Concept Implementation of Cloud
Virtualization, A Concept Implementation of CloudVirtualization, A Concept Implementation of Cloud
Virtualization, A Concept Implementation of CloudNishant Munjal
 
Chapter3 the relational data model and the relation database constraints part2
Chapter3 the relational data model and the relation database constraints part2Chapter3 the relational data model and the relation database constraints part2
Chapter3 the relational data model and the relation database constraints part2eidah20
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Userssontumax
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Vidyasagar Mundroy
 
introduction to database
 introduction to database introduction to database
introduction to databaseAkif shexi
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Eddyzulham Mahluzydde
 
C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS ConceptBoopathi K
 
Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Vidyasagar Mundroy
 
The Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database ConstraintsThe Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database Constraintssontumax
 
Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2Eddyzulham Mahluzydde
 
Implementing an REA Model in a Relational Database (Chapter 16:)
Implementing an REA Model in a Relational Database (Chapter 16:)Implementing an REA Model in a Relational Database (Chapter 16:)
Implementing an REA Model in a Relational Database (Chapter 16:)foremanjf
 

Viewers also liked (20)

Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
 
Rdbms
RdbmsRdbms
Rdbms
 
4 the relational data model and relational database constraints
4 the relational data model and relational database constraints4 the relational data model and relational database constraints
4 the relational data model and relational database constraints
 
Sql
SqlSql
Sql
 
Bluemix Introduction
Bluemix IntroductionBluemix Introduction
Bluemix Introduction
 
Technical education benchmarks
Technical education benchmarksTechnical education benchmarks
Technical education benchmarks
 
Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03Fundamentals of Database ppt ch03
Fundamentals of Database ppt ch03
 
Lecture 4 software process model (2)
Lecture 4   software process model (2)Lecture 4   software process model (2)
Lecture 4 software process model (2)
 
Virtualization, A Concept Implementation of Cloud
Virtualization, A Concept Implementation of CloudVirtualization, A Concept Implementation of Cloud
Virtualization, A Concept Implementation of Cloud
 
Chapter3 the relational data model and the relation database constraints part2
Chapter3 the relational data model and the relation database constraints part2Chapter3 the relational data model and the relation database constraints part2
Chapter3 the relational data model and the relation database constraints part2
 
Introduction: Databases and Database Users
Introduction: Databases and Database UsersIntroduction: Databases and Database Users
Introduction: Databases and Database Users
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)
 
introduction to database
 introduction to database introduction to database
introduction to database
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3
 
C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS Concept
 
Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)Database Systems - Introduction (Chapter 1)
Database Systems - Introduction (Chapter 1)
 
The Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database ConstraintsThe Relational Data Model and Relational Database Constraints
The Relational Data Model and Relational Database Constraints
 
Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2Chapter 2 Relational Data Model-part 2
Chapter 2 Relational Data Model-part 2
 
Implementing an REA Model in a Relational Database (Chapter 16:)
Implementing an REA Model in a Relational Database (Chapter 16:)Implementing an REA Model in a Relational Database (Chapter 16:)
Implementing an REA Model in a Relational Database (Chapter 16:)
 

Similar to Relational Data Model Introduction

The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...Raj vardhan
 
Relational data model
Relational data modelRelational data model
Relational data modelSURBHI SAROHA
 
COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database Rc Os
 
The relational data model part[1]
The relational data model part[1]The relational data model part[1]
The relational data model part[1]Bashir Rezaie
 
Relational Algebra Operations
Relational Algebra OperationsRelational Algebra Operations
Relational Algebra OperationsShefa Idrees
 
Relational algebra calculus
Relational algebra  calculusRelational algebra  calculus
Relational algebra calculusVaibhav Kathuria
 
structureformal1.ppt
structureformal1.pptstructureformal1.ppt
structureformal1.pptFaiz Zeya
 
relational model.pptx
relational model.pptxrelational model.pptx
relational model.pptxThangamaniR3
 
Fundamentals of database system - Relational data model and relational datab...
Fundamentals of database system  - Relational data model and relational datab...Fundamentals of database system  - Relational data model and relational datab...
Fundamentals of database system - Relational data model and relational datab...Mustafa Kamel Mohammadi
 
Relational database
Relational databaseRelational database
Relational databaseDucat
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relationalJafar Nesargi
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relationalJafar Nesargi
 
Towards a New Data Modelling Architecture - Part 1
Towards a New Data Modelling Architecture - Part 1Towards a New Data Modelling Architecture - Part 1
Towards a New Data Modelling Architecture - Part 1JEAN-MICHEL LETENNIER
 
The theory of relational databases
The theory of relational databasesThe theory of relational databases
The theory of relational databasesSperasoft
 
4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdfLPhct2
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide sharefanta teferi
 

Similar to Relational Data Model Introduction (20)

The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
The Relational Data Model and Relational Database Constraints Ch5 (Navathe 4t...
 
Relational data model
Relational data modelRelational data model
Relational data model
 
Relational Model
Relational ModelRelational Model
Relational Model
 
COMPUTERS Database
COMPUTERS Database COMPUTERS Database
COMPUTERS Database
 
The relational data model part[1]
The relational data model part[1]The relational data model part[1]
The relational data model part[1]
 
Relational Algebra Operations
Relational Algebra OperationsRelational Algebra Operations
Relational Algebra Operations
 
Relational algebra calculus
Relational algebra  calculusRelational algebra  calculus
Relational algebra calculus
 
structureformal1.ppt
structureformal1.pptstructureformal1.ppt
structureformal1.ppt
 
relational model.pptx
relational model.pptxrelational model.pptx
relational model.pptx
 
Relational model
Relational modelRelational model
Relational model
 
Fundamentals of database system - Relational data model and relational datab...
Fundamentals of database system  - Relational data model and relational datab...Fundamentals of database system  - Relational data model and relational datab...
Fundamentals of database system - Relational data model and relational datab...
 
RDBMS
RDBMSRDBMS
RDBMS
 
Relational database
Relational databaseRelational database
Relational database
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
 
Towards a New Data Modelling Architecture - Part 1
Towards a New Data Modelling Architecture - Part 1Towards a New Data Modelling Architecture - Part 1
Towards a New Data Modelling Architecture - Part 1
 
The theory of relational databases
The theory of relational databasesThe theory of relational databases
The theory of relational databases
 
4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf
 
DBMS Unit-2.pdf
DBMS Unit-2.pdfDBMS Unit-2.pdf
DBMS Unit-2.pdf
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide share
 

More from Nishant Munjal

Database Management System
Database Management SystemDatabase Management System
Database Management SystemNishant Munjal
 
Array, string and pointer
Array, string and pointerArray, string and pointer
Array, string and pointerNishant Munjal
 
Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computersNishant Munjal
 
Shell Programming Concept
Shell Programming ConceptShell Programming Concept
Shell Programming ConceptNishant Munjal
 
Asynchronous Transfer Mode
Asynchronous Transfer ModeAsynchronous Transfer Mode
Asynchronous Transfer ModeNishant Munjal
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud ComputingNishant Munjal
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization TechniquesNishant Munjal
 
Transaction Processing Concept
Transaction Processing ConceptTransaction Processing Concept
Transaction Processing ConceptNishant Munjal
 
Personnel Management and Industrial Psycology
Personnel Management and Industrial PsycologyPersonnel Management and Industrial Psycology
Personnel Management and Industrial PsycologyNishant Munjal
 
Principles of Management
Principles of ManagementPrinciples of Management
Principles of ManagementNishant Munjal
 
Project Closing Process
Project Closing ProcessProject Closing Process
Project Closing ProcessNishant Munjal
 

More from Nishant Munjal (20)

Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Functions & Recursion
Functions & RecursionFunctions & Recursion
Functions & Recursion
 
Array, string and pointer
Array, string and pointerArray, string and pointer
Array, string and pointer
 
Programming in C
Programming in CProgramming in C
Programming in C
 
Introduction to computers
Introduction to computersIntroduction to computers
Introduction to computers
 
Unix Administration
Unix AdministrationUnix Administration
Unix Administration
 
Shell Programming Concept
Shell Programming ConceptShell Programming Concept
Shell Programming Concept
 
VI Editor
VI EditorVI Editor
VI Editor
 
Introduction to Unix
Introduction to UnixIntroduction to Unix
Introduction to Unix
 
Routing Techniques
Routing TechniquesRouting Techniques
Routing Techniques
 
Asynchronous Transfer Mode
Asynchronous Transfer ModeAsynchronous Transfer Mode
Asynchronous Transfer Mode
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud Computing
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization Techniques
 
Concurrency Control
Concurrency ControlConcurrency Control
Concurrency Control
 
Transaction Processing Concept
Transaction Processing ConceptTransaction Processing Concept
Transaction Processing Concept
 
Personnel Management and Industrial Psycology
Personnel Management and Industrial PsycologyPersonnel Management and Industrial Psycology
Personnel Management and Industrial Psycology
 
Marketing Management
Marketing ManagementMarketing Management
Marketing Management
 
Principles of Management
Principles of ManagementPrinciples of Management
Principles of Management
 
Industrial Economics
Industrial EconomicsIndustrial Economics
Industrial Economics
 
Project Closing Process
Project Closing ProcessProject Closing Process
Project Closing Process
 

Recently uploaded

Shankar communication assignment no1 .pdf
Shankar communication assignment no1 .pdfShankar communication assignment no1 .pdf
Shankar communication assignment no1 .pdfshankaranarayanan972
 
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...IRJET Journal
 
PetroDara I TransGlobe Energy Training Certificate I 2017
PetroDara I TransGlobe Energy Training Certificate I 2017PetroDara I TransGlobe Energy Training Certificate I 2017
PetroDara I TransGlobe Energy Training Certificate I 2017Abdelrahman Al-Gammal
 
BRINDHA G AD21012 SELF INTRODUCTION.pdf
BRINDHA G  AD21012 SELF INTRODUCTION.pdfBRINDHA G  AD21012 SELF INTRODUCTION.pdf
BRINDHA G AD21012 SELF INTRODUCTION.pdfbrindhaaids12
 
my goal is place in mnc's companies and got good salary
my goal is place in mnc's companies and got good salarymy goal is place in mnc's companies and got good salary
my goal is place in mnc's companies and got good salarymonoarul2004
 
Fundamentals of Data Structure_Unit I.pptx
Fundamentals of Data Structure_Unit I.pptxFundamentals of Data Structure_Unit I.pptx
Fundamentals of Data Structure_Unit I.pptxDr. Madhuri Jawale
 
Metrology Measurements and All units PPT
Metrology Measurements and  All units PPTMetrology Measurements and  All units PPT
Metrology Measurements and All units PPTdinesh babu
 
Petrogulf Misr I PICO International Training Certificate I 2016
Petrogulf Misr I PICO International Training Certificate I 2016Petrogulf Misr I PICO International Training Certificate I 2016
Petrogulf Misr I PICO International Training Certificate I 2016Abdelrahman Al-Gammal
 
ELH – 3.1: ADVANCED DIGITAL COMMUNICATION UNIT – I Digital modulation techniq...
ELH – 3.1: ADVANCED DIGITAL COMMUNICATION UNIT – I Digital modulation techniq...ELH – 3.1: ADVANCED DIGITAL COMMUNICATION UNIT – I Digital modulation techniq...
ELH – 3.1: ADVANCED DIGITAL COMMUNICATION UNIT – I Digital modulation techniq...Kuvempu University
 
Eshpetco I LUKOIL Training Certificate I 2017
Eshpetco I LUKOIL Training Certificate I 2017Eshpetco I LUKOIL Training Certificate I 2017
Eshpetco I LUKOIL Training Certificate I 2017Abdelrahman Al-Gammal
 
Engg Science Courses B.Tech(AICTE Model Curriculum) 3rd Year 2019-20.pdf
Engg Science Courses  B.Tech(AICTE Model Curriculum) 3rd Year 2019-20.pdfEngg Science Courses  B.Tech(AICTE Model Curriculum) 3rd Year 2019-20.pdf
Engg Science Courses B.Tech(AICTE Model Curriculum) 3rd Year 2019-20.pdfashwanisingh696969
 
General Petroleum Company (GPC) Training Certificate I 2016
General Petroleum Company (GPC) Training Certificate I 2016General Petroleum Company (GPC) Training Certificate I 2016
General Petroleum Company (GPC) Training Certificate I 2016Abdelrahman Al-Gammal
 
Introduction to WordPress Custom Gutenberg Blocks
Introduction to WordPress Custom Gutenberg BlocksIntroduction to WordPress Custom Gutenberg Blocks
Introduction to WordPress Custom Gutenberg Blockskarthickmurugan02
 
Pre-assessment & Data Sheet presentation template - 2023.pptx
Pre-assessment & Data Sheet presentation template - 2023.pptxPre-assessment & Data Sheet presentation template - 2023.pptx
Pre-assessment & Data Sheet presentation template - 2023.pptxssuserc79a6f
 
Thailand 2023Q3 CCTV Seasonal Spotlight Product - DGF.PDF
Thailand 2023Q3 CCTV Seasonal Spotlight Product - DGF.PDFThailand 2023Q3 CCTV Seasonal Spotlight Product - DGF.PDF
Thailand 2023Q3 CCTV Seasonal Spotlight Product - DGF.PDFPawachMetharattanara
 
sahana sri D AD21046 SELF INTRODUCTION.pdf
sahana sri D AD21046 SELF INTRODUCTION.pdfsahana sri D AD21046 SELF INTRODUCTION.pdf
sahana sri D AD21046 SELF INTRODUCTION.pdfsahanaaids46
 
Power point Burnt Inverted Earthen Pots Final 2018 01-3-18 Junaid.pptx
Power point  Burnt Inverted Earthen Pots Final 2018 01-3-18 Junaid.pptxPower point  Burnt Inverted Earthen Pots Final 2018 01-3-18 Junaid.pptx
Power point Burnt Inverted Earthen Pots Final 2018 01-3-18 Junaid.pptxhassanalizafar
 
Hydraulics Introduction& Hydrostatics.pdf
Hydraulics  Introduction&   Hydrostatics.pdfHydraulics  Introduction&   Hydrostatics.pdf
Hydraulics Introduction& Hydrostatics.pdfGetacher Teshome
 
Critical Literature Review Final -MW.pdf
Critical Literature Review Final -MW.pdfCritical Literature Review Final -MW.pdf
Critical Literature Review Final -MW.pdfMollyWinterbottom
 

Recently uploaded (20)

Shankar communication assignment no1 .pdf
Shankar communication assignment no1 .pdfShankar communication assignment no1 .pdf
Shankar communication assignment no1 .pdf
 
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
TUNNELING IN HIMALAYAS WITH NATM METHOD: A SPECIAL REFERENCES TO SUNGAL TUNNE...
 
PetroDara I TransGlobe Energy Training Certificate I 2017
PetroDara I TransGlobe Energy Training Certificate I 2017PetroDara I TransGlobe Energy Training Certificate I 2017
PetroDara I TransGlobe Energy Training Certificate I 2017
 
BRINDHA G AD21012 SELF INTRODUCTION.pdf
BRINDHA G  AD21012 SELF INTRODUCTION.pdfBRINDHA G  AD21012 SELF INTRODUCTION.pdf
BRINDHA G AD21012 SELF INTRODUCTION.pdf
 
my goal is place in mnc's companies and got good salary
my goal is place in mnc's companies and got good salarymy goal is place in mnc's companies and got good salary
my goal is place in mnc's companies and got good salary
 
Fundamentals of Data Structure_Unit I.pptx
Fundamentals of Data Structure_Unit I.pptxFundamentals of Data Structure_Unit I.pptx
Fundamentals of Data Structure_Unit I.pptx
 
Metrology Measurements and All units PPT
Metrology Measurements and  All units PPTMetrology Measurements and  All units PPT
Metrology Measurements and All units PPT
 
Petrogulf Misr I PICO International Training Certificate I 2016
Petrogulf Misr I PICO International Training Certificate I 2016Petrogulf Misr I PICO International Training Certificate I 2016
Petrogulf Misr I PICO International Training Certificate I 2016
 
ELH – 3.1: ADVANCED DIGITAL COMMUNICATION UNIT – I Digital modulation techniq...
ELH – 3.1: ADVANCED DIGITAL COMMUNICATION UNIT – I Digital modulation techniq...ELH – 3.1: ADVANCED DIGITAL COMMUNICATION UNIT – I Digital modulation techniq...
ELH – 3.1: ADVANCED DIGITAL COMMUNICATION UNIT – I Digital modulation techniq...
 
Eshpetco I LUKOIL Training Certificate I 2017
Eshpetco I LUKOIL Training Certificate I 2017Eshpetco I LUKOIL Training Certificate I 2017
Eshpetco I LUKOIL Training Certificate I 2017
 
Engg Science Courses B.Tech(AICTE Model Curriculum) 3rd Year 2019-20.pdf
Engg Science Courses  B.Tech(AICTE Model Curriculum) 3rd Year 2019-20.pdfEngg Science Courses  B.Tech(AICTE Model Curriculum) 3rd Year 2019-20.pdf
Engg Science Courses B.Tech(AICTE Model Curriculum) 3rd Year 2019-20.pdf
 
General Petroleum Company (GPC) Training Certificate I 2016
General Petroleum Company (GPC) Training Certificate I 2016General Petroleum Company (GPC) Training Certificate I 2016
General Petroleum Company (GPC) Training Certificate I 2016
 
Introduction to WordPress Custom Gutenberg Blocks
Introduction to WordPress Custom Gutenberg BlocksIntroduction to WordPress Custom Gutenberg Blocks
Introduction to WordPress Custom Gutenberg Blocks
 
Power System - Types of Power Plants overview
Power System - Types of Power Plants  overviewPower System - Types of Power Plants  overview
Power System - Types of Power Plants overview
 
Pre-assessment & Data Sheet presentation template - 2023.pptx
Pre-assessment & Data Sheet presentation template - 2023.pptxPre-assessment & Data Sheet presentation template - 2023.pptx
Pre-assessment & Data Sheet presentation template - 2023.pptx
 
Thailand 2023Q3 CCTV Seasonal Spotlight Product - DGF.PDF
Thailand 2023Q3 CCTV Seasonal Spotlight Product - DGF.PDFThailand 2023Q3 CCTV Seasonal Spotlight Product - DGF.PDF
Thailand 2023Q3 CCTV Seasonal Spotlight Product - DGF.PDF
 
sahana sri D AD21046 SELF INTRODUCTION.pdf
sahana sri D AD21046 SELF INTRODUCTION.pdfsahana sri D AD21046 SELF INTRODUCTION.pdf
sahana sri D AD21046 SELF INTRODUCTION.pdf
 
Power point Burnt Inverted Earthen Pots Final 2018 01-3-18 Junaid.pptx
Power point  Burnt Inverted Earthen Pots Final 2018 01-3-18 Junaid.pptxPower point  Burnt Inverted Earthen Pots Final 2018 01-3-18 Junaid.pptx
Power point Burnt Inverted Earthen Pots Final 2018 01-3-18 Junaid.pptx
 
Hydraulics Introduction& Hydrostatics.pdf
Hydraulics  Introduction&   Hydrostatics.pdfHydraulics  Introduction&   Hydrostatics.pdf
Hydraulics Introduction& Hydrostatics.pdf
 
Critical Literature Review Final -MW.pdf
Critical Literature Review Final -MW.pdfCritical Literature Review Final -MW.pdf
Critical Literature Review Final -MW.pdf
 

Relational Data Model Introduction

  • 2. Relational Data Model 'The 'Relational Database Model is the most common model in industry today. A relational database is based on the relational model developed by E.F. Codd. A relational database allows the definition of data structures, storage and retrieval operations and integrity constraints. In such a database the data and relations between them are organized into tables. A table is a collection of records and each record in a table contains the same fields.
  • 3. Properties of the Relational database model Properties of Relational Tables: 1. Data is presented as a collection of relations. 2. Each relation is depicted as a table. 3. Columns are attributes that belong to the entity modelled by the table (ex. In a student table, you could have name, address, student ID, major, etc.). 4. Each row ("tuple") represents a single entity (ex. In a student table, John Smith, 14 Oak St, 9002342, Accounting, would represent one student entity). 5. Every table has a set of attributes that taken together as a "key" (technically, a "superkey") uniquely identifies each entity (Ex. In the student table, “student ID” would uniquely identify each student – no two students would have the same student ID).
  • 4. Concepts Tables − In relational data model, relations are saved in the format of Tables. This format stores the relation among entities. A table has rows and columns, where rows represents records and columns represent the attributes. Tuple − A single row of a table, which contains a single record for that relation is called a tuple. Relation instance − A finite set of tuples in the relational database system represents relation instance. Relation instances do not have duplicate tuples. Relation schema − A relation schema describes the relation name (table name), attributes, and their names. Relation key − Each row has one or more attributes, known as relation key, which can identify the row in the relation (table) uniquely. Attribute domain − Every attribute has some pre-defined value scope, known as attribute domain.
  • 5. Relational Integrity Constraints Every relation has some conditions that must hold for it to be a valid relation. These conditions are called Relational Integrity Constraints. There are three main integrity constraints − 1. Key constraints 2. Domain constraints 3. Referential integrity constraints
  • 6. Example The diagram below shows a conceptual model with two associations: WrittenBy and PublishedBy. The Book entity type has a property, PublisherId, that references the entity key of the Publisher entity type when you define a referential integrity constrainst on the PublishedBy association.
  • 7. Key Constraints There must be at least one minimal subset of attributes in the relation, which can identify a tuple uniquely. This minimal subset of attributes is called key for that relation. If there are more than one such minimal subsets, these are called candidate keys. Key constraints force that − in a relation with a key attribute, no two tuples can have identical values for key attributes. a key attribute can not have NULL values. Key constraints are also referred to as Entity Constraints.
  • 8. Domain Constraints Attributes have specific values in real-world scenario. For example, age can only be a positive integer. The same constraints have been tried to employ on the attributes of a relation. Every attribute is bound to have a specific range of values. For example, age cannot be less than zero and telephone numbers cannot contain a digit outside 0-9. Referential Integrity Constraints Referential integrity constraints work on the concept of Foreign Keys. A foreign key is a key attribute of a relation that can be referred in other relation. Referential integrity constraint states that if a relation refers to a key attribute of a different or same relation, then that key element must exist.
  • 9. … Referential integrity is a property of data which, when satisfied, requires every value of one attribute (column) of a relation (table) to exist as a value of another attribute (column) in a different (or the same) relation (table). A foreign key (FK) is a column or combination of columns that is used to establish and enforce a link between the data in two tables. Integrity Data integrity refers to maintaining and assuring the accuracy and consistency of data over its entire life-cycle, and is a critical aspect to the design, implementation and usage of any system which stores, processes, or retrieves data.
  • 10. Relational Database Relational database systems are expected to be equipped with a query language that can assist its users to query the database instances. There are two kinds of query languages − 1. Relational algebra 2. Relational calculus.
  • 11. Relational Algebra The main application of relational algebra is providing a theoretical foundation for relational databases, particularly query languages for such databases, chief among which is SQL. Relational algebra is a theoritcal procedural query language, which takes instances of relations as input and yields instances of relations as output. It uses operators to perform queries. An operator can be either unary or binary. They accept relations as their input and yield relations as their output. Relational algebra is performed recursively on a relation and intermediate results are also considered relations. The fundamental operations of relational algebra are as follows − Select Project Union Set Difference Cartesian product Rename
  • 12. Select Operation (σ) It selects tuples that satisfy the given predicate from a relation. Notation − σp(r) Where σ stands for selection predicate and r stands for relation. p is prepositional logic formula which may use connectors like and, or, and not. These terms may use relational operators like − =, ≠, ≥, < , >, ≤. For example − σsubject = "database"(Books) Output − Selects tuples from books where subject is 'database'. σsubject = "database" and price = "450"(Books) Output − Selects tuples from books where subject is 'database' and 'price' is 450. σsubject = "database" and price = "450" or year > "2010"(Books) Output − Selects tuples from books where subject is 'database' and 'price' is 450 or those books published after 2010.
  • 13. Project Operation (∏) It projects column(s) that satisfy a given predicate. Notation − ∏A1, A2, An (r) Where A1, A2 , An are attribute names of relation r. Duplicate rows are automatically eliminated, as relation is a set. For example − ∏subject, author (Books) ◦ Output: Selects and projects columns named as subject and author from the relation Books.
  • 14. Union Operation (∪) It performs binary union between two given relations and is defined as − Notation − r U s Where r and s are either database relations or relation result set (temporary relation). For a union operation to be valid, the following conditions must hold − ◦ r, and s must have the same number of attributes. ◦ Attribute domains must be compatible. ◦ Duplicate tuples are automatically eliminated. For Example: ∏ author (Books) ∪ ∏ author (Articles) ◦ Output − Projects the names of the authors who have either written a book or an article or both.
  • 15. Set Difference (−) The result of set difference operation is tuples, which are present in one relation but are not in the second relation. Notation − r − s Finds all the tuples that are present in r but not in s. For Example: ∏ author (Books) − ∏ author (Articles) ◦ Output − Provides the name of authors who have written books but not articles.
  • 16. Cartesian Product (Χ) Combines information of two different relations into one. Notation − r Χ s Where r and s are relations and their output will be defined as − σauthor = ‘nishant'(Books Χ Articles) ◦ Output − Yields a relation, which shows all the books and articles written by nishant.
  • 17. Rename Operation (ρ) The results of relational algebra are also relations but without any name. The rename operation allows us to rename the output relation. 'rename' operation is denoted with small Greek letter rho ρ. Notation − ρ x (E) Where the result of expression E is saved with name of x.
  • 18. Relational Calculus In contrast to Relational Algebra, Relational Calculus is a non-procedural query language, that is, it tells what to do but never explains how to do it. Relational calculus exists in two forms ◦ Tuple Relational Calculus (TRC) ◦ Domain Relational Calculus (DRC)
  • 19. Tuple Relational Calculus Filtering variable ranges over tuples. Notation − {T | Condition} Returns all tuples T that satisfies a condition. For example − { T.name | Author(T) AND T.article = 'database' } Output − Returns tuples with 'name' from Author who has written article on 'database'.
  • 20. Domain Relational Calculus (DRC) In DRC, the filtering variable uses the domain of attributes instead of entire tuple values (as done in TRC, mentioned above). Notation − { a1, a2, a3, ..., an | P (a1, a2, a3, ... ,an)} Where a1, a2 are attributes and P stands for formulae built by inner attributes. For example − {< article, page, subject > | ∈ Sahoo ∧ subject = 'database'} Output − Yields Article, Page, and Subject from the relation Sahoo, where subject is database.