HIM 3113 Chapter Notes - Chapter 1: Unique Key, Check Constraint, Null Character
Document Summary
You should have a firm understanding of chapters the appropriate chapters in the book. It is strongly recommended that you revisit these sections before starting this laboratory exercise. There are a number of common fields that appear as though they are numbers but are actually text (i. e. char or varchar(2)). Whenever you are storing a number that will not be calculated and which can possibly have a leading zero, you will want to store that field with a datatype of text. If you store it as a number, the leading zero will be removed. (see data types varchar2 in textbook) When creating tables it is often preferable to create the tables without foreign keys first. In this manner, if you do refer to them from other tables, data entered satisfies the constraints. Also you cannot enter the foreign key constraints until you have created the table to which that the constraint refers.