Database Tutorial

Course Tutorial Site

Site Admin

Lab #2 : Creating Tables

with 2 comments

This lab works on developing the students understanding of the syntax to create tables with database constraints. Specifically, you create tables that require PRIMARY KEY, FOREIGN KEY, and NOT NULL constraints.

Written by michaelmclaughlin

December 29th, 2009 at 4:40 pm

Posted in

2 Responses to 'Lab #2 : Creating Tables'

Subscribe to comments with RSS or TrackBack to 'Lab #2 : Creating Tables'.

  1. SYSTEM_USER_GROUP_ID references COMMON_LOOKUP_ID.

    SYSTEM_USER_TYPE also references COMMON_LOOKUP_ID.

    Shouldn’t the TYPE reference COMMON_LOOKUP_TYPE and be a string, not an integer?

    Dan Y

    17 Sep 10 at 4:11 pm

  2. The types are stored in the COMMON_LOOKUP to be normalized. Often denormalization leads to inserting the value from a COMMON_LOOKUP_CODE column into the local table, and sanitizing QA checks against the lookup table periodically.

    michaelmclaughlin

    3 Oct 10 at 2:47 pm

Leave a Reply