What is a Relational Database?
A relational database is a container for data which is organized relational, i.e. into groups of related data. These groups are known as relational tables.
In short We can Say:
Thought of another way, a relational database is a lot like a bookshelf. You can put any book you like on the bookshelf but it is much easier to find the book you want if they are arranged by category. For example, you may have history books on one shelf, novels on another and DVDs on another.
Splitting the Data:
By splitting the data into categories (or related groups), relational databases allow us to be able to store and retrieve data in a way that makes sense to us. Let’s create a simple database by using an everyday situation that is easy to understand. Imagine that you are in a shopping mall. There are tons of people in this mall so there is no way you can remember all of their names. You put them into following 3 categories (relational tables)…
- Friends – the people you know
- Acquaintances – the people you have met but don’t know well
- Unknown – the people in the mall you don’t know at all.
You now have a way of grouping the people in the mall according to their relationship with you, but now you need to take their information down. We’ll use the following:
- First name
- Last name
- Telephone number
The bits of data that we decide to keep about the people in the mall become the headings (columns) for our categories (relational tables) and we store in a similar manner to below:
Working Table in RDBMS:
We now have a working table and can put as much information in it as we like. You’re probably asking – Why would I need to categorize information like this into a database? Why can’t I just write it down?
Well, that is because the true power of databases comes from being able to hold hundreds and hundreds of pieces of data and then allowing us to be able to retrieve this data easily. Try to remember the name of everyone you have ever met – difficult isn’t it?!
SQL Queries in RDBMS:
If you had a list of every person you had ever met stored in a database then you would be able to retrieve it at a later point in time by using SQL queries.
SQL queries allow you to retrieve the specific kind of information that you are looking for in the database.
However, before you can even query the database, you need to create the tables and decide what the columns for these tables should be. This process is not always easy especially where the tables can be very large and complex and the data can be put into more than one category. This process is known as data modeling.
Consider Reading to these articles: