January 2008
Intermediate to advanced
384 pages
8h 1m
English
The simple, single parameter lookup table is probably the most common kind. But you can also have lookup tables that use multiple parameters. As an example, consider a table of shipping boxes that have some standard industrial size number and three characteristics.
CREATE TABLE BoxSizes (box_nbr INTEGER NOT NULL -- industry code PRIMARY KEY, -- see text box_vol DECIMAL (10,4) NOT NULL CHECK (box_vol > 0.00), content_type CHAR(3) DEFAULT 'dry' NOT NULL CHECK (content_type IN ('wet', 'dry')), box_material CHAR(5) DEFAULT 'paper' NOT NULL CHECK (box_material IN ('paper', 'wood', 'metal')), box_wgt DECIMAL (8,3) NOT NULL CHECK (box_wgt > 0.000), box_price DECIMAL (8,3) NOT NULL CHECK (box_price > 0.000), UNIQUE (box_vol, ...Read now
Unlock full access