Sample Schema Tables

The RAP sample schema contains all tables and columns needed for the RAP sample project and sample queries provided with RAP.

  • All primary keys and foreign-key constraints use standard naming conventions, that is, PK_table name and FKnn_table name for a primary key and foreign-key constraint, respectively, where nn is the constraint number.
  • For the Adaptive Server and Sybase IQ databases, datatypes are assigned to table columns using domains. The multibyte ASE and Sybase IQ schemas include one more domain, SYB_LONGSTRING, than the single-byte schemas. Domain names are defined as SYB_domain name.
  • For the SAP HANA database, datatypes are assigned to table columns explicitly. The multibyte SAP HANA schema uses wide character datatypes for its character data.
  • Model indexes are named as XKnn_table name, where nn is the index number.
  • Only indexes needed to support the sample queries are included in the schema. You can add indexes to meet site-specific requirements for data-load and query performance.
Market Data and Instrument Tables

Table name

Code

Description

Bond

BOND

Stores bond data (for example, bond type, maturity date, interest rate, and so on). Bond attributes that are common to all types of financial instruments (trading symbol, name, currency, and so on) are stored in the Instrument table.

Bond History

BOND_HISTORY

Stores bond historical data, one record for each trading date. The data includes daily price and yield values (open/close, high/low), trade volume (number of bonds traded), and so on, for each bond.

Bond Quote

BOND_QUOTE

Stores real-time (intraday) quote data. Each quote record includes a yield, bid/ask price, and size (in other words, a number of bonds offered at a bid/ask price).

Bond Subtype

BOND_SUBTYPE

Stores a list of definitions that are used to categorize bonds of a particular type. For example, US Treasury issues can be categorized as Treasury Bonds, Zero-Coupon Bonds, Treasury Notes, and so on.

Bond Trade

BOND_TRADE

Stores real-time (intraday) trade data. Each trade record includes a bond's price and yield and a transaction's size (number of bonds traded).

Bond Type

BOND_TYPE

Stores a list of definitions used to specify a bond type. For example, US Treasury, Municipal, Corporate, and so on.

Capitalization

CAPITALIZATION

Contains a list of definitions that are used to specify a type of a market capitalization of a financial instruments issuer (for example, Small-Cap, Medium, Large).

Country

COUNTRY

Contains a standard list of the world countries.

Currency

CURRENCY

Contains a list of world currencies based on International Organization for Standards (ISO) publication 4217. For example, US Dollar, Hong Kong Dollar, and so on.

Dividend Event

DIVIDEND_EVENT

Stores information on a dividend payment event when a shareholder receives a certain payment for each share of stock owned. The dividend amount is commonly defined as a certain percentage of a share price but can also be specified as a monetary amount. The Monetary or Percentage Indicator (MOP_INDICATOR) column indicates how the dividend amount is defined.

Exchange

EXCHANGE

Stores a list of exchanges where financial instruments are listed and traded. For example, New York Stock Exchange, NASDAQ, and so on.

Exchange Traded Fund

EXCH_TRD_FUND

Stores exchange-traded funds (ETF) data. ETF attributes that are common to all types of financial instruments (trading symbol, name, currency, and so on) are stored in the Instrument table.

Fund Category

FUND_CATEGORY

Stores a list of definitions used to characterize an investment style of a mutual fund (for example, Value, Sector, Growth, and so on).

Fund Family

FUND_FAMILY

Stores a list of mutual fund families (for example, Fidelity, T. Rowe Price, Vanguard, and so on). A fund family is a company offering many mutual funds, for various objectives.

Fund Share

FUND_SHARE

Stores the data on mutual fund shares of a particular series (class) including a sales load, fee (12-b fee), and so on. Fund attributes that are common to all shares (fund type, family, investment objective type, and so on) are stored in the Mutual Fund table.

Fund Type

FUND_TYPE

Stores a list of definitions used to characterize a mutual fund based on a type of its financial instruments—stock fund (stocks), bond fund (bonds), hybrid fund (stocks and bonds), and so on.

Geographic Group

GEO_GROUP

Contains a list of definitions used to group financial instruments by a geographical region of their issuers. Terms commonly used in the US are: Domestic (US issuers), International (non-US issuers), Global (can include both domestic and international issuers), Europe (Europe-based issuers), and so on.

Index Composition

INDEX_CMPSTN

This association table specifies all financial instruments that constitute a market index. Thus, Dow Jones Industrial Average index is based on a stock valuation of the 30 major US corporations that are included in this index.

Index History

INDEX_HISTORY

Stores the index’s historical data, one record for each trading date. The data includes the index’s daily values (open/close, high/low) and trade volume.

Index Intraday

INDEX_INTRADAY

Stores the index’s real-time (intraday) data that shows its value movements during a trading day. Each data point includes an index value and trade volume.

Instrument

INSTRUMENT

Stores the financial instrument data that is common to all types of instruments. For example, trading symbol, name, date of issue, and so on.

Data that is specific to a particular type of instrument (stock, bond, option, mutual fund, and so on) is stored in separate data structures; for example, stock-specific data is stored in the Stock (STOCK) table.

Instrument Benchmark

INSTR_BENCHMK

This association table specifies a market index that is used as a benchmark for a given financial instrument. More than one benchmark can be used for some instruments.

Instrument Exchange

INSTR_EXCHANGE

This association table specifies an exchange where a given financial instrument is listed and traded. Some instruments may be listed on more than one exchange.

Instrument Rating

INSTR_RATING

Specifies rating scores assigned to an issuer of a financial instrument by different rating agencies.

Instrument Type

INSTR_TYPE

Stores a list of definitions used to specify a type of a financial instrument. For example, stock, bond, option, mutual fund, ETF, and so on.

Investment Objective Type

INVST_OBJ_TYPE

Stores a list of definitions used to characterize investment goals of a mutual fund (for example, Capital Appreciation, Income, Income and Growth, and so on).

Last Trade Price

LAST_TRADE_PRICE

Stores information about the last trade prices of the day.

Major Industry Classification

MAJOR_IDST_CLS

Contains a list of definitions used to characterize an industry of a company (for example, Technology, Energy, Healthcare, and so on) according to the Standard Industry Classification (SIC).

Market Index

MARKET_INDEX

Stores a list of market indexes (for example, Dow Jones Industrial Average, S 500, NASDAQ Composite) that are used in analysis of market trends, as benchmarks, and so on.

Maturity Term Type

MTRTY_TERM_TYPE

Stores a list of definitions used to specify the bond type's maturity term. For example, short-term, intermediate, long-term, and so on.

Mutual Fund

MUTUAL_FUND

Stores mutual fund data, including a fund type (stocks, bonds, hybrid), fund family (for example, Fidelity), investment objective (for example, growth and income), expenses, sale load, and so on.

Fund attributes that are common to all types of financial instruments (trading symbol, name, currency, and so on) are stored in the Instrument (INSTRUMENT) table.

Mutual Fund History

MUTL_FUND_HIST

Stores the historical data for a mutual fund, one record for each trading date. The data includes a trade date and price.

Option Category

OPTION_CATEGORY

Stores a list of definitions used to specify a category of an underlier that the characteristics of an option depend upon. For example, a bond, stock, market index, currency, and so on.

Option History

OPTION_HISTORY

Stores the options historical data, one record for each trading date. The data includes options daily price (open/close, high/low), trade volume (number of contracts traded), and so on.

Option Instrument

OPTION_INSTR

Stores the options data including an option type (put or call), option category (a type of an underlier), strike price, and so on.

Option attributes that are common to all types of the financial instruments (trading symbol, name, currency, and so on) are stored in the Instrument (INSTRUMENT) table.

Option Quote

OPTION_QUOTE

Stores the options real-time (intraday) quote data. Each quote record includes a bid/ask price, size (number of contracts offered at a bid/ask price), and so on.

Option Trade

OPTION_TRADE

Stores the options real-time (intraday) trade data. Each trade record includes a trade's price, size (number of contracts traded), and so on.

Option Type

OPTION_TYPE

Stores a list of definitions used to specify a type of an option contract (put or call).

Payment Frequency Type

PYMT_FRQ_TYPE

Stores a list of definitions used to specify the interest payment's frequency associated with a bond (annually, semi-annually, quarterly, and so on).

Rating Agency

RATING_AGENCY

Stores a list of agencies that collect information about the creditworthiness of issuers of financial instruments and assign to them a corresponding rating (credit score). Three major rating agencies are Moody's Investor Service, Standard & Poor's Corporation, and Fitch Ratings.

Rating Score

RATING_SCORE

Stores a list of scores that are assigned by rating agencies to issuers of financial instruments to characterize their creditworthiness. Thus, rating scores assigned by Standard & Poor's range from AAA (premium) to D (default).

Secondary Industry Classification

SCND_IDST_CLS

Stores a list of definitions that are used together with major industry classifications (see Major Industry Classification table) to further categorize an industry of a company.

Thus, a company with a major classification Technology can be further categorized as Software, Hardware, and so on, based on the Standard Industry Classification (SIC).

Share Series

SHARE_SERIES

Stores a list of definitions used to specify a series (class) of mutual fund shares. Shares series indicates whether shares carry commissions (sales load) and when these commissions must be paid.

Thus, A shares carry a front-end load that must be paid when shares are bought; B shares carry back-end load that must be paid when shares are sold; C shares have no commissions but carry an ongoing fee (12-b fee) that is paid annually in addition to other fund-related expenses; and so on.

Split Event

SPLIT_EVENT

Stores information on a stock split event when the number of outstanding shares of a company’s stock is increased and the price per share is simultaneously decreased so that proportionate equity of each shareholder remains the same.

The split is characterized by a split factor; a factor of 0.5 indicates that the number of shares is increased two times and that the share price is decreased two times. In a less common reverse split, the number of shares is decreased and the price for share is increased in a similar manner; a split factor of 2 indicates that the number of shares is decreased two times and that the share price is increased two times.

Stock

STOCK

Stores the data on stocks, such as stock type (common stock, preferred stock, and so on), dividend amount, number of shares outstanding, and so on. Stock attributes that are common to all types of financial instruments (trading symbol, name, currency, and so on) are stored in the Instrument table.

Stock History

STOCK_HISTORY

Stores the stock historical data, one record for each trading date. The data includes stocks daily prices (open/close, high/low) and trade volume (number of shares traded).

Stock Quote

STOCK_QUOTE

Stores the stocks' real-time (intraday) quote data. Each quote record includes a bid/ask price and corresponding size values (in other words, a number of shares offered at bid/ask price).

Stock Subtype

STOCK_SUBTYPE

Stores a list of definitions used to categorize stocks of a particular type. Thus, a preferred stock can be categorized as cumulative, noncumulative, participating, or convertible.

Stock Trade

STOCK_TRADE

Stores the stocks' real-time (intraday) trade data. Each trade record includes a transaction's price and size (in other words, a number of shares traded).

Stock Type

STOCK_TYPE

Stores a list of definitions used to specify a type of a stock, for example, common stock, preferred stock, and so on.

Underlying Index

ULYING_INDEX

This association table is used to define a market index (underlier) that an option is based on.

Underlying Instrument

ULYING_INSTR

This association table is used to define a financial instrument (underlier) that an option is based on. For example, stock, bond, and so on.