Question

How would I write the SQL statement SELECT fname AS First_Name, lname AS Last_Name FROM employee...

How would I write the SQL statement
SELECT fname AS First_Name, lname AS Last_Name
FROM employee
WHERE salary BETWEEN 10000 AND 30000;

in relational algebraic syntax?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

In relational algebra select statement of SQL is performed by π or project operation.

The where clause in SQL is equivalent to σ or select operation in relational algebra.

The rename operator is denoted by ρ symbol.

Hence, the required query in relational algebra is :

π First_Name, Last_Name ( σ ( salary >= 10000salary <= 30000 ) ρ ( First_Name/fname, Last_Name/lname ) ( employee ).

Add a comment
Know the answer?
Add Answer to:
How would I write the SQL statement SELECT fname AS First_Name, lname AS Last_Name FROM employee...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT