Questions tagged [relational-calculus]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
33 views

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 ...
T.E.'s user avatar
  • 11
0 votes
2 answers
50 views

Logical equivalence priority

I have the logical formula $$ A \Leftrightarrow B \Leftrightarrow C $$ In order to make the truth table I'm not sure wheither I should interpret it as $A \Leftrightarrow B \Leftrightarrow C$ or $A \...
tixerauRIP's user avatar
1 vote
0 answers
726 views

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 ...
tomashauser's user avatar
-1 votes
2 answers
416 views

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 ...
tomashauser's user avatar
1 vote
0 answers
880 views

Is it possible to convert any relational algebra expression into a relational calculus expression?

Let's for the sake of simplicity only focus on tuple relational calculus. Every relational algebra query can be broken down into the 5 atomic operations - projection, selection, set union, set ...
tomashauser's user avatar
0 votes
1 answer
90 views

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: ...
pk00's user avatar
  • 27
1 vote
1 answer
185 views

Check if a relation is reflexive, symmetric and transitive

I want to better understand how this actually works, as my solutions are sometimes not 100% correct. I have the following relation: Check if the following relation is reflexive, symmetric, and/or ...
Prometheus's user avatar
0 votes
0 answers
109 views

Relation Closure for F+

$A \rightarrow B C$ $C D \rightarrow E$ $B \rightarrow D$ $E \rightarrow A$ I have these Relations for R={A,B,C,D,E} Now I have to calculate the closure $F^+$ and give the candidate keys I came ...
Rapiz's user avatar
  • 51
0 votes
1 answer
107 views

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., ...
Sepehr23's user avatar
0 votes
1 answer
148 views

Normal form after decomposition of a relation

I came across a text recently which claims that if we perform a lossless decomposition of a relation R into smaller relations R1 and R2, and if R is in 3NF, both R1 and R2 are 3NF. I felt a bit ...
Abhilash Mishra's user avatar
0 votes
1 answer
105 views

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 ...
Abhilash Mishra's user avatar
0 votes
1 answer
106 views

Normal form of relation R

It is given that for a relation R all the attributes of the relation appear in some of the candidate keys. It is also given that there is only one compound candidate key which exists for a relation, ...
Abhilash Mishra's user avatar
1 vote
1 answer
1k views

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 ...
zpavlinovic's user avatar
  • 1,644
0 votes
0 answers
187 views

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 ...
Abhilash Mishra's user avatar
0 votes
1 answer
599 views

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 ...
RajS's user avatar
  • 1,647