Structured Query Language (SQL)

 

Non-procedural (declarative) language common to most relational database systems.

 

         Used by the database system internally and by users to manipulate and query the data.

         Uses set theory (as opposed to row processing) to process requests.

         Limited but flexible set of commands.

         Free-form, 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

         troubleshooting

         analyzing queries for performance (tuning)

 

Commands classified by function:

 

         Data definition language (DDL) - define or change database structure(s)

 

                        CREATE

                        ALTER

                        DROP

 

         Data manipulation language (DML) - select or change data

 

                        INSERT

                        UPDATE

                        DELETE

                        SELECT

 

         Data control language (DCL) - control user access (e.g., GRANT, REVOKE)

 

         Transactions (e.g., COMMIT)