Introduction To SQL

What is a Database?

            The answer to this question is very simple. Database is the place where we can store our data. The Oracle database is designed in such a way that any data we want to store in it, we can store it in the form of tables. A table will contain Rows (In database terminology we will call them as Records) and Columns (In database terminology we will call them as Attributes).

Why we need a Database?

            Let me explain this with small example. Let us take the example of GMAIL, through which we can send mails; we can chat with friends.... by logging in with our credentials (Username and Password).

            Here in Gmail our Usernames should be unique. While registering it will ask to enter unique user name by checking the availability and each username will be associated with a password. So, where this information will be stored? This information will be stored in the tables of a database server which is located at the company. So, each time when you are trying to login then it will validate the information with the data stored in the database and it will do appropriate action.

            Similarly in real life almost in the entire places database becomes a mandatory thing as we can store data into it from any place and we can access that data from any place. Take Banking, Railways ticket reservations, Bus ticket reservations, Cinema ticket reservations and information, Hospitals..... Any place you take... they need a database to maintain the information.

So, now we understand the importance of the database in our real life. Now, here comes most important question. What is SQL?

What is SQL?
SQL means Structured Query Language. The statements which we are going to write in this language will be called as Queries. Each query will be having its own structure. That is why this language is called as Structured Query Language. Ok fine. Now we know what SQL is. The next question is why we need SQL?

Why we need SQL?

     So as discussed in the above sections, we will store the information in the database in the form of tables. How will you store? We cannot take it by hand and we cannot put it in the database right... Similarly how will you see the information? How will you modify the information? To do all these things we need a mode of communication with the database. We need to interact with the database by some medium. Here comes the usage of a Database language by which we can perform all the above mentioned tasks on the database. One such type of Language is SQL.

     So, SQL is a communication language which will be used to interact with the database. So, as part of SQL we are going to learn about how to perform all the above mentioned tasks.