-
Notifications
You must be signed in to change notification settings - Fork 0
/
CALISTO.sql
289 lines (270 loc) · 20.7 KB
/
CALISTO.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
--------------------------------------------------------
-- File created - Saturday-July-23-2022
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Table CUSTOMER
--------------------------------------------------------
CREATE TABLE "CALISTO"."CUSTOMER"
( "CUSTOMERID" NUMBER(10,0),
"CUSTOMERNAME" VARCHAR2(100 BYTE),
"CUSTOMEREMAIL" VARCHAR2(100 BYTE),
"CUSTOMERUSERNAME" VARCHAR2(100 BYTE),
"CUSTOMERPASSWORD" VARCHAR2(100 BYTE),
"CUSTOMERPHONE" NUMBER(20,0),
"CUSTOMERADDRESS" VARCHAR2(100 BYTE),
"ROLES" VARCHAR2(20 BYTE)
) SEGMENT CREATION IMMEDIATE
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" ;
--------------------------------------------------------
-- DDL for Table ORDERPRODUCT
--------------------------------------------------------
CREATE TABLE "CALISTO"."ORDERPRODUCT"
( "ORDERID" NUMBER(10,0),
"PRODUCTID" NUMBER(10,0),
"ORDERPRODUCTQUANTITY" NUMBER(10,0),
"ORDERPRODUCTPRICE" NUMBER(10,0)
) SEGMENT CREATION IMMEDIATE
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" ;
--------------------------------------------------------
-- DDL for Table ORDERS
--------------------------------------------------------
CREATE TABLE "CALISTO"."ORDERS"
( "ORDERID" NUMBER(10,0),
"ORDERSTATUS" VARCHAR2(50 BYTE),
"TOTALORDERPRICE" NUMBER(20,0),
"CUSTOMERID" NUMBER(10,0),
"STAFFID" NUMBER(10,0)
) SEGMENT CREATION IMMEDIATE
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" ;
--------------------------------------------------------
-- DDL for Table PRODUCT
--------------------------------------------------------
CREATE TABLE "CALISTO"."PRODUCT"
( "PRODUCTID" NUMBER(10,0),
"PRODUCTNAME" VARCHAR2(100 BYTE),
"PRODUCTPRICE" NUMBER(10,2),
"PRODUCTIMAGE" BLOB
) SEGMENT CREATION IMMEDIATE
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"
LOB ("PRODUCTIMAGE") STORE AS BASICFILE (
TABLESPACE "SYSTEM" ENABLE STORAGE IN ROW CHUNK 8192 RETENTION
NOCACHE 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)) ;
--------------------------------------------------------
-- DDL for Table STAFF
--------------------------------------------------------
CREATE TABLE "CALISTO"."STAFF"
( "STAFFID" NUMBER(10,0),
"STAFFNAME" VARCHAR2(100 BYTE),
"STAFFEMAIL" VARCHAR2(100 BYTE),
"STAFFUSERNAME" VARCHAR2(100 BYTE),
"STAFFPASSWORD" VARCHAR2(100 BYTE),
"STAFFPHONE" NUMBER(20,0),
"STAFFADDRESS" VARCHAR2(100 BYTE),
"MANAGERID" NUMBER(10,0),
"STAFFROLES" VARCHAR2(20 BYTE)
) SEGMENT CREATION IMMEDIATE
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 CALISTO.CUSTOMER
SET DEFINE OFF;
Insert into CALISTO.CUSTOMER (CUSTOMERID,CUSTOMERNAME,CUSTOMEREMAIL,CUSTOMERUSERNAME,CUSTOMERPASSWORD,CUSTOMERPHONE,CUSTOMERADDRESS,ROLES) values (1001,'test1','test1@email','test01','1234',1123456781,'Arau, Perlis','customer');
Insert into CALISTO.CUSTOMER (CUSTOMERID,CUSTOMERNAME,CUSTOMEREMAIL,CUSTOMERUSERNAME,CUSTOMERPASSWORD,CUSTOMERPHONE,CUSTOMERADDRESS,ROLES) values (1002,'Alya Razak','alyaRazak@email','alyaRazak','1234',112345672,'Taman Puchong Utama, 47100 Puchong, Selangor','customer');
Insert into CALISTO.CUSTOMER (CUSTOMERID,CUSTOMERNAME,CUSTOMEREMAIL,CUSTOMERUSERNAME,CUSTOMERPASSWORD,CUSTOMERPHONE,CUSTOMERADDRESS,ROLES) values (1003,'test3','test3@email','test03','1234',112345683,'Kajang, Selangor','customer');
Insert into CALISTO.CUSTOMER (CUSTOMERID,CUSTOMERNAME,CUSTOMEREMAIL,CUSTOMERUSERNAME,CUSTOMERPASSWORD,CUSTOMERPHONE,CUSTOMERADDRESS,ROLES) values (1004,'test4','test4@email','test04','1234',112345684,'Kuching, Sarawak','customer');
Insert into CALISTO.CUSTOMER (CUSTOMERID,CUSTOMERNAME,CUSTOMEREMAIL,CUSTOMERUSERNAME,CUSTOMERPASSWORD,CUSTOMERPHONE,CUSTOMERADDRESS,ROLES) values (1005,'test5','test5@email','test05','1234',112345685,'Ipoh, Perak','customer');
Insert into CALISTO.CUSTOMER (CUSTOMERID,CUSTOMERNAME,CUSTOMEREMAIL,CUSTOMERUSERNAME,CUSTOMERPASSWORD,CUSTOMERPHONE,CUSTOMERADDRESS,ROLES) values (1010,'Amalia Ariffin','amalia@email.com','Amalia98','1234',114567893,'Semenyih, Selangor','customer');
Insert into CALISTO.CUSTOMER (CUSTOMERID,CUSTOMERNAME,CUSTOMEREMAIL,CUSTOMERUSERNAME,CUSTOMERPASSWORD,CUSTOMERPHONE,CUSTOMERADDRESS,ROLES) values (1009,'test7','test7@email','test07','1234',114567892,'Sabah','customer');
Insert into CALISTO.CUSTOMER (CUSTOMERID,CUSTOMERNAME,CUSTOMEREMAIL,CUSTOMERUSERNAME,CUSTOMERPASSWORD,CUSTOMERPHONE,CUSTOMERADDRESS,ROLES) values (1011,'Wan Nurul Atiqah','doubleunai@email','doubleunai','1234',115678912,'Perak','customer');
Insert into CALISTO.CUSTOMER (CUSTOMERID,CUSTOMERNAME,CUSTOMEREMAIL,CUSTOMERUSERNAME,CUSTOMERPASSWORD,CUSTOMERPHONE,CUSTOMERADDRESS,ROLES) values (1013,'Awang','abu@gmail.com','abu','123456',1234,'Alor Gajah','customer');
REM INSERTING into CALISTO.ORDERPRODUCT
SET DEFINE OFF;
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (100,901,2,110);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (99,901,1,55);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (99,902,2,118);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (100,902,1,59);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (101,902,1,59);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (101,903,2,110);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (113,902,1,59);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (118,901,2,110);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (107,902,1,59);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (115,903,1,55);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (113,901,1,55);
Insert into CALISTO.ORDERPRODUCT (ORDERID,PRODUCTID,ORDERPRODUCTQUANTITY,ORDERPRODUCTPRICE) values (115,904,1,59);
REM INSERTING into CALISTO.ORDERS
SET DEFINE OFF;
Insert into CALISTO.ORDERS (ORDERID,ORDERSTATUS,TOTALORDERPRICE,CUSTOMERID,STAFFID) values (99,'Pending',183,1001,504);
Insert into CALISTO.ORDERS (ORDERID,ORDERSTATUS,TOTALORDERPRICE,CUSTOMERID,STAFFID) values (100,'Processing',179,1003,501);
Insert into CALISTO.ORDERS (ORDERID,ORDERSTATUS,TOTALORDERPRICE,CUSTOMERID,STAFFID) values (101,'Pending',179,1002,null);
Insert into CALISTO.ORDERS (ORDERID,ORDERSTATUS,TOTALORDERPRICE,CUSTOMERID,STAFFID) values (113,'Delivered',124,1009,504);
Insert into CALISTO.ORDERS (ORDERID,ORDERSTATUS,TOTALORDERPRICE,CUSTOMERID,STAFFID) values (107,'Processing',69,1009,503);
Insert into CALISTO.ORDERS (ORDERID,ORDERSTATUS,TOTALORDERPRICE,CUSTOMERID,STAFFID) values (118,'Processing',120,1011,510);
Insert into CALISTO.ORDERS (ORDERID,ORDERSTATUS,TOTALORDERPRICE,CUSTOMERID,STAFFID) values (115,'Delivered',124,1009,510);
REM INSERTING into CALISTO.PRODUCT
SET DEFINE OFF;
Insert into CALISTO.PRODUCT (PRODUCTID,PRODUCTNAME,PRODUCTPRICE) values (901,'Seri Pagi [Free Size Men/Women]',55);
Insert into CALISTO.PRODUCT (PRODUCTID,PRODUCTNAME,PRODUCTPRICE) values (902,'Teluki [XL Women]',59);
Insert into CALISTO.PRODUCT (PRODUCTID,PRODUCTNAME,PRODUCTPRICE) values (903,'Melur [L Men]',55);
Insert into CALISTO.PRODUCT (PRODUCTID,PRODUCTNAME,PRODUCTPRICE) values (904,'Kasturi [XL Men]',59);
Insert into CALISTO.PRODUCT (PRODUCTID,PRODUCTNAME,PRODUCTPRICE) values (905,'Baju Derhaka',10);
REM INSERTING into CALISTO.STAFF
SET DEFINE OFF;
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (501,'Izzati Apandi','izzati@admin','izzati12','1234',114567891,'Jalan Sultan Mahmud, Lorong 3, 20400 Kuala Terengganu, Terengganu',null,'manager');
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (504,'Staff3','staff3@admin','Staff03','1234',114567893,'Temerloh, Pahang',501,'staff');
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (503,'Siti Aisyah','aisyahS@admin','aisyahS10','1234',114567892,'No 3, Jalan Jambu, Meru 42200 Kapar, Selangor',504,'staff');
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (505,'Staff4','Staff4@admin','Staff04','1234',114567894,'Muar, Johor',504,'staff');
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (512,'Staff2','Staff2@admin','Staff02','1234',112345677,'Selangor',501,'staff');
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (510,'Atia ','atia@admin','atia05','1234',115678912,'Perak',501,'staff');
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (511,'Staff5','Staff5@admin','Staff05','1234',112345688,'Temerloh, Pahang',501,'staff');
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (513,'Staff01','Staff1@email','Staff01','1234',112345688,'Kelantan',501,'staff');
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (514,'test11','admin01@email.com','salesman','1234',112345677,'Pahang',513,'staff');
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (515,'Awang','awang@gmail.com','awang','1234',1234,'Pulau Tawar, Pahang',501,'staff');
Insert into CALISTO.STAFF (STAFFID,STAFFNAME,STAFFEMAIL,STAFFUSERNAME,STAFFPASSWORD,STAFFPHONE,STAFFADDRESS,MANAGERID,STAFFROLES) values (516,'Deris','deris@gmail.com','deris','1234',1234,'Pulau Derhaka, Pahang',501,'staff');
--------------------------------------------------------
-- DDL for Index CUSTOMERID_PK
--------------------------------------------------------
CREATE UNIQUE INDEX "CALISTO"."CUSTOMERID_PK" ON "CALISTO"."CUSTOMER" ("CUSTOMERID")
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" ;
--------------------------------------------------------
-- DDL for Index CUSTOMEREMAIL_UK
--------------------------------------------------------
CREATE UNIQUE INDEX "CALISTO"."CUSTOMEREMAIL_UK" ON "CALISTO"."CUSTOMER" ("CUSTOMEREMAIL")
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" ;
--------------------------------------------------------
-- DDL for Index ORDERID_PK
--------------------------------------------------------
CREATE UNIQUE INDEX "CALISTO"."ORDERID_PK" ON "CALISTO"."ORDERS" ("ORDERID")
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" ;
--------------------------------------------------------
-- DDL for Index PRODUCTID_PK
--------------------------------------------------------
CREATE UNIQUE INDEX "CALISTO"."PRODUCTID_PK" ON "CALISTO"."PRODUCT" ("PRODUCTID")
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" ;
--------------------------------------------------------
-- DDL for Index STAFFID_PK
--------------------------------------------------------
CREATE UNIQUE INDEX "CALISTO"."STAFFID_PK" ON "CALISTO"."STAFF" ("STAFFID")
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" ;
--------------------------------------------------------
-- DDL for Index STAFFEMAIL_UK
--------------------------------------------------------
CREATE UNIQUE INDEX "CALISTO"."STAFFEMAIL_UK" ON "CALISTO"."STAFF" ("STAFFEMAIL")
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 CUSTOMER
--------------------------------------------------------
ALTER TABLE "CALISTO"."CUSTOMER" ADD CONSTRAINT "CUSTOMEREMAIL_UK" UNIQUE ("CUSTOMEREMAIL")
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 "CALISTO"."CUSTOMER" ADD CONSTRAINT "CUSTOMERID_PK" PRIMARY KEY ("CUSTOMERID")
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 "CALISTO"."CUSTOMER" ADD CONSTRAINT "ROLES_NN" CHECK (roles IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."CUSTOMER" ADD CONSTRAINT "CUSTOMERADDRESS_NN" CHECK (customeraddress IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."CUSTOMER" ADD CONSTRAINT "CUSTOMERPHONE_NN" CHECK (customerphone IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."CUSTOMER" ADD CONSTRAINT "CUSTOMERPASSWORD_NN" CHECK (customerpassword IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."CUSTOMER" ADD CONSTRAINT "CUSTOMERUSERNAME_NN" CHECK (customerusername IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."CUSTOMER" ADD CONSTRAINT "CUSTOMEREMAIL_NN" CHECK (customeremail IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."CUSTOMER" ADD CONSTRAINT "CUSTOMERNAME_NN" CHECK (customername IS NOT NULL) ENABLE;
--------------------------------------------------------
-- Constraints for Table ORDERPRODUCT
--------------------------------------------------------
ALTER TABLE "CALISTO"."ORDERPRODUCT" ADD CONSTRAINT "ORDERPRODUCTPRICE_NN3" CHECK (orderproductprice IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."ORDERPRODUCT" ADD CONSTRAINT "ORDERPRODUCTQUANTITY_NN2" CHECK (orderproductquantity IS NOT NULL) ENABLE;
--------------------------------------------------------
-- Constraints for Table ORDERS
--------------------------------------------------------
ALTER TABLE "CALISTO"."ORDERS" ADD CONSTRAINT "ORDERID_PK" PRIMARY KEY ("ORDERID")
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 "CALISTO"."ORDERS" ADD CONSTRAINT "TOTALORDERPRICE_NN" CHECK (totalorderprice IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."ORDERS" ADD CONSTRAINT "ORDERSTATUS_NN" CHECK (orderstatus IS NOT NULL) ENABLE;
--------------------------------------------------------
-- Constraints for Table PRODUCT
--------------------------------------------------------
ALTER TABLE "CALISTO"."PRODUCT" ADD CONSTRAINT "PRODUCTID_PK" PRIMARY KEY ("PRODUCTID")
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 "CALISTO"."PRODUCT" ADD CONSTRAINT "PRODUCTIMAGE_NN" CHECK (productimage IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."PRODUCT" ADD CONSTRAINT "PRODUCTPRICE_NN" CHECK (productimage IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."PRODUCT" ADD CONSTRAINT "PRODUCTNAME_NN" CHECK (productname IS NOT NULL) ENABLE;
--------------------------------------------------------
-- Constraints for Table STAFF
--------------------------------------------------------
ALTER TABLE "CALISTO"."STAFF" ADD CONSTRAINT "STAFFEMAIL_UK" UNIQUE ("STAFFEMAIL")
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 "CALISTO"."STAFF" ADD CONSTRAINT "STAFFID_PK" PRIMARY KEY ("STAFFID")
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 "CALISTO"."STAFF" ADD CONSTRAINT "STAFFROLES_NN" CHECK (staffroles IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."STAFF" ADD CONSTRAINT "STAFFADDRESS_NN" CHECK (staffaddress IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."STAFF" ADD CONSTRAINT "STAFFPHONE_NN" CHECK (staffphone IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."STAFF" ADD CONSTRAINT "STAFFPASSWORD_NN" CHECK (staffpassword IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."STAFF" ADD CONSTRAINT "STAFFUSERNAME_NN" CHECK (staffusername IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."STAFF" ADD CONSTRAINT "STAFFEMAIL_NN" CHECK (staffemail IS NOT NULL) ENABLE;
ALTER TABLE "CALISTO"."STAFF" ADD CONSTRAINT "STAFFNAME_NN" CHECK (staffname IS NOT NULL) ENABLE;
--------------------------------------------------------
-- Ref Constraints for Table ORDERPRODUCT
--------------------------------------------------------
ALTER TABLE "CALISTO"."ORDERPRODUCT" ADD CONSTRAINT "ORDERID_FK2" FOREIGN KEY ("ORDERID")
REFERENCES "CALISTO"."ORDERS" ("ORDERID") ENABLE;
ALTER TABLE "CALISTO"."ORDERPRODUCT" ADD CONSTRAINT "PRODUCTID_FK1" FOREIGN KEY ("PRODUCTID")
REFERENCES "CALISTO"."PRODUCT" ("PRODUCTID") ENABLE;
--------------------------------------------------------
-- Ref Constraints for Table ORDERS
--------------------------------------------------------
ALTER TABLE "CALISTO"."ORDERS" ADD CONSTRAINT "CUSTOMERID_FK" FOREIGN KEY ("CUSTOMERID")
REFERENCES "CALISTO"."CUSTOMER" ("CUSTOMERID") ENABLE;
ALTER TABLE "CALISTO"."ORDERS" ADD CONSTRAINT "STAFFID_FK" FOREIGN KEY ("STAFFID")
REFERENCES "CALISTO"."STAFF" ("STAFFID") ENABLE;
--------------------------------------------------------
-- Ref Constraints for Table STAFF
--------------------------------------------------------
ALTER TABLE "CALISTO"."STAFF" ADD CONSTRAINT "MANAGERID_FK" FOREIGN KEY ("MANAGERID")
REFERENCES "CALISTO"."STAFF" ("STAFFID") ENABLE;