Unit IV Assignment
SQL Exercise
In this unit, we covered several constraints that can be used to manage the semantic integrity of the database. Your
textbook did go into much detail on how to use SQL to implement these constraints. The list below contains five
constraints discussed in this unit. For this assignment, you will research the syntax used to implement the constraint and
write a statement that a DBA might use to implement each constraint. You may use the CREATE TABLE or the ALTER
TABLE commands. You should use the Books database schema to write your statements. You do not have to run the
statements against the database, but you may. Certain commands will not work, depending on the data that is already
loaded into the tables. For instance, you cannot create a unique constraint on a column that contains non-unique data. (If
you do run the commands against the Books database, be sure to reverse them as well using the ALTER TABLE or
DROP TABLE statements.)
After you have typed in each SQL statement or set of SQL statements and executed them successfully, copy your SQL
code into a Word document. Then create a screen capture of the results window or copy and paste the results into the
text or Word document as well. The text or Word document should contain the results of all ‘Try It Out’ exercises. Be sure
to label each one with the title of the assignment, the page number in the textbook, and the number of the step you are
performing, so that your instructor can easily tell which one is which. Pay attention to the formatting of your SQL
statements and the labeling, as these items count in the final score as well. The SQL statements should be formatted as
they appear in the book.
Primary key constraints
Unique constraints
Data types
Default values
Check constraints
Submit the five statements in a Word or text document for grading.
Information about accessing the Blackboard Grading Rubric for this assignment is provided below