Homework # 2
Due: Wednesday, Sept 14.
Give me a printout or send it to me
as an email attachment.
1.
See
the description of this sample database with sample
records.
2.
Write
down SQL statements as specified in the following and save them in a text file.
·
Write
down three CREATE TABLE statements to create the tables as described in the sample database. You should set the column types, the
primary key, and whether NULL is allowed in your CREATE TABLE statements
according the description below. You don’t have to set the foreign key
constraint for this homework.
·
Write
down INSERT statements to insert the sample records described in the sample
database below into the corresponding tables.
Useful references for
doing this homework:
·
Simple tutorial on the use of CREATE TABLE and INSERT INTO from
W3Schools.
·
Full
syntax of CREATE DATABASE,
CREATE TABLE
and INSERT INTO from the MySQL online reference manual
·
The overview handout on SQL