Lab #2 SQL Worksheet – DB structure, tables, and basic SQL commands
This lab covers an introduction to SQL commands to create tables. Basic data retrieval commands are also covered, as well as basic data manipulation commands to insert, update and delete data from a table.
PLEASE READ:
SQL (Structured Query Language) is the query language for relational database systems. SQL includes commands to
(i) define/alter (change) the structure of a database and its components, and (ii) manipulate and query a database ...
Although SQL is an ANSI (American National Standards Institute) standard, there are some slightly different versions/implementations of SQL. However, to be compliant with the ANSI standard, they all support at least the major commands (such as INSERT, UPDATE, DELETE, SELECT ...) in a similar manner.
In relational database systems, data is contained in tables. A table is a collection of rows (tuples) of the same structure. Tuples look like this: (x, y, z, etc) by the way, and can vary in length. A table consists of columns (attributes). Below is an example of a table called Vendor which contains three rows (one for each vendor) and seven columns:
Table Vendor