Structured Query Language (SQL) is a specialized programming language originally developed by IBM in the early 1970s. The language is designed specifically for accessing and manipulating data held in a relational database management system (RDBMS).
Almost all database management systems have a SQL implementation. It is the most popular query language for database administrators, as it provides good functionality, power, and relative ease of use. It is widely used in both industry and academia, often for large, complex databases.
SQL was standardized by the American National Standards Institute (ANSI) in 1986 and has undergone many revisions. The language consists of a data definition language and a data manipulation language. The language is divided into a number of elements: clauses, expressions, predicates, queries, and statements. SQL is one of the easiest languages to learn and use.
We publish a series covering the best open source programming books for other popular languages. Read them here.
By Joshua D. Drake, John C. Worsley (916 pages)
Practical PostgreSQL is a comprehensive book that shows the reader how to compile PostgreSQL from source, create a database, and configure PostgreSQL to accept client-server connections. It also covers the many advanced features, such as transactions, versioning, replication, and referential integrity that enable developers and DBAs to use PostgreSQL for serious business applications.
The thorough introduction to PostgreSQL’s PL/pgSQL programming language explains how you can use this very useful but under-documented feature to develop stored procedures and triggers. The book includes a complete command reference, and database administrators will benefit from the chapters on user management, database maintenance, and backup & recovery. With Practical PostgreSQL, the reader will discover quickly why this open source database is a great open source alternative to proprietary products from Oracle, IBM, and Microsoft.
This book may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later.
By The PostgreSQL Global Development Group (454 pages)
These manuals are part of the official reference documentation for the PostgreSQL RDBMS (version 9.0.1).
The books are freely redistributable, under the same license as PostgreSQL.
By Markus Winand (HTML)
Use The Index, Luke is the free web-edition of SQL Performance Explained. This resource helps developers to improve database performance. The focus is on SQL; it covers all major SQL databases without getting lost in the details of any one specific product.
Starting with the basics of indexing and the WHERE clause, the book guides developers through all parts of an SQL statement and explains the pitfalls of object-relational mapping (ORM) tools like Hibernate.
Topics covered include:
“Use The Index, Luke!” is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.
By Akeel I Din (179 pages)
The book is released under a free to use non-commercial license.
By Alvaro Monge (540 pages)
Database Design with UML and SQL covers basic UML & SQL, UML design, and SQL technique.
The book is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
By Rahul Batra (HTML)
As the title suggests, this book offers a gentle introduction to the basics of SQL.
The book is not a reference work.
This guide is open source, published under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0) license.