Questions tagged [relational-calculus]

For questions: (a) about one of the relational forms of predicate calculus, i.e., domain and tuple, or (b) about expressing queries on data contained in a relational database utilizing one of those forms of calculus.

Filter by
Sorted by
Tagged with
2
votes
1answer
129 views

Declarative and Procedural Query Languages

In the book Database System Concepts 6th Edition, Chapter 2 (Relational Algebra), it states that there are three formal query languages, the relational algebra, the tuple relational calculus and the ...
2
votes
1answer
45 views

Confusion with Tuple Relation Calculus Operations

I came upon a question like, Given the following relational schemas Student (studId, name, age, sex, deptNo, advisor) Department (deptId, DName, hod, phoneNo) Which of the following will be the ...
2
votes
1answer
66 views

Questions Concerning the Chase Test

For the question above, my work for each of the questions is below the concerns. Here are my main concerns: Does the order in which you use the relations matter? Can you end up with less tuples with ...
2
votes
0answers
47 views

Converting from domain calculus to relational algebra

I have an assigned task at the uni and I have the three relations that follow: Customer (Name, City, Account) Offer (Product_Description, Supplier, Price) Order (Name, Product_Description, Quantity, ...
3
votes
0answers
271 views

Counting in Tuple Relational Calculus

Given the following schema: Staff (sid, sname) Project (pid, pdesc, pfrom, pto) Asset (aid, acat, adesc) Workfor (sid, pid, wfrom, wto) Assignment (aid, sid, pid, afrom, ato) Note: The bold ...
3
votes
0answers
160 views

Difference Between Implication and Conjunction in Domain Relational Calculus

I was reading my notes, and I came across this: Another example would be to find the names of the lecturers teaching all modules. We might reach for the following incorrect expression: {<N&...
1
vote
0answers
186 views

Quantifiers in Tuple Relational Calculus (Existencial and Universal)

Suppose this state for the relation schema Company I'm stuck trying to understand how, why and when I should use Quantifiers (Existencial and Universal) Examples: Here I understand how the ...
3
votes
1answer
2k views

Converting SQL to Relational Algebra / Calculus

I have designed a schema and generated a few SQL queries. I'm using PostgreSQL. For example: CREATE TABLE train ( train_code SERIAL PRIMARY KEY, name TEXT NOT NULL ); CREATE TABLE journey ( ...
1
vote
1answer
775 views

A tuple relational calculus equivalent for the given SQL query

Well, here's a SQL query: select Employee.Name,Department.Name from Employee,Department where Employee.Dept_no=Department.No I have tried a tuple relational calculus on it as: {t|Ǝ s ∈ Employee (s[...
0
votes
1answer
257 views

How to express functional dependency in relational calculus and SQL?

I want to express in relational calculus and SQL the following functional dependency associated with Vote. This is the first time I try to implement it in actual SQL and relational calculus. Vote: #...
5
votes
2answers
2k views

Creating relationships between tables that where not specified in the given UML diagram

Good evening! I'm working on designing my very first actual database from the following UML class diagram (in French unfortunately): I'm at the point of creating the relational sketch of it which I ...
1
vote
0answers
127 views

How to express inclusive and exclusive relations in relational algebra and relational calculus?

Let be the following simplified database sketch: R1(P,S),R2(S,T) and R3(T,S) with P= people S = Sport and T= Sports Center How to find in relational algebra and relational calculus which couples ...
7
votes
2answers
389 views

What are the practical uses for relational calculus?

In my Database Design course we are learning both Relational Algebra and Relational Calculus. I can see where Relational Algebra could be useful since it is closely tied to SQL. Our professor said ...
2
votes
1answer
39 views

TRC: Select an ID if it appears on all measurements

I have these two "tables": Station (station_id, city) // Stations details Rainfall (station_id, date, amount) // Rainfall measurements With Tuple Relational Calculus (TRC), I need to ...
6
votes
1answer
6k views

Find the highest graded student using Tuple Relational Calculus

Suppose I have a table of students, containing their ID and their grade: ----------------- | id | grade | ----------------- | 1 | 83 | | 2 | 94 | | 3 | 92 | | 4 | 78 | ...
1
vote
2answers
898 views

What does <> mean in Relational Calculus?

I saw a Tuple Relational Calculus formula, and it contained the symbol <> I couldn't find any reference to it anywhere - can anyone tell me what this means? (perhaps this question will be a ...