SQL/MX Data Mining Guide
Creating the Data Mining Database
HP NonStop SQL/MX Data Mining Guide—523737-001
A-3
NO DEFAULT
NOT NULL NOT DROPPABLE
,status CHAR (10)
NO DEFAULT
NOT NULL NOT DROPPABLE
,cust_limit NUMERIC (9,2)
NO DEFAULT
NOT NULL NOT DROPPABLE
,balance NUMERIC (9,2)
NO DEFAULT
NOT NULL NOT DROPPABLE
,payment NUMERIC (9,2)
NO DEFAULT
NOT NULL NOT DROPPABLE
,finance_charge NUMERIC (9,2)
NO DEFAULT
NOT NULL NOT DROPPABLE
,PRIMARY KEY (account, year_month)
)
LOCATION $P2
PARTITION (ADD FIRST KEY 3000000 LOCATION $VOLUME,
ADD FIRST KEY 5000000 LOCATION $P1);
-- Set constraint on status column; must be Open,
-- Delinquent,or Closed
ALTER TABLE acct_history
ADD CONSTRAINT status_constraint
CHECK (status = 'Open' OR
status = 'Delinquent' OR
status = 'Closed');
-------------------------------------------------------------