SHARE
TWEET

Untitled

a guest Apr 24th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. create table gr6Sales (
  2.         ID      INT NOT NULL ,
  3.  
  4.         SALE_PRICE DECIMAL(19, 4) NOT NULL ,
  5.  
  6.         PRODUCT_ID INT NOT NULL ,
  7.         DATE_ID INT     NOT NULL ,
  8.         ADDRESS_ID      INT NOT NULL ,
  9.  
  10.         FOREIGN KEY (PRODUCT_ID) REFERENCES gr6Product(PRODUCT_ID) ,
  11.         FOREIGN KEY (DATE_ID) REFERENCES gr6DateTime(DT_ID),
  12.         FOREIGN KEY (ADDRESS_ID) REFERENCES gr6DeliveryAddress(DA_ID) ,
  13.  
  14.         PRIMARY KEY (ID)
  15. );
  16.  
  17. create table gr6Product(
  18.         NAME    VARCHAR(255)    NOT NULL ,
  19.         PRODUCT_ID      INT     NOT NULL ,
  20.         TYPE    VARCHAR(127)    NOT NULL ,
  21.         PRICE   DECIMAL(19, 4)  NOT NULL,
  22.         STOCK   INT     NOT NULL ,
  23.  
  24.         PRIMARY KEY (PRODUCT_ID)
  25. );
  26.  
  27. create table gr6DateTime(
  28.         DT_ID   INT     NOT NULL ,
  29.         SEASON  VARCHAR(23) ,
  30.         SELL_DATE DATE NOT NULL ,
  31.         SELL_TIME TIME ,
  32.  
  33.         PRIMARY KEY (DT_ID)
  34. );
  35.  
  36. create table gr6DeliveryAddress(
  37.         DA_ID   INT     NOT NULL ,
  38.         CITY    VARCHAR(255)    NOT NULL ,
  39.         COUNTRY VARCHAR(255)    NOT NULL ,
  40.         ADDRESS VARCHAR(255)    NOT NULL ,
  41.         POSTAL_CODE INT NOT NULL ,
  42.  
  43.         PRIMARY KEY (DA_ID)
  44. );
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top