SQL Introduction

SQL stands for Structured Query Language.

SQL is a standard programming language designed for storing, retrieving, managing, and manipulating data in a relational database management system (RDBMS).

SQL is the most widely implemented language and is supported by the popular relational database systems, like MySQL, SQL Server, Oracle, IBM DB2, MS Access, Sybase, Informix, Postgres, etc.,

However, some of the SQL features are implemented differently in different database systems.

History of SQL

SQL was originally developed in the early 1970s at IBM, which was initially called SEQUEL (stands for Structured English Query Language).

Later, it was changed to SQL (pronounced as S-Q-L), which stands for Structured Query Language.

What can you do with SQL?

Here is a list of things you can do using SQL.

  • Create a database
  • Create a table in a database
  • Insert or add data to a table
  • Update or modify data of a table
  • Delete data from a table
  • Retrieve or Query data from a table
  • Set access permissions on a database for data security
  • and many more.

In addition to the SQL standards, most relational database systems have their own additional proprietary extensions that allow additional features.

Using SQL for a Website

If you are planning to build a website that shows data from a database, then you need to have the below architecture.

  • Database in the backend, that serves data to your application, like MySQL, Oracle, etc.,
  • Server-side scripting language to interact with the database, like PHP, Java, ASP, etc.,
  • Client-side scripting language to invoke the server-side scripts when needed, like JavaScript, Angular, React, etc.,
    • Optional and required only if we have a separation between client-side scripting and server-side scripting, which usually happens in API architecture implementation.
  • Client-side HTML and CSS to present the data retrieved

How is the data stored in a database?

In all the modern RDBMS database systems, the data is represented as explained below.

  • A database is a collection of database objects, called tables.
  • A table is a collection of related entries, in the form of rows and columns.
  • A row is an individual entry that exists in a table, which acts as a horizontal entity in a table.
  • A column is a vertical entity, that contains information associated with a specific field in a table. 

Overall, a database is a collection of tables, where each table contains a collection of related entries in the form of rows and columns.

Overall

We now know what SQL is and why do we need to learn it.