SQL stands for "Structured Query Language". This language allows us to pose complex questions of a database. It also provides a means of creating databases. SQL very widely used. Many database products support SQL, this means that if learn how to use SQL you can apply this knowledge to MS Access or SQL Server or to Oracle or Ingres and countless other databases.
SQL works with relational databases. A relational database stores data in tables (relations). A database is a collection of tables. A table consists a list of records - each record in a table has the same structure, each has a fixed number of "fields" of a given type.
| name | region | area | population | gdp |
|---|---|---|---|---|
| 'Yemen' | 'Middle East' | 527970 | 14728474 | 23400000000 |
| 'Zaire' | 'Africa' | 2345410 | 44060636 | 18800000000 |
| 'Zambia' | 'Africa' | 752610 | 9445723 | 7900000000 |
| 'Zimbabwe' | 'Africa' | 390580 | 11139961 | 17400000000 |
The cia table used in the first tutorial has about 250 records the last few of which are shown here. Each record is a row representing a country. There are five fields some fields are of type string, some are of type integer.
Some examples of queries:
SQL also has commands to create tables, to add records, to delete records and to change the value of fields of existing records; you can specify read and write permissions for other users; you can commit and roll back transactions; you can add and delete fields from existing tables, specify indexes and create views.