Introduction to SQL: What Is SQL?
SQL (Structured Query
Language) is a language for relational database.
It allows:
- The creation of
databases and tables.
- The search of data
in the base.
- Updating data.
- Management of rights
of users.
The main commands
are:
- CONNECT to etablish
a connection to a database.
- CREATE to create
a new database or a table.
- INSERT to add data.
- SELECT to make a
search in the content.
It is possible to write SQL procedural programs with iterations and conditions.
The best known version on the Web is MySQL, a free implementation that is used particularly with PHP, but also SQL is the language of many other database software such as PostGreSQL, Oracle, DB2, Access and SQL Server...
SQL commands are
close to the natural language, it was the goal of the language the principles
of which were posed by Edgar F. Codd
and applied by IBM
SEQUEL (Structured Query Language English), then renamed SQL.
But the first commercial
version based on Sequel was made by Relational Software, named Oracle now.
ISO SQL-92 or SQL-2 was developed in 1992 and is commonly used. But new standards have succeeded it, not necessarily implemented on all software. ISO SQL: 2006 can manage XML files, including importing XML data in a database or export its content in XML.
You can access a database by sending commands as it is done in PHP, or with a visual software such as phpMyAdmin running on the server or locally through Wamp Server, as well as many other such local servers.
In this tutorial, we will use MySQL with PHP as phpMyAdmin interface.