Why study Relational Algebra?

I am familiar with SQL so when I had to study Relational Algebra(RA) I found it difficult to understand why should I study RA or how is it related to SQL? Ideally it should have been other way round, not quite in my case.

I couldn’t find good analogies so I came up with a couple of them. Hope this helps you get an idea.

I present two simple analogies here

  1. Say you need an Algorithm to sort a set of numbers. And you write an algorithm, say a version of quick sort. Next you need to implement it. You can code it in any programming language – Java/C etc. using language specific constructs. As long as the idea is retained the code should get you the desired result. Similarly you can think of RA as the theoretical model to query a relational databases. It defines operations like Select, Project etc. This idea has been implemented by a query language like SQL.
  2. Consider specification document written for a Server. Any vendor who plans to build a server should comply with this specification document. As long as the server follows the rules / guidelines specified in the document it’s all good. On similar lines you can think of RA and SQL

Author: codesmartly

I am Enthusiastic about Learning new things and sharing my Knowledge. I like programming and have a pretty good background in Computer Science.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s