Lecture 2.1

Structured Query Language

  • data definition language
  • Data manipulation language
  • Industrial standard
Creating a new database structure (schema)
create, alter, drop
Adding information, changing it, or deleting it
insert, update, delete
Finding and extracting subsets of the information in the database
select

Extracting columns and/or rows/records from a tableProduces a new 'table' based upon an existing set of tables

select <fields> from <table>

<fields> - seperated by comma. * wildcard for everything

Duplicates are not selected (set theory)

Row extraction in SQL

select * from <table> where <field>='<data>' (AND...)

Structural information is carried across to output.