Professional Documents
Culture Documents
Create DB Objects Using GUI Assignment I
Create DB Objects Using GUI Assignment I
Create DB Objects Using GUI Assignment I
Create the 3 tables, Primary Keys (PK) and Foreign keys (KF) based on the columns
provided.
Create a Check constraint on COMMISSION column so that the values are as follows
For Peel the commission is not > .12,
Motika the commission is not > .11,
Create a check constraint on Odate column so that the values are not greater than
current date in Orders table.
Insert the data as is because this will be used in the future assignments.
SALESPEOPLE TABLE
SNUM
SNAME
CITY
COMMISSION
1001
Peel
London
.12
1002
Serres
San Jose
1004
Motika
London
.11
1007
Rafkin
Barcelona
.15
1003
Axelrod
New York
.10
.13
CUSTOMERS TABLE
CNUM
CNAME
CITY
2001
Hoffman
London
2002
Giovanne
Rome
RATING
100
200
SNUM
1001
1003
2003
Liu
San Jose
300
2004
Grass
Brelin
2006
Clemens
London
300
1007
2007
Pereira
Rome
100
1004
100
1002
1002
ORDERS TABLE
ONUM AMT
ODATE
CNUM
SNUM
3001
18.69
03-OCT-94
2007
1007
3003
767.19
03-OCT-94
2001
1001
3002
1900.10
03-OCT-94
2007
1004
3005
5160.45
03-OCT-94
2003
1002
3006
1098.16
04-OCT-94
2007
1007
3009
1713.23
04-OCT-94
2002
1003
3007
75.75
05-OCT-94
2004
1002
3008
4723.00
05-OCT-94
2006
1001
3010
1309.95
06-OCT-94
2004
1002
3011
9891.88
06-OCT-94
2006
1001