SHARE
TWEET

Untitled

a guest Apr 23rd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE PRODUCTION_ITEM(
  2.     SKU             Int         NOT NULL,
  3.     SKU_Description     Char(35)    NOT NULL,
  4.     ProductionStartDate     Date        NULL,
  5.     ProductionEndDate   Date        NULL,
  6.     QuantityOnHand      Int         NULL,
  7.     QuantityInProduction    Int         NULL,
  8.     CONSTRAINT      PRODUCTION_ITEM_PK PRIMARY KEY(SKU)
  9. );
  10.  
  11. CREATE TABLE CATALOG_SKU_2015(
  12.     CatalogID       Int         NOT NULL IDENTITY (20150001, 1),
  13.     SKU             Int         NOT NULL,
  14.     CatalogDescription  Varchar(255)    NOT NULL,
  15.     CatalogPage         Int     NULL,
  16.     DateOnWebSite       Date        NULL,
  17.     CONSTRAINT      CATALOG_SKU_2015_PK PRIMARY KEY(CatalogID),
  18.     CONSTRAINT      CAT15_PROD_ITEM_FK FOREIGN KEY(SKU)
  19.                     REFERENCES PRODUCTION_ITEM(SKU)
  20.                         ON UPDATE NO ACTION
  21.                         ON DELETE NO ACTION
  22. );
  23.  
  24. CREATE TABLE CATALOG_SKU_2016(
  25.     CatalogID       Int         NOT NULL IDENTITY (20160001, 1),
  26.     SKU             Int         NOT NULL,
  27.     CatalogDescription  Varchar(255)    NOT NULL,
  28.     CatalogPage         Int         NULL,
  29.     DateOnWebSite       Date        NULL,
  30.     CONSTRAINT      CATALOG_SKU_2016_PK PRIMARY KEY(CatalogID)
  31. );
  32.  
  33. CREATE TABLE PRODUCTION_ITEM_DATA(
  34.     SKU             Int         NOT NULL,
  35.     SKU_Description     Char(35)    NULL,
  36.     ProductionStartDate     Date        NULL,
  37.     ProductionEndDate   Date        NULL,
  38.     QuantityOnHand      Int         NULL,
  39.     QuantityInProduction    Int         NULL,
  40.     ApprovalDate        Date        NULL,
  41.     CONSTRAINT      PROD_ITEM_PK PRIMARY KEY(SKU)
  42. );
  43.  
  44. /******  CREATE TABLE FOR EXERCISE E.56  ******/
  45.  
  46. CREATE TABLE CATALOG_SKU_2017(
  47.     CatalogID       Int         NOT NULL IDENTITY (20170001, 1),
  48.     SKU             Int         NOT NULL,
  49.     CatalogDescription  Varchar(255)    NOT NULL,
  50.     CatalogPage         Int     NULL,
  51.     DateOnWebSite       Date        NULL,
  52.     CONSTRAINT      CATALOG_SKU_2017_PK PRIMARY KEY(CatalogID),
  53.     CONSTRAINT      CAT17_PROD_ITEM_FK FOREIGN KEY(SKU)
  54.                     REFERENCES PRODUCTION_ITEM(SKU)
  55.                         ON UPDATE NO ACTION
  56.                         ON DELETE NO ACTION
  57. );
  58.  
  59. /********************************************************************************/
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top