Professional Documents
Culture Documents
ASSIGNMENT OF DATABASE
Course_List has two foreign keys: Term, which references the primary key in Term, and
Course_Code, which references the primary key in Course.
Instructions:
2. Write a SQL CREATE TABLE command to create a table for "Term" as defined
above.
3. Write the SQL INSERT commands to add the data above into your table.
5. Write the SQL INSERT commands to add the data above into your table.
7. Write the SQL INSERT commands to add the data above into your table.
8. Write a SQL CREATE TABLE command to create a table for “Classroom” that
identifies the classrooms for each Classroom code. This is a new table, not
defined above. Include the following attributes:
a. ClassroomCode(pk)
b. Location
c. Room
d. Campus
Identify an appropriate primary key and write the CONSTRAINT clause as part
of the CREATE TABLE script to define it as a primary key.
10. Write the SQL INSERT commands to add the following data into your new table:
11. Write the SQL statement that joins the two tables (Course and Course_List) and
shows the data for these fields:
Course_Code
Course_Title
Instructor
Term
The SQL statement to join the tables (Course and Course list) is as follows:
SELECT COURSE. Course code, COURSE .Course title, COURSE LIST .Course code,
COURSE LIST .Term, COURSE LIST .Instructor, COURSE LIST .Classroom code