BEA Logo BEA WLCS Release 3.5

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WLCS Documentation   |   Order Processing   |   Previous Topic   |   Next Topic   |   Contents   |   Index

The Order Processing Database Schema

 

This topic describes the database schema for Managing Purchases and Processing Orders services. Understanding this schema will be helpful to those who may be customizing or extending the technologies provided in the product.

This topic includes the following sections:

 


The Entity-Relation Diagram

Figure 10-1 shows the logical Entity-Relation diagram for the WebLogic Commerce Server order and discount tables in the Commerce database. See the subsequent sections in this chapter for information about the data type syntax.

Figure 10-1 Entity-Relation Diagram for the Order and Discount Tables


 
 
 
 
 
 

Explanations for the columns in each table are provided in the remainder of this topic.

 


List of Tables Comprising the Order Processing Schema


 

The WebLogic Commerce Server order management system is comprised of the following tables:

 


The Order Processing Data Dictionary

In this section, the schema tables are arranged alphabetically as a data dictionary.

Note: Even though the following documentation references "foreign keys" to various tables, these constraints do not currently exist in this release of WebLogic Commerce Server. However, they will be in place in future versions of WebLogic Commerce Server and we want you to be aware of these relationships now.

The WLCS_CREDIT_CARD Database Table

Table 10-1 describes the metadata for the WebLogic Commerce Server WLCS_CREDIT_CARD table. This table is used to store information related to a customer's credit card(s) in the order processing database.

The Primary Key is CREDIT_CARD_ID.

Table 10-1 WLCS_CREDIT_CARD Table Metadata

Column Name

Data Type

Description and Recommendations

CREDIT_CARD_ID

NUMBER(15)

A unique identifier for the credit card. This field is the table's primary key and cannot be NULL. All other fields in the WLCS_CREDIT_CARD table can be NULL.

CC_NUMBER

VARCHAR(200)

The customer's credit card number. This is encrypted if is.encryption.
enable
is set to true
in the weblogiccommerce.
properties
file.

CC_TYPE

VARCHAR(20)

The customer's credit card type, such as VISA or MasterCard.

CC_EXP_DATE

DATE

The expiration date on the customer's credit card.

CC_NAME

VARCHAR(50)

The credit card holder's name.

CC_DISPLAY_NUMBER

VARCHAR(20)

The version of the credit card number that is displayed (all Xs except last 4-digits).

CC_COMPANY

VARCHAR(50)

The name of the credit card company.

BILLING_GEOCODE

VARCHAR(2)

The code used by the TAXWARE system to identify taxes for the order based on jurisdiction.

BILLING_STREET1

VARCHAR(30)

The first line in the customer's billing address.

BILLING_STREET2

VARCHAR(30)

The second line in the customer's billing address.

BILLING_CITY

VARCHAR(30)

The city in the customer's billing address.

BILLING_STATE

VARCHAR(40)

The state in the customer's billing address.

BILLING_COUNTRY

VARCHAR(40)

The country in the customer's billing address.

BILLING_POBOX

VARCHAR(30)

The post office box in the customer's billing address.

BILLING_COUNTY

VARCHAR(50)

The county in the customer's billing address.

BILLING_POSTAL_CODE

VARCHAR(10)

The postal (ZIP) code in the customer's billing address.

BILLING_POSTAL_CODE_TYPE

VARCHAR(10)

Format or type of postal code, generally determined by country (such as ZIP code in the United States).

CUSTOMER_ID

VARCHAR(20)

A unique identifier for the customer.

MAP_KEY

VARCHAR(20)

Key that maps multiple credit cards with a single customer.


 

The WLCS_COUNTRY Database Table

Table 10-2 describes the metadata for the WebLogic Commerce Server WLCS_COUNTRY table. This is a reference table and contains pertinent information regarding each country around the world.

The primary key is COUNTRY_ID.

This table holds infomation that pertains to all of the various currencies used throughout the world.

Note: The WLCS_COUNTRY feature has not been implemented at this time and, therefore, this table is not being used/populated.

Table 10-2 WLCS_COUNTRY Table Metadata

Column Name

Data Type

Description and Recommendations

COUNTRY_ID

VARCHAR(3)

PK—a unique textual identifier associated with each country, such as a country code.

COUNTRY_ABBR2

VARCHAR(2)

A second textual identifier.

CURRENCY_ID

NUMERIC(3)

An ID for the form of currency used in transactions with citizens of this country.

COUNTRY_NAME

VARCHAR(50)

The formal name of the country.


 

The WLCS_CURRENCY Database Table

Table 10-3 describes the metadata for the WebLogic Commerce Server WLCS_CURRENCY table. This table holds info pertaining to all of the various currencies used throughout the world.

The primary key is CURRENCY_ID.

Note: The WLCS_CURRENCY feature has not been implemented at this time and, therefore, this table is not being used/populated.

Table 10-3 WLCS_CURRENCY Table Metadata

Column Name

Data Type

Description and Recommendations

CURRENCY_ID

NUMBER(3)

PK—a unique numeric ID.

CURRENCY_ABBR

VARCHAR(3)

A textual abbreviation for the currency.

CURRENCY_NAME

VARCHAR(50)

The name of the currency.


 

The WLCS_CUSTOMER Database Table

Table 10-4 describes the metadata for the WebLogic Commerce Server WLCS_CUSTOMER table. This table is used to store information about the customer in the order processing database.

The primary key is CUSTOMER_ID.

Table 10-4 WLCS_CUSTOMER Table Metadata

Column Name

Data Type

Description and Recommendations

CUSTOMER_ID

VARCHAR(20)

A unique identifier for the customer. This field is the table's primary key and cannot be NULL. All other fields in the WLCS_CUSTOMER table can be NULL.

CUSTOMER_TYPE

VARCHAR(20)

A label for the customer (such as preferred, standard, or business).

FIRST_NAME

VARCHAR(30)

The customer's first name.

LAST_NAME

VARCHAR(30)

The customer's last name.

MIDDLE_NAME

VARCHAR(30)

The customer's middle name.

TITLE

VARCHAR(10)

The customer's preferred title, such as Mr., Mrs., or Ms.

SUFFIX

VARCHAR(10)

The customer's preferred suffix, such as Jr.or Sr.

EMAIL

VARCHAR(80)

The customer's email address.

HOME_PHONE

VARCHAR(15)

The customer's home phone number.

BUSINESS_PHONE

VARCHAR(20)

The customer's business phone number.

FAX

VARCHAR(15)

The customer's fax number.

MAILING_GEOCODE

VARCHAR(2)

The code used by the TAXWARE system to identify taxes for the order based on jurisdiction.

MAILING_STREET1

VARCHAR(30)

The first line in the customer's street address.

MAILING_STREET2

VARCHAR(30)

The second line in the customer's street address.

MAILING_CITY

VARCHAR(30)

The city in the customer's address.

MAILING_STATE

VARCHAR(40)

The state in the customer's address.

MAILING_COUNTRY

VARCHAR(40)

The country in the customer's address.

MAILING_POBOX

VARCHAR(30)

The post office box in the customer's address.

MAILING_COUNTY

VARCHAR(50)

The county in the customer's address.

MAILING_POSTAL_CODE

VARCHAR(10)

The postal (ZIP) code in the customer's address.

MAILING_POSTAL_CODE_TYPE

VARCHAR(10)

Format or type of postal code, generally determined by country (such as ZIP code in the United States).


 

The DISCOUNT Database Table

Table 10-5 describes the metadata for the WebLogic Commerce Server DISCOUNT table. This table stores stores one or more discount records for every DISCOUNT_SET record.

The Primary Key is DISCOUNT_ID.


 

Table 10-5 DISCOUNT

Column Name

Data Type

Description and Recommendations

DISCOUNT_ID

NUMBER(15)

PK—a unique, system-generated number to be used as the record ID.

DISCOUNT_SET_ID

NUMBER(15)

FK—foreign key to the DISCOUNT_SET table.

DISCOUNT_TYPE

VARCHAR(10)

The type of discount offered. It is used for an order or for an order line item.

DISCOUNT_NAME

VARCHAR(254)

The name of the discount.

IS_GLOBAL

NUMBER(1)

A flag showing whether or not this discount can be used globally.

PRIORITY

NUMBER(3)

The level of priority this discount has over other discounts.

ALLOWED_USERS

NUMBER(10)

The number of times the discount may be used.

MODIFIER

CLOB

Describes the actual discount to be applied. This is XML.

DISCOUNT_RULE

CLOB

The method used to select items for discount. This is XML.

START_DATE

DATE

The starting date and time of the discount

END_DATE

DATE

The ending date and time of the discount.

IS_ACTIVE

NUMBER(1)

A flag that determines whether the discount is active or not. Active=1, Not active=0

DESCRIPTION

VARCHAR(254)

The discount description.

DISPLAY_DESCRIPTION

VARCHAR(254)

The discount description used for display purposes only.


 

The DISCOUNT_ASSOCIATION Database Table

Table 10-6 describes the metadata for the WebLogic Commerce Server DISCOUNT_ASSOCIATION table. This table associates each customer with a discount and maintains information regarding the times the customer has used each discount.

The primary key is DISCOUNT_ASSOCIATION_ID.


 

Table 10-6 DISCOUNT_ASSOCIATION

Column Name

Data Type

Description and Recommendations

DISCOUNT_ASSOCIATION_ID

NUMBER(15)

PK—a unique, system-generated number to be used as the record ID.

CUSTOMER_ID

NUMBER(15)

FK—foreign key to the DISCOUNT_SET table.

DISCOUNT_ID

NUMBER(15)

FK—foreign key to the DISCOUNT_SET table.

USE_COUNT

NUMBER(10)

The number of times the discount has been used.

DISPLAY_DESCRIPTION

VARCHAR(254)

The discount description used for display purposes only.


 

The DISCOUNT_SET Database Table

Table 10-7 describes the metadata for the WebLogic Commerce Server DISCOUNT_SET table. This table is used to establish a group of discounts as a set.

The primary key is DISCOUNT_SET_ID.

Table 10-7 DISCOUNT_SET

Column Name

Data Type

Description and Recommendations

DISCOUNT_SET_ID

NUMBER(15)

PK—a unique, system-generated number to be used as the record ID.

DISCOUNT_SET_NAME

VARCHAR(50)

The name of the discount set.

XML_DEFINITION

CLOB

This is XML.


 

The WLCS_ORDER Database Table

Table 10-8 describes the metadata for the WebLogic Commerce Server WLCS_ORDER table. This table is used to store information about a customer's specific order in the order processing database.

Note: The WebLogic Commerce Server product does not populate the SHIPPING_AMOUNT, SHIPPING_CURRENCY, PRICE_AMOUNT, or PRICE_CURRENCY columns.

The primary key is ORDER_ID.

Table 10-8 WLCS_ORDER Table Metadata

Column Name

Data Type

Description and Recommendations

ORDER_ID

VARCHAR(20)

A unique identifier for the order. This field is the table's primary key and cannot be NULL. All other fields in the WLCS_ORDER table can be NULL.

CUSTOMER_ID

VARCHAR(20)

A unique identifier for the customer.

TRANSACTION_ID

VARCHAR(25)

A unique identifier for the transaction.

STATUS

VARCHAR(20)

The status of the order.

ORDER_DATE

DATE

The date the order was placed.

SHIPPING_METHOD

VARCHAR(40)

The method by which the order is to be shipped.

SHIPPING_AMOUNT

NUMBER(16,4)

The shipping amount for the order.

SHIPPING_CURRENCY

VARCHAR(10)

The currency associated with the shipping amount.

PRICE_AMOUNT

NUMBER(16,4)

The price of the order.

PRICE_CURRENCY

VARCHAR(10)

The currency associated with the price.

SHIPPING_GEOGODE

VARCHAR(2)

The code used by the TAXWARE system to identify taxes for the order based on jurisdiction.

SHIPPING_STREET1

VARCHAR(30)

The first line in the customer's shipping address.

SHIPPING_STREET2

VARCHAR(30)

The second line in the customer's shipping address.

SHIPPING_CITY

VARCHAR(30)

The city in the customer's shipping address.

SHIPPING_STATE

VARCHAR(40)

The state in the customer's shipping address.

SHIPPING_COUNTRY

VARCHAR(40)

The country in the customer's shipping address.

SHIPPING_POBOX

VARCHAR(30)

The post office box in the customer's shipping address.

SHIPPING_COUNTY

VARCHAR(50)

The county in the customer's shipping address.

SHIPPING_POSTAL_CODE

VARCHAR(10)

The postal (ZIP) code in the customer's shipping address.

SHIPPING_POSTAL_CODE_TYPE

VARCHAR(10)

Format or type of postal code, generally determined by country, such as ZIP code in the United States.

SPECIAL_INSTRUCTIONS

VARCHAR(254)

Any special shipping instructions associated with the order.

SPLITTING_PREFERENCE

VARCHAR(254)

The splitting preferences for the customer's order.

ORDER_SUBTOTAL

NUMBER(16,4)

The sum of all the TOTAL_LINE_AMOUNT columns in the WLCS_ORDER_LINE table for that specific order.


 

The WLCS_ORDER_LINE Database Table

Table 10-9 describes the metadata for the WebLogic Commerce Server WLCS_ORDER_LINE table. This table is used to store information about each line of a customer's shopping cart in the order processing database.

The Primary Key isORDER_LINE_ID.

Table 10-9 WLCS_ORDER_LINE Table Metadata

Column Name

Data Type

Description and Recommendations

ORDER_LINE_ID

NUMBER(15)

A unique identifier for each line in a customer's shopping cart. This field is the table's primary key and cannot be NULL. All other fields in the WLCS_ORDERLINE table can be NULL.

QUANTITY

NUMBER(16,4)

The quantity of the item in the shopping cart.

PRODUCT_ID

VARCHAR(40)

An identification number for the item in the shopping cart.

TAX_AMOUNT

NUMBER(16,4)

The tax amount for the order.

TAX_CURRENCY

VARCHAR(10)

The currency associated with the tax amount.

SHIPPING_AMOUNT

NUMBER(16,4)

The shipping amount for the order.

SHIPPING_CURRENCY

VARCHAR(10)

The currency associated with the shipping amount.

UNIT_PRICE_AMOUNT

NUMBER(16,4)

The unit price amount for the item.

UNIT_PRICE_CURRENCY

VARCHAR(10)

The currency associated with the unit price.

MSRP_AMOUNT

NUMBER(16,4)

The MSRP amount for the item.

MSRP_CURRENCY

VARCHAR(10)

The currency associated with the MSRP amount.

DESCRIPTION

VARCHAR(255)

The name of the item that is part of the order.

ORDER_ID

VARCHAR(20)

A unique identifier for the order.

The ORDER_ADJUSTMENT Database Table

Table 10-10 describes the metadata for the WebLogic Commerce Server ORDER_ADJUSTMENT table. This table is used to maintain information about a discount taken at the order level (for example, $20.00 off any order between 1/1/01 and 1/31/01.)

The Primary Key is ORDER_ADJUSTMENT_ID.


 

Table 10-10 ORDER_ADJUSTMENT

Column Name

Data Type

Description and Recommendations

ORDER_ADJUSTMENT_ID

NUMBER(15)

PK—a unique, system-generated number to be used as the record ID.

ORDER_ID

NUMBER(15)

FK—foreign key to the DISCOUNT_SET table.

ADJUSTMENT_TYPE

NUMBER(15)

FK—foreign key to the DISCOUNT_SET table.

COMPUTATION

NUMBER(10)

The number of times the discount has been used.

ADJUSTMENT_AMOUNT

VARCHAR(254)

The discount description used for display purposes only.

DISCOUNT_ID

NUMBER(15)

FK—foreign key to the DISCOUNT table.

DISPLAY_DESCRIPTION

VARCHAR(254)

The description used for display purposes only. Depending on the nature of the discount, the DISPLAY_DESCRIPTION is generated from either the Discount service or Campaign service.

CREATION_DATE

DATE

The date and time the order adjustment was created.

MODIFIED_DATE

DATE

The date and time the order adjustment record was last modified.


 

The ORDER_LINE_ADJUSTMENT Database Table

Table 10-11 describes the metadata for the WebLogic Commerce Server ORDER_LINE_ADJUSTMENT table. This table is used to maintain information about a discount taken at the order line item level (for example, 10% off SKU "Power Drill").

The Primary Key is ORDER_LINE_ADJUSTMENT_ID.

Table 10-11 ORDER_LINE_ADJUSTMENT Table Metadata

Column Name

Data Type

Description and Recommendations

ORDER_LINE_ADJUSTMENT_ID

NUMBER(15)

PK—a unique, system-generated number to be used as the record ID.

ORDER_LINE_ID

NUMBER(15)

A unique identifier for each line in a customer's shopping cart. This field is the table's primary key and cannot be NULL. All other fields in the WLCS_ORDERLINE table can be NULL.

ADJUSTMENT_TYPE

VARCHAR(20)

The type of adjustment (credit or debit.)

ADJUSTMENT_AMOUNT

NUMBER(16,4)

The dollar amount of the adjustment.

ADJUSTMENT_QUANTITY

NUMBER(16,4)

The quantity amount for the adjustment.

ADJUSTED_UNIT_PRICE

NUMBER(16,4)

The adjusted unit price of the specific line item.

COMPUTATION

VARCHAR(254)

The computation for determining ADJUSTED_UNIT_PRICE.

CREATION_DATE

DATE

The date and time the adjustment record was created.

MODIFIED_DATE

DATE

The date and time the adjustment record was last modified.

DISCOUNT_ID

NUMBER(15)

FK—a foreign key to the discount used from the DISCOUNT table.

DISPLAY_DESCRIPTION

VARCHAR(254)

The adjustment description used for display purposes.


 

The WLCS_SAVED_ITEM_LIST Database Table

Table 10-12 describes the metadata for the WebLogic Commerce Server WLCS_SAVED_ITEM_LIST table. This table is used to store information about the customer's saved shopping cart items in the order processing database.

Table 10-12 WLCS_SAVED_ITEM_LIST Table Metadata

Column Name

Data Type

Description and Recommendations

CUSTOMER_ID

VARCHAR(20)

A unique identifier for the customer.

SKU

VARCHAR(40)

A unique identifier (the Stock Keeping Unit or SKU) for a product item.


 

The WLCS_SECURITY Database Table

Table 10-13 describes the metadata for the WebLogic Commerce Server WLCS_SECURITY table. This table is used to persist public and private keys for encryption and decryption purposes in the order processing database. This table is meant for internal use by the WebLogic Commerce Server product.

Table 10-13 WLCS_SECURITY Table Metadata

Column Name

Data Type

Description and Recommendations

ID

NUMBER(2)

A unique identifier for the key pair. This field is the table's primary key and cannot be NULL.

PUBLIC_KEY

VARCHAR(2000)

The public key to be used for encryption/decryption of credit cards.

PRIVATE_KEY

VARCHAR(2000)

The private key to be used for encryption/decryption of credit cards.


 

The WLCS_SHIPPING_ADDRESS Database Table

Table 10-14 describes the metadata for the WebLogic Commerce Server WLCS_SHIPPING_ADDRESS table. This table is used to store information related to a customer's shipping address(es) in the order processing database.

The primary key is SHIPPING_ADDRESS_ID.

Table 10-14 WLCS_SHIPPING_ADDRESS Table Metadata

Column Name

Data Type

Description and Recommendations

SHIPPING_ADDRESS_ID

NUMBER(15)

A unique identifier for the shipping address. This field is the table's primary key and cannot be NULL. All other fields in the WLCS_SHIPPING_ADDRESS table can be NULL.

CUSTOMER_ID

VARCHAR(20)

A unique identifier for the customer.

MAP_KEY

VARCHAR(30)

Key that maps multiple shipping addresses with a single customer.

SHIPPING_GEOCODE

VARCHAR(2)

The code used by the TAXWARE system to identify taxes for the order based on jurisdiction.

SHIPPING_STREET1

VARCHAR(30)

The first line in the customer's shipping address.

SHIPPING_STREET2

VARCHAR(30)

The second line in the customer's shipping address.

SHIPPING_CITY

VARCHAR(30)

The city in the customer's shipping address.

SHIPPING_STATE

VARCHAR(40)

The state in the customer's shipping address.

SHIPPING_COUNTRY

VARCHAR(40)

The country in the customer's shipping address.

SHIPPING_POBOX

VARCHAR(30)

The post office box in the customer's shipping address.

SHIPPING_COUNTY

VARCHAR(50)

The county in the customer's shipping address.

SHIPPING_POSTAL_CODE

VARCHAR(10)

The postal (zip) code in the customer's shipping address.

SHIPPING_POSTAL_CODE_TYPE

VARCHAR(10)

Format or type of postal code, generally determined by country, such as ZIP code in the United States.


 

The WLCS_SHIPPING_METHOD Database Table

Table 10-15 describes the metadata for the WebLogic Commerce Server WLCS_SHIPPING_METHOD table. This table is used to store information about the shipping method in the order processing database.

The primary key is PK_IDENTIFIER.

Table 10-15 WLCS_SHIPPING_METHOD Table Metadata

Column Name

Data Type

Description and Recommendations

PK_IDENTIFIER

VARCHAR(20)

A unique identifier for the shipping method. This field is the table's primary key and cannot be NULL. All other fields in the WLCS_SHIPPING_
METHOD
table can be NULL.

CARRIER

VARCHAR(40)

The carrier being used to ship the order, such as UPS or FedEx.

METHOD

VARCHAR(40)

The method by which the order is to be shipped, such as Air, 2nd Day Air, or Parcel Post.

AVERAGE_SHIPPING_TIME

NUMBER

The average number of days it will take the order to arrive.

PRICE_VALUE

NUMBER(16,4)

The amount it will cost to ship the order.

PRICE_CURRENCY

VARCHAR(10)

The currency associated with the PRICE_VALUE column, such as dollars, pounds, or lira.

WEIGHT_LIMIT

NUMBER(16,4)

The weight limit for the shipment.

RESTRICTIONS

VARCHAR(254)

Any restrictions associated with the shipment.

DESCRIPTION

VARCHAR(254)

A description of the shipping method, such as FedEx Overnight or Standard.

PO_BOX_ALLOWED

NUMBER

Specifies whether or not the shipment can be left at a post office box.

SIGNATURE_REQUIRED

NUMBER

Specifies whether or not a signature is required upon receipt of the shipment.

SATURDAY_DELIVERY

NUMBER

Specifies whether or not the shipment can be delivered on Saturday.

INTERNATIONAL_DELIVERY

NUMBER

Specifies whether or not international delivery is an option.

SIZE_LIMIT

NUMBER(16,4)

The size limit for the shipment.

PACKAGING_TYPE

VARCHAR(50)

The packaging type for the shipment.


 

The WLCS_TRANSACTION Database Table

Table 10-16 describes the metadata for the WebLogic Commerce Server WLCS_TRANSACTION table. This table is used to store data for every payment transaction in the order processing database.

The primary key is TRANSACTION_ID.

Table 10-16 WLCS_TRANSACTION Table Metadata

Column Name

Data Type

Description and Recommendations

TRANSACTION_ID

VARCHAR(25)

A unique identifier for the transaction. This field is the table's primary key and cannot be NULL. All other fields in the WLCS_
TRANSACTION
table can be NULL.

BATCH_ID

VARCHAR(15)

A unique identifier of a batch submitted for settlement, as returned by CyberCash. This field need not be populated for other external payment services.

TRAN_DATE

DATE

The date of the transaction (that is, date on which the transaction was first started).

TRAN_STATUS

VARCHAR(20)

The current status of the transaction (Settled, Authorized, MarkedForSettle, PendingSettle, Retry, or Settled).

TRAN_AMOUNT

NUMBER(16,4)

The most recent amount applied to the transaction. MarkForSettle amounts can be different from the authorization amount.

TRAN_CURRENCY

VARCHAR(30)

The currency of the transaction.

CC_NUMBER

VARCHAR(200)

The customer's credit card number. This is encrypted if is.encryption.enable is set to true in the weblogiccommerce.properties file.

CC_TYPE

VARCHAR(20)

The customer's credit card type, such as VISA or MasterCard.

CC_EXP_DATE

DATE

The expiration date on the customer's credit card.

CC_NAME

VARCHAR(50)

The credit card holder's name.

CC_DISPLAY_NUMBER

VARCHAR(20)

The version of the credit card number that is displayed (displays all Xs except last 4-digits).

CC_COMPANY

VARCHAR(50)

The name of the credit card company.

GEOCODE

VARCHAR(2)

The code used by the TAXWARE system to identify taxes for the order based on jurisdiction.

STREET1

VARCHAR(30)

The first line in the customer's street address.

STREET2

VARCHAR(30)

The second line in the customer's street address.

CITY

VARCHAR(30)

The city in the customer's address.

STATE

VARCHAR(40)

The state in the customer's address.

COUNTRY

VARCHAR(40)

The country in the customer's address.

POBOX

VARCHAR(30)

The post office box in the customer's address.

DESCRIPTION

VARCHAR(30)

Any additional data. Can be NULL.

COUNTY

VARCHAR(50)

The county in the customer's address.

POSTAL_CODE

VARCHAR(10)

The postal (ZIP) code in the customer's address.

POSTAL_CODE_TYPE

VARCHAR(10)

Format or type of postal code, generally determined by country, such as Zip code in the United States.


 

The WLCS_TRANSACTION_ENTRY Database Table

Table 10-17 describes the metadata for the WebLogic Commerce Server WLCS_TRANSACTION_ENTRY table. This table is used to store (log) the different states a payment transaction has passed through in the order processing database.

The primary key is TRANSACTION_ENTRY_ID.

Table 10-17 WLCS_TRANSACTION_ENTRY Table Metadata

Column Name

Data Type

Description and Recommendations

TRANSACTION_ENTRY_ID

NUMBER(25)

A unique identifier for the transaction entry. This field is the table's primary key and cannot be NULL. All other fields in the WLCS_TRANSACTION_ENTRY table can be NULL.

TRAN_ENTRY_SEQUENCE

VARCHAR(30)

Represents the running count per transaction.

TRAN_ENTRY_DATE

DATE

The date of the log entry.

TRAN_ENTRY_STATUS

VARCHAR(20)

The status of the transaction when this entry was made.

TRAN_ENTRY_AMOUNT

NUMBER(16,4)

The amount of the transaction when the log entry was made.

TRAN_ENTRY_CURRENCY

VARCHAR(30)

The currency of the transaction.

TRANSACTION_ID

VARCHAR(25)

A unique identifier for the transaction.


 

 


The SQL Scripts Used to Create the Database

The database schemas for the WebLogic Personalization Server, WebLogic Commerce Server and Campaign Manager for WebLogic are all created by executing the create_all script for the target database environment.

Cloudscape

For Cloudscape, execute one of the following:

Oracle

For Oracle, from the command line, move to the following directory:

WL_COMMERCE_HOME/db/oracle/8.1.6

After logging into SQL*Plus, simply execute the create_all.sql script, for example @create_all.

Script Name

Description

create_campaign.sql

Creates the Campaign Manager specific database objects, such as tables, indexes, and constraints.

create_common.sql

Creates the database objects which are common to WLPS and WLCS.

create_mail_ad.sql

Creates all the database objects used by the mail messaging component.

create_wlcs.sql

Creates all the database objects for WLCS, including Catalog and Order Management.

create_wlps.sql

Creates all the database object for WLPS.

drop_campaign.sql

Drops all database objects associated with Campaign Manager.

drop_common.sql

Drops the database objects which are common between WLPS and WLCS.

drop_mail_ad.sql

Drops the database objects used by the mail messaging component.

drop_wlcs.sql

Drops the database objects associated with WLCS.

drop_wlps.sql

Drops the database objects associated with WLPS.

insert_common.sql

Inserts core data into the common tables between WLPS and WLCS.

insert_wlcs.sql

Inserts core data into some of the WLCS tables.

insert_wlcs_sample_catalog.sql

Inserts sample data into the product catalog.

insert_wlcs_sample_customer.sql

Inserts sample customer information into WLCS tables.

insert_wlcs_sample_data.sql

Inserts sample data into various WLCS tables.

insert_wlps.sql

Inserts core data into WLPS tables.

insert_wlps_sample_data.sql

Inserts sample data into various WLPS tables.

install_report.sql

This script is used to summarize the database installation. Displays information such as the number of tables, indexes, and so on.

statistics.sql

This script is used in computing statistics on various database objects, such as tables and indexes, in an Oracle environment.


 

 


Defined Constraints

In each create-order-* SQL file, the database tables described earlier in this chapter are created. In addition, the SQL files define constraints. Table 10-18 shows the table name and describes the constraint(s) defined for it.

Note: The sample SQL statements shown in the table are from the create-order-oracle.sql file. The syntax is different for Cloudscape. Except where noted, the effect of each constraint is the same.


 

Table 10-18 Constraints Defined on Order Database Tables

Table Name

Constraints as Defined in create-order-oracle.sql

WLCS_COUNTRY

A referential integrity constraint is used to ensure the appropriate country ID (COUNTRY_ID) is being used with the order.

DISCOUNT

A check constraint (DISCOUNT_IS_GLOBAL) is used on the IS_GLOBAL column to ensure that the value of the column is either a 0 (false) or 1 (true).

A check constraint (DISCOUNT_IS_ACTIVE) is used on the IS_ACTIVE column to ensure that the value of the column is either a 0 (false) or 1 (true).

A referential integrity constraint (FK1_DISCOUNT) ensures that the DISCOUNT_SET record exists before a DISCOUNT record can be inserted.

DISCOUNT_ASSOCIATION

A data integrity constraint exists so in the event that a customer record is deleted in WLCS_CUSTOMER, the constraint FK1_DISCOUNT_ASSOCIATION will ensure all DISCOUNT_ASSOCIATION records for that customer are deleted as well.

A referential integrity constraint (FK2_DISCOUNT_ASSOCIATION) ensures that the discount exists before a DISCOUNT_ASSOCIATION record can be inserted.

WLCS_CREDIT_CARD

If a customer is deleted from the database, the CUSTOMER_CREDIT_CARD_FK constraint causes all their associated credit cards to be deleted.

The constraint for the schema in Oracle is:
CONSTRAINT CUSTOMER_CREDIT_CARD_FK REFERENCES WLCS_CUSTOMER(CUSTOMER_ID)ON DELETE CASCADE

WLCS_ORDER_LINE

If an order is deleted from the database, the WLCS_ORDER_FK constraint causes all the associated order line items to be deleted.

The constraint for the schema in Oracle is:
CONSTRAINT ORDER_FK REFERENCES WLCS_ORDER(ORDER_ID) ON DELETE CASCADE

ORDER_ADJUSTMENT

A referential integrity constraint (FK1_ORDER_ADJUSTMENT) ensures that the DISCOUNT record exists before the ORDER_ADJUSTMENT record can be inserted.

ORDER_LINE_ADJUSTMENT

A referential integrity constraint (FK1_ORDER_LINE_ADJUSTMENT) ensures that the DISCOUNT record exists before the ORDER_LINE_ADJUSTMENT record can be inserted.

WLCS_SHIPPING_ADDRESS

If a customer is deleted from the database, the CUSTOMER_FK constraint causes all their associated shipping addresses to be deleted.

The constraint for the schema in Oracle is:
CONSTRAINT CUSTOMER_FK REFERENCES WLCS_CUSTOMER(CUSTOMER_ID) ON DELETE CASCADE

WLCS_TRANSACTION_ENTRY

If a transaction is deleted from the database, the WLCS_TRANSACTION_FK constraint causes all the associated transaction entries be deleted.

The constraint for the schema in Oracle is:
CONSTRAINT WLCS_TRANSACTION_FK REFERENCES WLCS_TRANSACTION(TRANSACTION_ID) ON DELETE CASCADE


 

 

back to top previous page