[LIU Comp Sci] Need tutoring on Relational Calculus
Date: Thu, 18 Dec 2014 05:11:34 -0500
Message-ID: <m6u986$qe8$1_at_reader1.panix.com>
I'm pouring over the HW assignment and the explanation and notes from the text is not adequate to explain relational calculus. The book is actually in shambles. This is a very advanced mathamtical topic and there is no way to learn this in a single lesson, although you might be able to bluff you way through it.
Does anyone understand this? It makes little sense as it is presented, and I'm not in any way certain of the meaning of the syntax.
I have no idea what this whole section of 6.6.63 is out of the text.
Quote:
In addition, two special symbols called quantifiers can appear in
formulas; these are
the universal quantifier (∀) and the existential quantifier (∃). Truth
values for
formulas with quantifiers are described in Rules 3 and 4 below;
Why do we make them Free or Bound? ****
QUOTE
Informally, a tuple variable t is bound if it is quantified, meaning
that it appears in an (∃t) or (∀t) clause; otherwise, it is free.
ENDQUOTE
??????
QUOTE
Stop this author doesn't know the material. Either that or he doesn't
know how to explain it. You can't LEARN math by memorizing rules inside
Formally, we define a tuple variable in a formula as free or bound
according to the following rules:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
QUOTE
An occurrence of a tuple variable in a formula F that is an atom is free
in F.
An occurrence of a tuple variable t is free or bound in a formula made up of logical connectives—(F 1 AND F2), (F1 OR F2 ), NOT(F1 ), and NOT(F2 )— depending on whether it is free or bound in F1 or F2 (if it occurs in either).
Notice that in a formula of the form F = (F1 AND F2) or F = (F1 OR F2), a
tuple variable may be free in F1 and bound in F2, or vice versa; in this
case,
one occurrence of the tuple variable is bound and the other is free in F.
Why does it matter?
QUOTE:
All free occurrences of a tuple variable t in F are bound in a formula
F of the
UNQUOTE
form F= (∃ t)(F) or F = (∀t)(F).
QUOTE
The tuple variable is bound to the quantifier specified in F. For
example, consider the following formulas:
F1 : d.Dname=‘Research’
F2 : (∃ t)(d.Dnumber=t.Dno)
F3 : (∀d)(d.Mgr_ssn=‘333445555’)
The tuple variable d is free in both F1 and F2, whereas it is bound to
the (∀) quantifier
in F3. Variable t is bound to the (∃) quantifier in F2.
We can now give Rules 3 and 4 for the definition of a formula we started
earlier:
■
■
Rule 3: If F is a formula, then so is (∃t)(F), where t is a tuple
variable. The
formula (∃t)(F) is TRUE if the formula F evaluates to TRUE for some (at
least
one) tuple assigned to free occurrences of t in F; otherwise, (∃t)(F) is
FALSE.
Rule 4: If F is a formula, then so is (∀t)(F), where t is a tuple
variable. The
formula (∀t)(F) is TRUE if the formula F evaluates to TRUE for every tuple
(in the universe) assigned to free occurrences of t in F; otherwise,
(∀t)(F) is
FALSE.
The (∃) quantifier is called an existential quantifier because a formula
(∃t)(F) is
TRUE if there exists some tuple that makes F TRUE. For the universal
quantifier,
(∀t)(F) is TRUE if every possible tuple that can be assigned to free
occurrences of t
in F is substituted for t, and F is TRUE for every such substitution. It
is called the universal
or for all quantifier because every tuple in the universe of
tuples must make F
TRUE to make the quantified formula TRUE.
So then we have this homework and I'm doing it, barerly working through
this methodology and then you hit this:
e) Retrieve the names of employees who work on every project:
This question is insane with SQL and Relational Algebra (where we can
use a division) but solving it with relational calculus??
This is an image of the database scheme
http://www.nylxs.com/images/database_3.3_company.png
Received on Thu Dec 18 2014 - 11:11:34 CET