SQL Introduction

SQL Introduction. Introduction to SQL.

What is SQL?

SQL stands for Structured Query Language. SQL is used for accessing, modifying and creating new data in the database. SQL is used worldwide for manipulating data in databases. In SQL, we use commands to retrieve, modify and to store data in database.

SQL Can be used to

  • create new databases.
  • create new tables in a database.
  • insert new records in the tables.
  • delete the records in the existing tables.
  • create stored procedures in database.
  • create views in database.
  • grant or revoke various permissions from users like accessing the database.
SQL is an ANSI/ISO standard but still there are various versions of SQL language available. However, to be compliant with the ANSI standard, they all support common commands such as SELECT, INSERT, UPDATE, WHERE in a similar way.

RDBMS

RDMBS means Relational Database Management System. RDBMS is like a basic building block for all modern day database systems like MYSQL, Microsoft Access, Oracle, PostgreSQL and many more.

RDMBS stores the data into database objects called as tables. A table is made up of rows and columns. A table contains data field. For example look at the following "student" table.
 id | first_name | last_name | age |   subject   
----+------------+-----------+-----+-------------
  1 | Carol      | Dentist   |  15 | FoodTech
  2 | Sam        | Wick      |  19 | Architect
  3 | Daryl      | Dixon     |  13 | Mathematics
  5 | Morgan     | Dee       |  15 | Wrestling
  4 | Rick       | Grimes    |  14 | Physics
(5 rows)
It consists of data fields related to student. Data fields are nothing but columns in the table which are used to store information about every record in the table. In given "student" table the data fields are id, first_name, last_name, age and subject. Next -

Comments