--------------------------------------------------------
--  File created - Monday-February-05-2018   
--------------------------------------------------------
--------------------------------------------------------
--  DDL for Table ORDERITEM
--------------------------------------------------------

  CREATE TABLE "SYSTEM"."ORDERITEM" 
   (	"ORDERITEM_ID" NUMBER(10,0), 
	"NAME" VARCHAR2(45 BYTE), 
	"PRICE" NUMBER(10,2), 
	"QUANTITY" NUMBER(10,0), 
	"CATEGORY_ID" NUMBER(10,0), 
	"SUBCATEGORY_ID" NUMBER(10,0), 
	"ORDER_ID" NUMBER(20,0), 
	"PRODUCT_ID" NUMBER(10,0)
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM" ;
REM INSERTING into SYSTEM.ORDERITEM
SET DEFINE OFF;
Insert into SYSTEM.ORDERITEM (ORDERITEM_ID,NAME,PRICE,QUANTITY,CATEGORY_ID,SUBCATEGORY_ID,ORDER_ID,PRODUCT_ID) values (2019,'Immortals of Meluha - Secret of Nagas',135,1,1000126,1000101,12188842071573416,122);
Insert into SYSTEM.ORDERITEM (ORDERITEM_ID,NAME,PRICE,QUANTITY,CATEGORY_ID,SUBCATEGORY_ID,ORDER_ID,PRODUCT_ID) values (2020,'Immortals of Meluha - Secret of Nagas',135,1,1000126,1000101,12188842074932864,122);
Insert into SYSTEM.ORDERITEM (ORDERITEM_ID,NAME,PRICE,QUANTITY,CATEGORY_ID,SUBCATEGORY_ID,ORDER_ID,PRODUCT_ID) values (2021,'Immortals of Meluha - Secret of Nagas',135,1,1000126,1000101,12188842075308552,122);
Insert into SYSTEM.ORDERITEM (ORDERITEM_ID,NAME,PRICE,QUANTITY,CATEGORY_ID,SUBCATEGORY_ID,ORDER_ID,PRODUCT_ID) values (2022,'World of Warcraft - Rise of the Horde',450,1,1000126,1000101,12188842077844144,124);
Insert into SYSTEM.ORDERITEM (ORDERITEM_ID,NAME,PRICE,QUANTITY,CATEGORY_ID,SUBCATEGORY_ID,ORDER_ID,PRODUCT_ID) values (2023,'Sony Xperia M2 Silver',45000,1,1000125,1000115,12188842080499328,112);
Insert into SYSTEM.ORDERITEM (ORDERITEM_ID,NAME,PRICE,QUANTITY,CATEGORY_ID,SUBCATEGORY_ID,ORDER_ID,PRODUCT_ID) values (2024,'Immortals of Meluha - Oath of Vayuputras',135,1,1000126,1000101,20180202122640,123);
Insert into SYSTEM.ORDERITEM (ORDERITEM_ID,NAME,PRICE,QUANTITY,CATEGORY_ID,SUBCATEGORY_ID,ORDER_ID,PRODUCT_ID) values (2017,'iPhone 5 32GB',45000,1,1000125,1000100,12188841454681640,104);
Insert into SYSTEM.ORDERITEM (ORDERITEM_ID,NAME,PRICE,QUANTITY,CATEGORY_ID,SUBCATEGORY_ID,ORDER_ID,PRODUCT_ID) values (2018,'iPhone 5 32GB',45000,1,1000125,1000100,12188841454934112,104);
--------------------------------------------------------
--  DDL for Index PK_ORDERITEMID
--------------------------------------------------------

  CREATE UNIQUE INDEX "SYSTEM"."PK_ORDERITEMID" ON "SYSTEM"."ORDERITEM" ("ORDERITEM_ID") 
  PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM" ;
--------------------------------------------------------
--  Constraints for Table ORDERITEM
--------------------------------------------------------

  ALTER TABLE "SYSTEM"."ORDERITEM" ADD CONSTRAINT "PK_ORDERITEMID" PRIMARY KEY ("ORDERITEM_ID")
  USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS 
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
  TABLESPACE "SYSTEM"  ENABLE;
  ALTER TABLE "SYSTEM"."ORDERITEM" MODIFY ("PRODUCT_ID" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERITEM" MODIFY ("ORDER_ID" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERITEM" MODIFY ("SUBCATEGORY_ID" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERITEM" MODIFY ("CATEGORY_ID" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERITEM" MODIFY ("QUANTITY" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERITEM" MODIFY ("PRICE" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERITEM" MODIFY ("NAME" NOT NULL ENABLE);
  ALTER TABLE "SYSTEM"."ORDERITEM" MODIFY ("ORDERITEM_ID" NOT NULL ENABLE);
