Structured Query Language (SQL) Overview
Non-procedural (declarative) language common to most relational database systems.
– Used by the database system to "manage" itself internally and by users to manipulate and query the data.
– Uses set theory (as opposed to row processing) to process requests.
– Has a limited but flexible set of commands.
– Free-form for the most part, uses semi-colon as statement terminator in most databases.
Knowledge of SQL should enable
– moving easily from one database system to another
– writing queries that cannot be represented in the graphical user interface
– analyzing queries for performance (tuning)
SQL commands classified by function:
– Data definition language (DDL) - used to define or change database structure(s)
– Data manipulation language (DML) - used to select or change data
– Data control language (DCL) - used to control user access (e.g., GRANT, REVOKE)
– Transactional language - used to control logical units of work (e.g., COMMIT)