Description
noneTable properties
| name | value |
|---|
| name | items |
| created | 5/3/2009 12:00:00 AM |
| row count | 67 |
| Maximum size of a single row | 2,063 bytes |
Columns
| column | datatype | length | bytes | default | nulls | PK | FK | UQ | computed | comment |
|---|
| item_num | smallint | | 2 | | yes
| composite PK
| |
|
| |
| order_num | integer | | 4 | | yes
| composite PK
| orders.order_num
|
|
| |
| stock_num | smallint | | 2 | | no
|
| composite FK to stock.stock_num
|
|
| |
| manu_code | char | | 3 | | no
|
| composite FK to stock.manu_code
|
|
| |
| quantity | smallint | | 2 | | yes
|
| |
|
| |
| total_price | money | | 2050 | | yes
|
| |
|
| |
Indexes
| name | description | column | comment |
|---|
| 104_10 | non-clustered index | item_num, order_num |
|
| 104_11 | non-clustered index | order_num |
|
| 104_12 | non-clustered index | stock_num, manu_code |
|
References
Foreign key graph
Foreign keys
| name | column | comment |
|---|
| r104_11 | order_num | |
| r104_12 | stock_num | |
| r104_12 | manu_code | |
Check constraints
| name | column | comment |
|---|
c104_15(quantity >= 1 ) | quantity
| |
Sample rows
| item_num | order_num | stock_num | manu_code | quantity | total_price |
|---|
| 1
| 1001
| 1
| HRO
| 1
| 250
|
| 1
| 1002
| 4
| HSK
| 1
| 960
|
| 2
| 1002
| 3
| HSK
| 1
| 240
|
| 1
| 1003
| 9
| ANZ
| 1
| 20
|
| 2
| 1003
| 8
| ANZ
| 1
| 840
|
| 3
| 1003
| 5
| ANZ
| 5
| 99
|
| 1
| 1004
| 1
| HRO
| 1
| 250
|
| 2
| 1004
| 2
| HRO
| 1
| 126
|
| 3
| 1004
| 3
| HSK
| 1
| 240
|
| 4
| 1004
| 1
| HSK
| 1
| 800
|
Code
create table "informix".items
(
item_num smallint,
order_num integer,
stock_num smallint not null ,
manu_code char(3) not null ,
quantity smallint,
total_price money(8,2),
check (quantity >= 1 ),
primary key (item_num,order_num)
);
revoke all on "informix".items from "public" as "informix";
alter table "informix".items add constraint (foreign key (order_num)
references "informix".orders );
alter table "informix".items add constraint (foreign key (stock_num,
manu_code) references "informix".stock );