WebSphere Commerce database table: TRADING

Each row in this table represents a TradingAgreement.

Column Descriptions
Column Name Column Type Description
TRADING_ID BIGINT NOT NULL The TradingAgreement ID. This is a primary key. A TradingAgreement object can be shared by more than one trading mechanism, such as between an RFQ and a contract.
TRDTYPE_ID INTEGER NOT NULL Foreign key to the TRDTYPE table.
ACCOUNT_ID BIGINT Account associated with this trading agreement. There is no foreign key to the account table to prevent deadlock for the Database Cleanup utility.
STATE INTEGER NOT NULL DEFAULT 0 The status of the TradingAgreement as follows:
0 = inactive
1 = active
During negotiation, this flag must be set to inactive. When a one-time order from an RFQ is completed, this flag should be marked inactive.
MARKFORDELETE INTEGER NOT NULL DEFAULT 0 Indicates if this TradingAgreement has been marked for deletion:
0 = no
1 = yes and this TradingAgreement has been marked for deletion
REFERENCECOUNT INTEGER NOT NULL DEFAULT 0 Number of trading mechanisms associated with this TradingAgreement.
STARTTIME TIMESTAMP Start time for the TradingAgreement. If null, the TradingAgreement starts immediately.
ENDTIME TIMESTAMP End time for the TradingAgreement. If null, the TradingAgreement has no end time.
CREDITALLOWED INTEGER NOT NULL DEFAULT 0 This column indicates whether or not credit is allowed:
0 = no
1 = yes
REFTRADING_ID BIGINT This trading agreement refers to the contract identified by this trading ID. It should be identified by the FAMILY_ID of the contract.
OPTCOUNTER SMALLINT Reserved for IBM internal use.

Indexes
Index Name Indexed Column Names Index Type
SQL060903235303110 TRADING_ID Primary Key
I0000815 TRDTYPE_ID Non-Unique Index

Constraints
Constraint Name Column Names Foreign Table Name Foreign Column Names Constraint Type
F_866 TRDTYPE_ID TRDTYPE TRDTYPE_ID Cascade

Constraint Name Referenced Column Name Foreign Table Name Foreign Column Names Constraint Type
F_22 ACCOUNT_ID ACCOUNT TRADING_ID Cascade
F_190 TRADING_ID CATENCALCD TRADING_ID Cascade
F_209 TRADING_ID CATGPCALCD TRADING_ID Cascade
F_252 CONTRACT_ID CONTRACT TRADING_ID Cascade
F_498 TRADING_ID ORDERITEMS TRADING_ID Cascade
F_530 TRADING_ID ORDITRD TRADING_ID Cascade
F_539 TRADING_ID ORDPAYMTHD TRADING_ID Cascade
F_931 TRADING_ID ORDQUOTREL TRADING_ID Cascade
F_559 TRADING_ID PARTICIPNT TRADING_ID Cascade
F_666 ACCOUNT_ID REFUNDMTHD TRADING_ID Cascade
F_674 RFQ_ID RFQ TRADING_ID Cascade
F_683 RFQRSP_ID RFQRSP TRADING_ID Cascade
F_696 TRADING_ID RMA TRADING_ID Cascade
F_929 TRADING_ID SHPMODCLCD TRADING_ID Cascade
F_924 TRADING_ID TCATTR TRADING_ID Cascade
F_834 TRADING_ID TERMCOND TRADING_ID Cascade
F_867 TRADING_ID TRDATTACH TRADING_ID Cascade
F_872 TRADING_ID TRDDEPAMT TRADING_ID Cascade
F_874 TRADING_ID TRDDESC TRADING_ID Cascade
F_878 TRADING_ID TRDPURAMT TRADING_ID Cascade
F_882 TRADING_ID TRDREFAMT TRADING_ID Cascade