answersLogoWhite

0

In essence, Relational Algebra shows the mathematical manner in which a database management system (DBMS) goes about its job. Through the use of Relational Algebra, we can calculate the most efficient way for a DBMS to interact with the database, e.g. updating records, performing a COUNT of the rows in a table etc.

The Relational Algebra for returning the surnames in a table holding details of employees where their salary is greater than 30000 per year, is as follows:

SELECTSurname(PROJECTSalary>30000)

(The SELECT operator is often a Pi symbol, and the PROJECT operator is often a Sigma symbol)

An SQL statement, however, would go something like this:

SELECT Surname

FROM tblEmployee

WHERE Salary>30000

Hopefully you can see the difference. Ultimately, the algebra can be used by mathematicians and DBMS creators to ensure the DBMS works as efficiently as possible in performing tasks required by users. Whilst not really necassary in a small-scale database, clearly in a large, complex database you'll be looking at thousands and thousands of rows that need to be queried, updated etc, so efficiency in getting the data back is very important!

An SQL statement may look similar, but there's no real calculation involved here. It is instead a standardised language allowing database administrators and users to give a set of instructions, telling the DBMS (Oracle, MS Access, MySQL etc.) what you want to do to a database, e.g. query it, update it, delete from it, and so on.

I hope that answers your question!

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
RossRoss
Every question is just a happy little opportunity.
Chat with Ross

Add your answer:

Earn +20 pts
Q: What is the difference in Sql statement of sql and of relation algebra?
Write your answer...
Submit
Still have questions?
magnify glass
imp