SQL, a language for database management
SQL is convenient for managing large collections of data with a predefined list of components. The classical activity of an enterprise, transactions and resources are perfectly managed by a such tool while intelligent information processing requires another format as XML.
This is the most used language for building and using relational databases.
The original name was SEQUEL that is a short for "Structured English
QUEry Language", but was condensed to SQL and the full name "Structured
Query Language", come then. Must be pronounced S-Q-L.
The authors are Donald D. Chamberlin and Raymond F. Boyce at IBM. The System/38 implemention was sold by IBM in 1979, and Oracle by Relational Software in the same year. In 1982 IBM implemented SQL in DB2.
SQL becomes ANSI standard in 1986, ISO standard in 1987 but actual implementations are far to be standardized.
SQL 2003 added XML features to the language.
Variants and procedural extensions
- PL/SQL for Oracle (now a company).
- PS/PgSQL for PostgreSQL.
- SQL Procedural Language by IBM. This is a complete programming language.
- Transact SQL for MS SQL Server.
- Access by Microsoft and VBA (Visual Basic for Applications).
SQL 2003 features
In the relational model, queries are expressed declaratively as relations between categories of data (and, or, mainly).
- Intended mainly for query.
- Extended with procedural programming languages.
- Retrieval of data with functional queries.
- Uses tables and rows.
- Data manipulation functions:
- Delete entries, rows.
- Insert rows.
- Merge tables.
- Select articles.
- Update the content of a table.
- Data definition functions:
- Create a table, a row, ...
- Drop table, row, ...
- Control functions:
- Grant an user to perform an operation.
- Revoke a permission to an user.
- A comment has the form: -- some comment.
CREATE TABLE message (text char(15)); INSERT INTO message (text) VALUES ('Hello, World!'); SELECT text FROM message; DROP TABLE message;
Choose articles that cost is less than 50 $.
SELECT * FROM article WHERE price < 50
- MySQL. Supported by all shared hostings.
- PostgreSQL vs. Oracle
Comparing a free tool with the most expensive système.
- SQL tutorial
with PHP and MySQL
Learn with examples how to use SQL on a website.
Documents and references: