Next: Tuple Relational Calculus
Up: 4660
Previous: SQL Features
  Contents
Propositional Calculus
- TRUE
- FALSE
- AND (
)
- NOT (
)
- IMPLIES (
means if
then
)
Predicate Calculus adds quantification
- Universal Quantification: FORALL (
)
- Existential Quantification: EXISTS (
)
Tuple Relational Calculus adds
- an actual database or set of relations
Propositional Calculus Rules [195]
Implication [196]
Implies
-
- if
then
- if
is not true, does not say anything about
| a |
b |
a b |
| 1 |
1 |
1 |
| 0 |
1 |
1 |
| 1 |
0 |
0 |
| 0 |
0 |
1 |
A formula may be
- a tautology -
is always true
- satisfiable -
may be true
- unsatisfiable -
is never true
Predicate Calculus [197]
Predicate Calculus or First Order Logic adds
- there exists, the Existential Quantifier
- for all, the Universal Quantifier
- predicates based on membership in a relation
Examples of Predicates
- apple(x) says that x is an apple
- or that x is a member of the APPLE relation
- red(x), person(x), motherof(x,y)
Examples of
Universal Quantification [198]
-
-
-
-
-
-
-
- note that
-
-
-
- Lincoln: `You can fool some of the people all of the time'
-
- `But you cannot fool all the people all the time'
-
Subsections
Next: Tuple Relational Calculus
Up: 4660
Previous: SQL Features
  Contents
Ted Billard
2001-10-31