relational-algebra Questions

4

I wasn't sure quite what to call this problem but it's not exactly counting rows. Let's say we have the relation: Competition(compId, sport, playerName, medal) And let's say the attribute medal ...
Barbiturism asked 11/9, 2013 at 23:16

4

Solved

I am learning insertion anomaly from www.sqa.org.uk/e-learning. Following data is written in it, An Insert Anomaly occurs when certain attributes cannot be inserted into the database without the p...
Izak asked 21/10, 2012 at 14:4

3

Solved

I wanted to know what is the equivalent in GROUP BY, SORT BY and ORDER BY in algebra relational ?

8

Working with databases, how can I find MAX using relational algebra?
Groscr asked 30/3, 2011 at 23:30

3

Solved

I am studying for exams and am failing to find a solid criteria by which I can determine if the Cartesian Product x is to be used or if Natural Join |X| is to be used. I had come up with a rough g...
Pretender asked 2/1, 2013 at 18:38

3

Solved

There is a DISTINCT operator in SQL. However, I have an assignment in which I need to get some distinct values from a table, and I can only use relational algebra. Is there a way?
Marquez asked 23/1, 2011 at 18:53

3

How do I represent the SQL "not exists" clause in relational algebra?
Claudclauddetta asked 17/9, 2010 at 18:47

3

Solved

Is there a relational algebra equivalent of the SQL expression NOT IN? For example if I have the relation: A1 | A2 ---------- x | y a | b y | x I want to remove all tuples in the relation for w...
Grandfatherly asked 22/9, 2012 at 7:27

2

Solved

I have two documents one with tree structure and the other one relation to the first doc. Im trying to join these two doc`s by fk and pk. I couldnt get the actual results and it displays all null v...
Sphygmic asked 31/1, 2015 at 4:57

4

Solved

I'm looking for a clear, basic explanation of the concept of theta join in relational algebra and perhaps an example (using SQL perhaps) to illustrate its usage. If I understand it correctly, the t...
Conflagrant asked 27/9, 2011 at 1:58

3

Solved

Suppose the relation R( K, L, M, N, P), and the functional dependencies that hold on R are: - L -> P - MP -> K - KM -> P - LM -> N Suppose we decompose it into 3 relations as fol...

1

I want to query the id of all apartments that were never rented. I tried something like this: (π a_id (apartments)) - (π a_id σ from_date Exists ∧ end_date Exists (rental) ⨝ rental.a_id ...
Kaikaia asked 13/4, 2019 at 9:12

3

Solved

How do I represent a subquery in relation algebra? Do I put the new select under the previous select condition? SELECT number FROM collection WHERE number = (SELECT anotherNumber FROM anotherStack...
Rahn asked 3/10, 2010 at 17:36

1

theta join and inner join look identical to me: they are Cartesian product followed by an arbitrary selection. Or am I missing their differences? Thanks. The above wikipedia link says a theta-join...
Urano asked 17/6, 2018 at 13:41

9

Solved

I'm following the Stanford Database course and there's a question where we have Find all pizzerias that serve every pizza eaten by people over 30 using Relational Algebra only. The problem consist...
Lachellelaches asked 19/10, 2011 at 13:1

1

Solved

What is the rule for the transformation of a column in Relational Algebra? For example, I want to divide all values of a column with the average of that column. I can get average using aggregate ru...
Dyan asked 1/4, 2018 at 7:41

10

Solved

I'm referring to the basic relational algebra operators here. As I see it, everything that can be done with project can be done with select. I don't know if there is a difference or a certain nua...
Schnorrer asked 25/3, 2011 at 12:44

4

What is the difference between projection and selection? Is it: Projection --> for selecting the columns of table; and Selection ---> to select the rows of table? So are projection and selectio...
Cam asked 23/6, 2009 at 7:25

2

Solved

When the relational model was put forward by F.E. Codd, the established databases of the time used the hierarchical model. My understanding is that the relational model was felt to be a significant...

7

I'm having trouble understanding relational algebra when it comes to theta joins, equijoins and natural joins. Could someone please help me better understand it? If I use the = sign on a theta join...
Foreyard asked 23/10, 2011 at 23:52

2

I have a relation R cid sid gradepoint credits ------------------------------- CS425 001 4.0 3 ... I need to calculate the GPA as gradepoint * credits. How do I express this with a relational alge...
Sulfate asked 20/9, 2017 at 8:51

1

Solved

I'm a total begginer in Relational Algebra and I don't manage to fully understand how cartesian product works. I want to know what happen in cartesian product when my two table have common attribu...
Sillabub asked 20/9, 2017 at 12:1

1

Solved

For an exam, I am asked to get the list of clients having more than one rent, both as an SQL query and as an algebraic expression. For some reasons, the correction doesn't provide the algebraic ve...
Timotheus asked 27/8, 2017 at 14:57

2

Solved

What would I seek to achieve from a self-join? I already know what a self-join does. Operational descriptions on Stack Overflow with tables or join lists or the self-referencing employee-manager ex...
Desma asked 1/4, 2016 at 9:9

1

Solved

Suppose I have a table 'animals' whose rows represent different animals and there is a column species that might have values like 'cat', 'dog', 'horse', 'cow' etc. Suppose I am only interested in w...
Jammiejammin asked 3/2, 2016 at 10:42

© 2022 - 2024 — McMap. All rights reserved.