# Thread: Any help with relational Algebra? :(

1. Registered User
Join Date
Mar 2013
Posts
5

## Any help with relational Algebra? :(

I want to start learning about SQL, and wants to understand a little Relational Algebra.

I started with basic exercize, but dont know where to start.

I got 3 relations:

Ingredients(ingredients_id, iname, price)
Recipe(recipe_id, rname, type, portions)
Contains(recipe_id, ingredients_id, amount)

And now i want to write relational algebra that answers this 3:

1. a list with ingredients and amount for Recipe "Meatballs"
2. a list with all recipenames, for recipes that ONLY contains ingredients that costs less than 40
3. Recipename for recipes that contains "Eggs" but not "Chilli"

I hope u could help me, get started

2. Resident Curmudgeon
Join Date
Feb 2004
Location
In front of the computer
Posts
15,579
Relational Algebra is like most forms of math... The basic concepts and principles are rooted in math and logic, but the method for teaching them varies greatly from one school of thought to another and even more from one author/teacher to another. All of them get you to the same destination, but by a myriad of different routes.

Where did you get this example? If we can see the original presentation, then we can formulate answers that fit that presentation. If we just answer at will, the answers will probably be more confusing than the questions are!

-PatP

3. Registered User
Join Date
Mar 2013
Posts
5
I got that from a book, little old. I think i did describe it very well
The only question they gives me is:
Write with relational algebra or draw a tree with relational operators, that answers following questions:

1. a list with ingredients and amount for Recipe "Meatballs"
2. a list with all recipenames, for recipes that ONLY contains ingredients that costs less than 40
3. Recipename for recipes that contains "Eggs" but not "Chilli"

I dont got anything else. I just need to use the Operators. I want someone write it with Operators, i want to see if i can read it. Cause i dont know how to write it, but can read it a little bit.

4. Resident Curmudgeon
Join Date
Feb 2004
Location
In front of the computer
Posts
15,579
I'm sorry, but without at least the basic information about what's been covered and how it is presented I have no way to help you.

-PatP

5. Registered User
Join Date
Mar 2013
Posts
5

6. Registered User
Join Date
Apr 2013
Posts
1
Link Helped!!...thanks guys!! catalogues no credit check
Last edited by frankieharvey; 04-05-13 at 06:00.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•