RTD.DB Database Templates

RTD.DB Database Templates

As described in Concept, configuration steps include:

  1. Creating a database
  2. Creating data tables
  3. Creating ticker tables
  4. Creating configuration tables
  5. Configuring formulas
  6. Configuring data tables
  7. Configuring the connection string

You can find ready-to-use templates for several trading and database platforms in the Database Templates folder of the download package.

Trading and analytical platforms include:

Supported database platforms include:

  • Microsoft SQL Server
  • Microsoft SQL Server Compact
  • Oracle Database
  • IBM DB2
  • MySQL and MariaDB
  • PostgreSQL
  • NuoDB

Use the following steps to configure a database using a template:

  1. Create a database on your target server if necessary.
  2. Select a folder of the target database platform like Microsoft SQL Server.
  3. Open, check, and execute the install.sql file to create configuration tables.
  4. Open the templates folder.
  5. Select a folder of the target trading platform like TOS.RTD.
  6. Open, check, and execute files like QuoteListTOS.sql and OptionListTOS.sql to create ticker tables.
  7. Add tickers to the newly created tables like QuoteListTOS and OptionListTOS.
  8. Open, check, and execute files like QuoteDayHistoryTOS.sql or Option15MinuteHistoryTOS.sql to create data tables and configure formulas.
  9. Configure the connection string using Connection Manager or the application settings directly.

You can add other tables (step 8) later.

Every file used to create a data table like Option15MinuteHistoryTOS.sql has the following structure:

  1. The data table CREATE TABLE statement
  2. One row of real_time_tables configuration
  3. Multiple rows of real_time_formulas configuration

You can use such files as templates for other tables.

For example, you can use the Option15MinuteHistoryTOS.sql file to create the Option10MinuteHistoryTOS table.
Just copy the file and use Search and Replace to change the table name.