Beruflich Dokumente
Kultur Dokumente
Calculus
INFS
614
Tautologies
to
Know
1. P
⇒
Q
⇔
¬
P
∨
Q
2. P
∧
Q
⇔
¬
(¬
P
∨
¬
Q)
3. P
∨
Q
⇔
¬
(¬
P
∧
¬
Q)
4. ∀x
P(x)
⇔
¬
∃x
(¬
P(x))
5. ∃x
P(x)
⇔
¬
∀x
(¬
P(x))
Example
Rela%ons
• Sailors
(sid:integer,
sname:string,
ra%ng:integer,
age:real)
• Boats
(bid:integer,
bname:string,
color:string)
• Reserves
(sid:integer,
bid:integer,
day:date)
SID
SNAME
RATING
AGE
SID
SNAME
RATING
AGE
22
Dus%n
7
45.0
28
Yuppy
9
35.0
31
Lubber
8
55.5
31
Lubber
8
55.5
58
Rusty
10
35.0
44
Guppy
5
35.0
*
nearly
A
Rela%onal
Calculus
Query
Tuple
variable,
its
domain
is
the
set
of
tuples
of
a
par%cular
rela%on
scheme.
(this
tuple
variable
is
“free”.
All
others
are
somehow
“bound”)
formula
Answer Set
Red
Boats
Non-‐
Red
Boats
Boats