SlideShare a Scribd company logo
1 of 11
TUPLE
RELATIONAL
CALCULUS
AGENDA
Relational Calculus
Tuple Relational Calculus
Examples
Formal View
Tuple vs Domain Relational Calculus
RELATIONAL CALCULUS
 Relational calculus is a non-procedural
query language.
 In the non-procedural query language,
the user is concerned with the details of
how to obtain the end results.
 The relational calculus tells what to do
but never explains how to do.
TUPLE RELATIONAL CALCULUS
 It is a non-procedural query language
which is based on finding a number of
tuple variables also known as range
variable for which predicate holds true.
 It describes the desired information
without giving a specific procedure for
obtaining that information.
 The tuple relational calculus is specified
to select the tuples in a relation.
 In TRC, filtering variable uses the tuples
of a relation.
 The result of the relation can have one or
more tuples.
Find the loan number, branch, amount of loans of
greater than or equal to 10000 amount.
{t| t ∈ loan ∧ t[amount]>=10000}
Loan number Branch name Amount
L33 ABC 10000
L35 DEF 15000
L49 GHI 9000
L98 DEF 65000
TUPLE RELATIONAL CALCULUS
Find the loan number for each loan of an amount
greater or equal to 10000.
{t| ∃ s ∈ loan(t[loan number] = s[loan number]
∧ s[amount]>=10000)}
Loan number Branch name Amount
L33 ABC 10000
L35 DEF 15000
L49 GHI 9000
L98 DEF 65000
Loan number
number
L33
L35
L98
SAFTEY OF EXPRESSION - THE
CONCEPT OF DOMAIN
 A tuple relational calculus may generate an
infinite relation. For example:
{t | (t∈loan)}
There are infinitely many tuples that are
not in loan.
 To address this issue, we use the concept of
domain of tuple relational formula, P.
 The Domain of P,denoted dom(P), is a set of
all values referenced by P. These include
values mentioned in P itself, as well as the
values that appear in a tuple of a relation
mentioned in P.
 For example: dom(t∈loan ^ t[anount]>1200) is
the set containing 1200 and all the values
present in the loan.
FORMAL DEFINITION
As shown earlier, a tuple relational calculus
expression is
of the form
{t | P(t)}
Where P is a formula.
• A formula may contain several tuple variables.
• A tuple variable is said to be a free variable unless
it is
quantified by a 3(there exists) or Ö(for all).
Tuple variables that are quantified by 3 or I are
called
bound variables.
• For ex, in the expression:
t€ loan ^ 3 s € customer(t[branch - name] =
s[branch - name])
t is a free variable and s is a bound variable.
TUPLE VS DOMAIN RELATIONAL CALCULUS
TUPLE RELATIONAL CALCULUS
• The Tuple Relational Calculus (TRC) is
used to select tuples from a relation.
• The tuples with specific range values,
tuples with certain attribute values, and
so on can be selected.
• In TRC, the variables represent the
tuples from specified relations.
• A tuple is a single element of relation.
In database terms, it is a row.
• {T | EMPLOYEE (T) AND T.DEPT_ID =
10}
DOMAIN RELATIONAL
CALCULUS
• The Domain Relational Calculus
(DRC) employs a list of attributes from
which to choose based on the
condition.
• Based on the condition. It’s similar to
TRC, but instead of selecting entire
tuples, it selects attributes.
• In DRC, the variables represent the
value drawn from a specified domain.
• A domain is equivalent to column data
type and any constraints on the value
of data.
• It is more similar to logic as a modeling
language.
10
THANK YOU
36 Pranav Menon
37 Khushi Mevada
38 Sahil Panchbhaiya
39 Subhamsekhar Panda
40 Hrishikesh Parkar

More Related Content

Similar to tupleTRCready.pptx

Relational Algebra Ch6 (Navathe 4th edition)/ Ch7 (Navathe 3rd edition)
Relational Algebra Ch6 (Navathe 4th edition)/ Ch7 (Navathe 3rd edition)Relational Algebra Ch6 (Navathe 4th edition)/ Ch7 (Navathe 3rd edition)
Relational Algebra Ch6 (Navathe 4th edition)/ Ch7 (Navathe 3rd edition)Raj vardhan
 
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperatorteach4uin
 
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
 
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptxganeshkarthy
 
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
 
Relational algebra operations
Relational algebra operationsRelational algebra operations
Relational algebra operationsSanthiNivas
 
E212d9a797dbms chapter3 b.sc2
E212d9a797dbms chapter3 b.sc2E212d9a797dbms chapter3 b.sc2
E212d9a797dbms chapter3 b.sc2Mukund Trivedi
 
E212d9a797dbms chapter3 b.sc2 (2)
E212d9a797dbms chapter3 b.sc2 (2)E212d9a797dbms chapter3 b.sc2 (2)
E212d9a797dbms chapter3 b.sc2 (2)Mukund Trivedi
 
E212d9a797dbms chapter3 b.sc2 (1)
E212d9a797dbms chapter3 b.sc2 (1)E212d9a797dbms chapter3 b.sc2 (1)
E212d9a797dbms chapter3 b.sc2 (1)Mukund Trivedi
 
Relational algebra-and-relational-calculus
Relational algebra-and-relational-calculusRelational algebra-and-relational-calculus
Relational algebra-and-relational-calculusSalman Vadsarya
 
Numerical approximation
Numerical approximationNumerical approximation
Numerical approximationMileacre
 

Similar to tupleTRCready.pptx (20)

Relational Model
Relational ModelRelational Model
Relational Model
 
SQL PPT.ppt
SQL PPT.pptSQL PPT.ppt
SQL PPT.ppt
 
Relational Algebra Ch6 (Navathe 4th edition)/ Ch7 (Navathe 3rd edition)
Relational Algebra Ch6 (Navathe 4th edition)/ Ch7 (Navathe 3rd edition)Relational Algebra Ch6 (Navathe 4th edition)/ Ch7 (Navathe 3rd edition)
Relational Algebra Ch6 (Navathe 4th edition)/ Ch7 (Navathe 3rd edition)
 
Unit04 dbms
Unit04 dbmsUnit04 dbms
Unit04 dbms
 
Cprogrammingoperator
CprogrammingoperatorCprogrammingoperator
Cprogrammingoperator
 
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
 
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx
3Arrays, Declarations, Expressions, Statements, Symbolic constant.pptx
 
UNIT 2 -PPT.pptx
UNIT 2 -PPT.pptxUNIT 2 -PPT.pptx
UNIT 2 -PPT.pptx
 
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
 
Programming in Arduino (Part 1)
Programming in Arduino (Part 1)Programming in Arduino (Part 1)
Programming in Arduino (Part 1)
 
Variables and patterns vocabulary
Variables and patterns vocabularyVariables and patterns vocabulary
Variables and patterns vocabulary
 
Trc final
Trc finalTrc final
Trc final
 
Relational algebra operations
Relational algebra operationsRelational algebra operations
Relational algebra operations
 
E212d9a797dbms chapter3 b.sc2
E212d9a797dbms chapter3 b.sc2E212d9a797dbms chapter3 b.sc2
E212d9a797dbms chapter3 b.sc2
 
E212d9a797dbms chapter3 b.sc2 (2)
E212d9a797dbms chapter3 b.sc2 (2)E212d9a797dbms chapter3 b.sc2 (2)
E212d9a797dbms chapter3 b.sc2 (2)
 
E212d9a797dbms chapter3 b.sc2 (1)
E212d9a797dbms chapter3 b.sc2 (1)E212d9a797dbms chapter3 b.sc2 (1)
E212d9a797dbms chapter3 b.sc2 (1)
 
Relational algebra-and-relational-calculus
Relational algebra-and-relational-calculusRelational algebra-and-relational-calculus
Relational algebra-and-relational-calculus
 
Numerical approximation
Numerical approximationNumerical approximation
Numerical approximation
 
Python
PythonPython
Python
 

Recently uploaded

AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingWSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuidePixlogix Infotech
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 

Recently uploaded (20)

AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 

tupleTRCready.pptx

  • 2. AGENDA Relational Calculus Tuple Relational Calculus Examples Formal View Tuple vs Domain Relational Calculus
  • 3. RELATIONAL CALCULUS  Relational calculus is a non-procedural query language.  In the non-procedural query language, the user is concerned with the details of how to obtain the end results.  The relational calculus tells what to do but never explains how to do.
  • 4. TUPLE RELATIONAL CALCULUS  It is a non-procedural query language which is based on finding a number of tuple variables also known as range variable for which predicate holds true.  It describes the desired information without giving a specific procedure for obtaining that information.  The tuple relational calculus is specified to select the tuples in a relation.  In TRC, filtering variable uses the tuples of a relation.  The result of the relation can have one or more tuples.
  • 5. Find the loan number, branch, amount of loans of greater than or equal to 10000 amount. {t| t ∈ loan ∧ t[amount]>=10000} Loan number Branch name Amount L33 ABC 10000 L35 DEF 15000 L49 GHI 9000 L98 DEF 65000
  • 7. Find the loan number for each loan of an amount greater or equal to 10000. {t| ∃ s ∈ loan(t[loan number] = s[loan number] ∧ s[amount]>=10000)} Loan number Branch name Amount L33 ABC 10000 L35 DEF 15000 L49 GHI 9000 L98 DEF 65000 Loan number number L33 L35 L98
  • 8. SAFTEY OF EXPRESSION - THE CONCEPT OF DOMAIN  A tuple relational calculus may generate an infinite relation. For example: {t | (t∈loan)} There are infinitely many tuples that are not in loan.  To address this issue, we use the concept of domain of tuple relational formula, P.  The Domain of P,denoted dom(P), is a set of all values referenced by P. These include values mentioned in P itself, as well as the values that appear in a tuple of a relation mentioned in P.  For example: dom(t∈loan ^ t[anount]>1200) is the set containing 1200 and all the values present in the loan.
  • 9. FORMAL DEFINITION As shown earlier, a tuple relational calculus expression is of the form {t | P(t)} Where P is a formula. • A formula may contain several tuple variables. • A tuple variable is said to be a free variable unless it is quantified by a 3(there exists) or Ö(for all). Tuple variables that are quantified by 3 or I are called bound variables. • For ex, in the expression: t€ loan ^ 3 s € customer(t[branch - name] = s[branch - name]) t is a free variable and s is a bound variable.
  • 10. TUPLE VS DOMAIN RELATIONAL CALCULUS TUPLE RELATIONAL CALCULUS • The Tuple Relational Calculus (TRC) is used to select tuples from a relation. • The tuples with specific range values, tuples with certain attribute values, and so on can be selected. • In TRC, the variables represent the tuples from specified relations. • A tuple is a single element of relation. In database terms, it is a row. • {T | EMPLOYEE (T) AND T.DEPT_ID = 10} DOMAIN RELATIONAL CALCULUS • The Domain Relational Calculus (DRC) employs a list of attributes from which to choose based on the condition. • Based on the condition. It’s similar to TRC, but instead of selecting entire tuples, it selects attributes. • In DRC, the variables represent the value drawn from a specified domain. • A domain is equivalent to column data type and any constraints on the value of data. • It is more similar to logic as a modeling language. 10
  • 11. THANK YOU 36 Pranav Menon 37 Khushi Mevada 38 Sahil Panchbhaiya 39 Subhamsekhar Panda 40 Hrishikesh Parkar