the study of relations (i.e., database tables) and relational operators (join, selection, projection, etc.) as a kind of algebraic structure.

learn more… | top users | synonyms

0
votes
0answers
16 views

Relational Algebra - Finding statement

I got the following database schema and I am trying to formulate a few relational algebra terms, but I have still some issues with formulating them: For each flight with the aircraft capacity of at ...
0
votes
0answers
20 views

How do I represent an outer join in tuple relational calculus?

I know how to make an outer join in relational algebra but not in relational calculus. let's say I have R1(A, B, C) and R2(D, E) how can I make an outer join between R1 and R2 with the condition A = D ...
0
votes
0answers
26 views

Proof of RAP-derivation sequence for a set of functional dependencies in relational databases

I'm reading David Maier's outstanding but out-of-print book on relational databases (the book,"The Theory of Relational Databases", is available online from the author's website http://web.cecs.pdx....
0
votes
1answer
34 views

Count in relational algebra using Ω = { π, σ, ⋈, ⋉, β, x, ∪, ∩ , - }

schema(author)={name, newspaper} The table contains a list of authors. Each author works for a newspaper. So a single newspaper may employ multiple authors. How ...
0
votes
0answers
82 views

convert query to relational algebra

I have the following relational database schema: and I want to convert the following into relational algebra: List the names and phone numbers of the bidders who are not always affected by ...
0
votes
0answers
19 views

Expressing at least one in relational algebra

I began realtional algebra and I have some difficulties with the division which means for me "every". Yet every time I use it it seems to be playing the Russian roulette. Let be three databases: ...
0
votes
3answers
91 views

Relational query for universally quantified formula

My university is participating in the implementation of a library borrowing managing system at Richelieu National Library in France. I received the order to formulate the query: "find all users ...
4
votes
1answer
110 views

NL and NP compute different binary relations, so what?

Let the binary relation computed by a nondeterministic transducer be the relation between input strings and the possible output strings the transducer can produce (and accept) for the given input ...
2
votes
1answer
21 views

Combinations of elements with mutual relationships

I need to create the combination of 3 elements from a array of given n elements, however every of those 3 el. has to be in "relationship" with each other. Here is an example I can describe my issue ...
2
votes
0answers
38 views

Using cross-products with relational algebra

I have some questions about something that I'm working on in an assignment for my database class. Here is the schema for the questions I'm working on, so that you know what to refer to: ...
5
votes
1answer
414 views

A relational algebra extended to model the full DML (“CRUD”) domain

There are multiple references about the relational algebra for modeling queries (SELECT) but I have found very very little on the expanded algebra that would ...
0
votes
0answers
53 views

Algorithm to test dependency preservation

Is there an algorithm to test whether the decomposition of relation $R$ into relations $R_1,\dots,R_n$ is dependency-preserving? In more detail, I am given a relation $R(x_1,\dots,x_m)$ on $m$ ...
2
votes
1answer
2k views

Finding the Candidate Keys of a Relation Using the FD's

I have definitely checked out many different related posts. I have also done different sample problems from online sources as well from a similar problem. However, I am stuck on the problem below ...
2
votes
2answers
328 views

When should you use the existential and universal quantifiers for Relational Calculus?

Could someone explain to me WHEN do you use existential and universal quantifiers for Relational Calculus? Given this schema: Hotel(hotelNo, hotelName, city) ...
1
vote
0answers
43 views

Is existential quantifier redundant

I was reading Tuple Relational Calculus from a textbook. I came across this query: For every project located in 'Stafford', list the project number, the controlling department number, and the ...
0
votes
0answers
65 views

Relational Algebra - Mistake in the quiz?

I've just done a mini test and scored 9/10, however, from my understanding, I think this question is incorrect. Here is the only question which I don't understand how it can be correct: So I ...
0
votes
1answer
4k views

Use count() in relational algebra

Person(name, phone) Mike 456-789 Mike 123-456 John 230-785 $\dots \dots$ How to get those people who have more than one phone numbers with relational algebra? This sounds simple, but I am ...
0
votes
0answers
265 views

convert domain relational calculus with two same tuples to relational algebra

Given two relations $R(A, B)$ and $S(A, C)$. I can understand the early part is the projection of attribute $A$ from $S$, which could be written as $π_a(S)$, but later part is confusing and not ...
1
vote
0answers
20 views

In search for toy relations to test relational algebra

Does anybody know any toy database / relations that are particularly good and also complete to demonstrate and test relational algebra concepts? I'm hoping some database researchers should have ...
1
vote
1answer
61 views

What does superscript + mean in relational algebra?

What does superscript + mean in relational algebra? Suppose $A$ is a subset of attributes of all attributes in a relation $R$. What does $A^+$ mean?
1
vote
1answer
23 views

Finding representatives of equivalence classes

I have a table of pairs of objects, which defines an equivalence relation. How can I extract a single object from each of the equivalence classes using relational algebra? It can easily be done with ...
0
votes
1answer
975 views

Resolving many to many relationships?

I'm trying to separate a weird relationship. It goes like this: One waiter can serve more than one kind of drink and one kind of drink can be served by more than one waiter. One waiter can wear more ...
2
votes
1answer
87 views

Relational algebra statement for a query

For the following schema ...
2
votes
1answer
261 views

Equivalence relation Mathematical base In Computer science

I have this equivalence relation problem: Let $R$ and $S$ be two equivalence relations on the same set $A$. Define a new relation $U$ such that $U(x,y) \leftrightarrow [R(x,y) \text{ or } S(x,y)]$. ...
1
vote
0answers
83 views

Smallest set of features that would make relational algebra Turing complete

I'm thinking this should be just one or two things, since lambda calculus is so tiny and still Turing complete. Probably just recursion (something like "MY_QUERY(param) = select * from param UNION ...
2
votes
2answers
2k views

“At least one” clause in Relational Algebra

I'm fairly new to the syntax of relational algebra, and I'm having a hard time understanding how I could set a "at least one" clause. Example: I have: a table with books (listing the title, year ...
0
votes
1answer
95 views

relational algebra and SQL

Using the following relations: ...
4
votes
1answer
124 views

Computing number of block reads given relational algebra statement

So I'm just starting to learn about query processing and such in databases and I'm having some trouble. I don't really understand how to compute the minimum number of block reads given a relation and ...
4
votes
1answer
110 views

Origin of theta-joins

I've taken an introductory database course where like many good database courses, they taught relational algebra, including $\theta$-joins. However, I've recently read E. F. Codd's 1970 paper, A ...
4
votes
1answer
328 views

What is OUTER UNION and why is it partially compatible

I am trying to understand how a OUTER UNION $∪^✳$ works, and why it is only partially compatible. I am aware this operation was created to take union of tuples ...
6
votes
2answers
99 views

Optimizing a join where each table has a selection

Consider the following query: ...
25
votes
3answers
2k views

Do subqueries add expressive power to SQL queries?

Does SQL need subqueries? Imagine a sufficiently generalized implementation of the structured query language for relation databases. Since the structure of the canonical SQL ...
16
votes
2answers
412 views

Does the 'difference' operation add expressiveness to a query language that already includes 'join'?

The set difference operator (e.g., EXCEPT in some SQL variants) is one of the many fundamental operators of relational algebra. However, there are some databases ...