Questions tagged [tuple-relational-calculus]
12 questions
1
vote
1 answer
Relational calculus to SQL
I am somewhat aware of the correspondence between (tuple and domain) relational calculus, relational algebra, and SQL. To the best of my understanding, one should be able to automatically convert a formula in relational calculus to an SQL query…
zpavlinovic
- 1,664
- 10
- 19
1
vote
0 answers
Relational calculus: "Find all X with at least y amount of Z"
Assuming I have two relations:
Supplier [ID (PK), Name, City, Country] and
Item [ID (PK), Name, Department, Price, Stock, Supplier_ID (FK)]
What would be the easiest way to determine the following statement both in domain and tuple relational…
T.E.
- 11
- 1
1
vote
1 answer
division expression in tuple relational calculus
Could someone please explain the expression for division in tuple relational calculus in words? I do not understand how the multiple operators (existential and universal quantifiers) are to be interpreted.
My question is almost the same as Division…
Mia
- 15
- 3
1
vote
0 answers
Division in tuple relational calculus
$ \newcommand{\Set}[2]{%
\{\, #1 \mid #2 \, \}%
}$
I've been trying to find how to express relational division operation in tuple relational calculus. The only thing I found is this presentation where on the page 4 it is said that for relations $R…
tomashauser
- 127
- 4
0
votes
0 answers
Relational calculus expression for projection (Database Management)
I recently came across this question:
Let the following relation schemas be given:
$R=(A,B,C)$
$S=(D,E,F)$
Let relations r(R) and s(S) be given. Give an expression in the tuple relational
calculus that is equivalent to the following:
a.…
Abhilash Mishra
- 323
- 5
- 16
0
votes
1 answer
Use of existential quantifier in tuple relational calculus
It is somewhat confusing to me when to use quantifiers in tuple relational calculus (TRC). I stumbled upon following problem and I am still scratching my head thinking why not TRC query can be constructed without using existential quantifier.
The…
RajS
- 1,737
- 5
- 28
- 50
0
votes
0 answers
Can quantifiers be used on variables bound on the left side of the pipe in Tuple Relational Calculus?
Our professor has solved an example for us. They taught us it's incorrect to use a quantifier (exists or forall) with a variable that's already bound on the left side of the pipe (|, meaning "such that"). They've done that in their example solution.…
Martin Lunn
- 1
- 1
0
votes
1 answer
Tuple relational calculus: existential quantifiers
I have the following question and given answer:
Question: List the names of managers who have at least one dependant.
Answer: {e.Fname, e.Lname | EMPLOYEE(e) AND (∃d)(∃t)(DEPARTMENT(d) AND DEPENDANT(t) AND e.Ssn = d.Mgrssn AND t.Essn = e.Ssn) }
My…
pk00
- 27
- 7
0
votes
1 answer
Need help understanding the tuple relational calculus
We say that a query in a TRC is a statement of the form $\{T: P(T)\}$, where $T$ is a tuple variable and $P(T)$ is a formula.
Now my question is, what are the possible tuples $T$ to be tested i.e., what are the types and values for tested…
Sepehr23
- 1
0
votes
1 answer
Whether same output is obtained for the two queries
Consider the following SQL Queries executed on the relation Employee:
Employee (Eid, Ename, sal)
Eid is the primary key
Queries:
S1:SELECT count (*) FROM Employee;
S2: SELECT count (Eid) FROM Employee;
Will these queries return the same result…
Abhilash Mishra
- 323
- 5
- 16
-1
votes
2 answers
Is it possible to do a NULL comparison in Relational Algebra?
Please consider the following question given in a booklet:
I have read about databases from Database System Concepts - by Henry F. Korth, but never saw an instance where we could do a NULL comparison in relational algebra queries - unlike SQL…
Manu
- 3
- 5
-1
votes
2 answers
Intuition for a projection in tuple relational calculus
Let's have a relation $R = (name, surname, age)$. I want to obtain a new relation with only the $name$ attribute. In relational algebra I would simply do $\Pi_{\mathrm{name}}(R)$ but in relational calculus the general way of doing that…
tomashauser
- 127
- 4