PX_USAGE

This table contains statistics about promotion usage.

Column Descriptions:

NameTypeDescription
PX_USAGE_IDBIGINT NOT NULLPrimary key of this table.
ORDERS_IDBIGINT NOT NULLForeign key to the ORDERS table. This lists the orders to which this promotion was applied.
USERS_IDBIGINTThe ID of the customer to whom the promotion is applied.
STOREENT_IDINTEGER NOT NULLForeign key to the STORENT table. When combined with the values in the NAME and VERSION columns, this identifies the promotion that is being applied.
VERSIONINTEGER NOT NULLThe version number of this promotion.
GUESTIDVARCHAR (64)Contains the string token that identifies a customer if they are a guest customer. For example, an email address.
NAMEVARCHAR (128) NOT NULLThe name of the promotion.
OPTCOUNTERSMALLINTThe optimistic concurrency control counter for the table. Every time there is an update to the table, the counter is incremented.

Indexes:

NameColumn NamesType
<SYSTEM-GENERATED>PX_USAGE_IDPrimary Key
I0000392STOREENT_ID+NAME+VERSIONNon-Unique Index
I0000393GUESTIDNon-Unique Index
I0000407USERS_IDNon-Unique Index
I0000408ORDERS_IDNon-Unique Index
I0000409STOREENT_IDNon-Unique Index

Constrained By Parent Tables:

ConstraintColumnsParent TableParent ColumnsType
F_1055USERS_IDUSERSUSERS_IDCascade
F_1056STOREENT_IDSTOREENTSTOREENT_IDCascade
F_1057ORDERS_IDORDERSORDERS_IDCascade