Categories
Database Technology

FIT9019: Week 6

Manoj presented a lecture focused on the Structured Query Language [SQL] upon our return from the easter break.  The tutorial was closely tied to the lecture enabling us to work through the code examples shown. With that in mind, shown below are the types of queries covered in the lecture and tutorial with an example and description:

CREATE – create tables (or Databases), specifying the table name and column values. Constraints can be applied to the attributes such as Primary Key, Foreign Key, Default value and Not Null however it is probably easier to add constraints using the ‘ALTER TABLE’ query. CREATE is part of DDL.

CREATE TABLE DEPARTMENT
(DEPT_NUM INTEGER, DEPT_NAME varchar(20), CREATION_DATE DATE);