Post date: Oct 19, 2017 7:15:14 AM
/!\ Assignment 1 is available on BlackBoard
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: