This page last changed on May 06, 2010 by nickh.

Description

The Stonehenge StockTrader Sample Application relies on a database for storage of user information, stock information, and application configuration data. In the M1 release of the Stonehenge StockTrader Sample Application, Microsoft SQL Server was the only database supported, however support has now been added for using MySQL as the data store.




Tables Contained in the Database

Tables that have been marked with a were added to the database to support functionality that was added as part of M2.

ACCOUNT Table

The ACCOUNT table is used to store account details about users (as opposed to identifying information). It keeps track of events such as account creation and logins/logouts, as well as the current balance for the account. The PROFILE_USERID column is used to correlate information in this table with information in the ACCOUNTPROFILE table.

Column Name Data Type Nulls Allowed
CREATIONDATE datetime Yes
OPENBALANCE decimal(12, 2) Yes
LOGOUTCOUNT int No
BALANCE decimal(12,2) Yes
*ACCOUNTID int No
LASTLOGIN datetime Yes
LOGINCOUNT int No
PROFILE_USERID varchar(250) Yes

ACCOUNTPROFILE Table

The ACCOUNTPROFILE table is used to store personal information about registered users of the StockTrader application. It contains contact information, payment information, and authentication information (stored as plain text).

Column Name Data Type Nulls Allowed
ADDRESS varchar(250) Yes
PASSWORD varchar(250) Yes
*USERID varchar(250) No
EMAIL varchar(250) Yes
CREDITCARD varchar(250) Yes
FULLNAME varchar(250) Yes

BSTOOPS Table

The BSTOOPS table is used as a lookup table by the Configuration Service to determine the Order Processor Service instance that a given Business Service instance is configured to call.

Column Name Data Type Nulls Allowed
*BS varchar(50) No
OPS varchar(50) No

CLIENTTOBS Table

The CLIENTTOBS table is used as a lookup table by the Configuration Service to determine the Business Service instance that a given StockTrader Client instance is configured to call.

Column Name Data Type Nulls Allowed
*CLIENT varchar(50) No
BS varchar(50) No

DBCONFIG Table

The DBCONFIG table is used to store information about known instances of the StockTrader Database that can be used. This table is used primarily by the StockTrader Configuration Service.

Column Name Data Type Nulls Allowed
*DBNAME varchar(50) No
HOSTNAME varchar(50) No
PORT int No
ACTIVE varchar(1) No

HOLDING Table

The HOLDING table is used to store information about the various stock holdings that users of the StockTrader application currently have.

Column Name Data Type Nulls Allowed
PURCHASEPRICE decimal(12, 2) Yes
*HOLDINGID int No
QUANTITY float No
PURCHASEDATE datetime Yes
ACCOUNT_ACCOUNTID int Yes
QUOTE_SYMBOL varchar(250) Yes

ORDERS Table

The ORDERS table is used to store information about all stock orders that users of the StockTrader application have ever placed.

Column Name Data Type Nulls Allowed
ORDERFEE decimal(12, 2) Yes
COMPLETIONDATE datetime Yes
ORDERTYPE varchar(250) Yes
ORDERSTATUS varchar(250) Yes
PRICE decimal(12, 2) Yes
QUANTITY float No
OPENDATE datetime Yes
*ORDERID int No
ACCOUNT_ACCOUNTID int Yes
QUOTE_SYMBOL varchar(250) Yes
HOLDING_HOLDINGID int Yes

QUOTE Table

The QUOTE table is used to store the current state of the market.

Column Name Data Type Nulls Allowed
LOW decimal(12,2) Yes
OPEN1 decimal(12,2) Yes
VOLUME float No
PRICE decimal(12, 2) Yes
HIGH decimal(12, 2) Yes
COMPANYNAME varchar(250) Yes
*SYMBOL varchar(250) No
CHANGE1 float No

SERVICE Table

The SERVICE table is used as a lookup table by the StockTrader Configuration Service to resolve service endpoints and security requirements.

Column Name Data Type Nulls Allowed
*SERVICENAME varchar(50) No
URL varchar(500) No
SEC bit Yes
Document generated by Confluence on Jun 22, 2010 14:31