CMPT 354 Study Guide - Quiz Guide: Foreign Key

83 views3 pages

Document Summary

Download the bookbiz. zip file in your space and unzip it. (you may need to create a directory, like tutorial2, save the file there, and make it your current directory). You will find a bookbiz. sql file with the sql commands you need for this part. Execute the file bookbiz. sql to create the tables for the following questions. Browse through the tables and try to understand the structures. A table diagram has a box for each table and shows the name of the table and its attributes. For each foreign key tha diagram shows a link (line) between the foreign key and the key referenced by that. Create sql queries for each of the following: Show all columns and rows in the authors table. Show the first and last names of all authors. Show the first and last names of all authors, but this time make the columns labels at the top firstname and lastname (no blanks).