What is this textbook devoted to?
This book is devoted to practical application of SQL(Structured Query Language) is a database computer language designed for the retrieval and management of data in relational database management systems (RDBMS), database schema creation and modification, and database object access control management.SQL language and, in the first place, to extraction of data from relational database, which means that it is focused on SELECT statement, the most complicated instruction in terms of syntax. However in this work you will also find the necessary information on other statements of data manipulation sublanguage ( DML - Data Manipulation Language - sublanguge of SQL including SELECT, INSERT, UPDATE and DELETE statements.DML ), i.e. to INSERT, UPDATE and DELETE statements initiating modification of data. Subsequently we plan to add chapters devoted to the sublanguage of scheme definition – DDL (Data Definition Language), using which the database objects, in particular tables and representations, are created and altered.
Such a way of presenting of the material was chosen due to the fact that the textbook is mostly intended for potential users and developers of DBMS applications, who are primarily focused on the problems of data extraction from the existing databases, and for whom the issues of modification and creation of storage structures are of secondary importance.
All the examples adduced in the textbook can be solved online using real database server. You can also edit the available and generate new queries using in-built word processor, and also you can execute them on the server.
A number of book chapters contain exercises, recommended for better memorizing of the studied material. You can use the system of validity check of the results obtained for these exercises on the website «SQL Excercises», wherefrom we have borrowed these exercises.
Following the established practice, we offer you an opportunity to benefit from mistakes of other people. Thereby, we, analyzing fallacious solutions of some of the tasks, in the most cases do not provide any final correct solutions. We have two reasons to do so:
It is quite obvious that upon identification of the cause of the mistake in the course of analysis of fallacious results their correction will not require a lot of efforts.
The fallacious results suggested in the book are not artificially invented. These queries were written by the visitors of the site, who upon several fruitless attempts to solve the problem asked for explanation why the allegedly correct query had been rejected by the verification system. That is why we daresay that such an explanation of the causes of such “typical” errors will help to make a much better progress in SQL studies, than mere analysis of the examples of use of any language structures.