SQL Tutorial

SQL Tutorial cover image
  1. Home
  2. MySQL
  3. SQL Tutorial

Welcome to the online free SQL tutorial at webdevelopersnotes.com

What is SQL?

The Structured Query Language is used in manipulating data stored in Relational Database Management Systems (RDBMS). SQL provides commands through which data can be extracted, sorted, updated, deleted and inserted.

SQL has the full support of ANSI (American National Standards Institute), which has laid down certain rules for the language.
SQL can be used with any RDBMS such as MySQL, mSQL, PostgresSQL, Oracle, Microsoft SQL Server, Access, Sybase, Ingres etc. All the important and common SQL statements are supported by these RDBMS, however, each has its own set of proprietary statements and extensions.

Sponsored Links

The SQL tutorial on webdevelopersnotes.com

As I mentioned before, SQL is a general query language for several different kinds of databases. The SQL tutorial on this site is has been built around MySQL, which is a open source RDBMS available for download at MySQL.com. However, I have tried to avoid the commands specific to MySQL in this SQL tutorial. The SQL tutorial would help build a strong foundation in the SQL language and you can then port your knowledge to the specific RDBMS you plan to use.

Why MySQL?

Choosing a database system depends on three main factors; the platform on which you work, your finances and what you want to achieve. The reason I chose MySQL is because, I work mostly on the Linux system and MySQL is free for Linux. Also, I am an ardent supporter of Open Source Software movement and firmly believe that the combination of Linux, Apache, MySQL and PHP (LAMP) is hard to beat.

What are databases and why do we need them?

In simplest terms, databases are store houses of data. Suppose you have an ASCII file that contains the names of your friends and their email addresses. Would you consider this file as a database? Technically, yes! You can add, update and delete data from this file. You may also write a small program (say in Perl or C) to extract, sort and display data on the basis of some search criterion.

The need to store data is quite a fundamental to humans. Data storage and representation has been with us for thousands of years. Take the example of cave drawings (graphical data) or charting the course of seasons over the years (this would have helped in knowing the best times to sow or to migrate).

Collecting data is important but more significant is the analysis of the data. A case in point is study of the movements of astronomical objects (stars, planets, the moon and the sun). Analysis of this data gave birth to two sciences, Astronomy and Astrology. Astonomy helps us predict tides, eclipses etc. Astrology on the other hand had provided loads of entertainment (!) to avid followers over the years.

Coming back to the topic at hand, storing data is of prime importance because we can then analyse the data and extract some Information.

I have spent a good deal of time in writing this SQL tutorial and if you do find it useful, I would be glad to receive your comments/suggestions/queries. Here are the things that we will cover in this tutorial:

Let’s begin with lighting the M of LAMP.

MySQL