Questions tagged [tuple-relational-calculus]

Should be used for questions regarding Tuple relational calculus (TRC). Not to be confused with domain relational calculus (DRC) or relational algebra (RA).

Tuple relational calculus (TRC) is a calculus that was created and introduced by Edgar F. Codd as part of the relational model, in order to provide a declarative database-query language for data manipulation in this data model.

32 questions
14
votes
3 answers

Difference between Relational Algebra and Relational calculus

What is the exact difference between relational algebra and relational calculus? At most references, it will be Relational algebra is procedural and calculus is non-procedural. What do these terms mean? We can solve all problems using relational…
7
votes
2 answers

Tuple relational calculus

Is safe tuple relational calculus a turing complete language?
Sailaja
  • 141
  • 5
3
votes
4 answers

Domain and Tuple relational calculus

Is there a "real" difference between the above two? Other than the tiniest minute difference between their syntax?
simplfuzz
  • 12,479
  • 24
  • 84
  • 137
3
votes
0 answers

Reversing steps, Converting SQL query back to tuple relational calculus?

Not sure it is a correct SQL and would like to work backward converting SQL back to tuple relational calculus to check the correctness. Let's say we come up this query to display the classes where all its requirement classes have been complete by…
2
votes
2 answers

Procedural and non-procedural query language difference

Going through the relational algebra, I encountered the term "procedural query language". So what is the difference between a procedural query language and a non-procedural query language?
2
votes
1 answer

Why are quantifiers needed in Tuple Relational Calculus?

Why are quantifiers needed in Tuple Relational Calculus? Lets say I have this statement: {S.sname | S in Student and (exists G in Grade )(S.s# = G.s#)}; Why can't I just use this instead? {S.sname | S in Student and G in Grade and S.s# =…
user1766555
  • 57
  • 1
  • 3
  • 11
2
votes
1 answer

Trying to understand Tuple Relational Calculus

In what situations would you use domain relational calculus over tuple relational calculus? For example this problem I solved using tuple relational: List the co-authors of John Smith (authors who co-authored an article with John Smith) with these…
AvLerner
  • 27
  • 4
2
votes
2 answers

SQL query (in SQL, relational algebra and tuple relational calculus)

Im doing a test exam where I've gotten stuck on one particular query, in both its SQL code, relational algebra and tuple relational calculus. The query states: Find the (city,state) pairs which house a branch of every type which is listed in the…
1
vote
1 answer

Queries in tuple relational calculus re employee department and minimum & maximum salary?

I have to solve the queries using tuple relational calculus and I just want to know if I did them correctly. I'm using this database: EMPLOYEE: fname , minit , lname, ssn , bdate , address , sex , salary , superssn , dno DEPARTMENT: dname dnumber ,…
1
vote
1 answer

Views in relational calculus

I was wondering if we can somehow define a view in relational calculus to split complex queries onto several smaller ones? Or do we have to write big queries as a composite?
1
vote
1 answer

DBMS: Meaning of the following Relational Calculus Example:

The Database has the following tables: Hotel: (hotelNo, hotelName, city) Room: (roomNo, hotelNo, type, price) Booking: (hotelNo, guestNo, dateFrom, dateTo, roomNo) Guest (guestNo, guestName, guestAddress) Describe the following tuple…
0
votes
0 answers

creating a query using relational calculus (tuple relational calculus)

I have the following database scheme: student: sid course: pid prerequisite: cid, precid records: sid, cid How do I go about creating a query in relational calculus such that i need to find all courses for which all its prerequisites have been…
0
votes
0 answers

Can tuple variables bound by quantifiers occur on the left of '|' in Tuple Relational Calculus?

Quoting the general expression of Tuple Relational Calculus (Fundamentals of Database Systems - Elmasri, Navathe; 6th edition) A general expression of the tuple relational calculus is of the form {t1.Aj, t2.Ak, ..., tn.Am | COND(t1, t2, ..., tn,…
mahesh Rao
  • 375
  • 1
  • 4
  • 16
0
votes
1 answer

Is it possible to express a not null constraint using relational calculus?

I understand that relational calculus is based on first order logic and as such has no concept of null values, however a not null constraint can be expressed in a query in relational algebra using an anti-join. Is there an equivalent mechanism to…
mdmjsh
  • 915
  • 9
  • 20
0
votes
2 answers

Database Design of a value identified by two Primary Keys

I have a table of event_id, role_id, and rank. The following table should help visualize the various outcomes we expect with regards to our constraints: scenario Event_Id Role_Id Rank 1 1 1 1 good …
1
2 3