Week 6

Post date: Oct 07, 2018 10:52:8 AM

/!\ In-Class Assignment 1 will be on Wednesday

Chapter 6: The Relational Algebra and Relational Calculus (Continued)

Binary relational operations: JOIN and DIVISION

Additional Relational Operations

Chapter 4: Basic SQL

SQL data definition and data types

Specifying constraints in SQL

Basic retrieval queries in SQL

INSERT, DELETE, and UPDATE statements in SQL

Simplified DDL SQL:

CREATE TABLE table_name (

columnName1 datatype1,

columnName2 datatype2,

...

CONSTRAINT constraint1_name PRIMARY KEY (columnName1, columnName2, ...),

CONSTRAINT constraint2_name FOREIGN KEY (columnName) REFERENCES other_table_name(other_table_column)

);

DROP TABLE IF EXISTS table_name;

ALTER TABLE table_name

ADD CONSTRAINT ...,

DROP COLUMN ...

...;

Lab Exercises:

Write the SQL DDL commands in order to create the following schemas: