RTD.DB Database Templates
As described in Concept, configuration steps include:
- Creating a database
- Creating data tables
- Creating ticker tables
- Creating configuration tables
- Configuring formulas
- Configuring data tables
- 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:
- eSignal FutureSource (ES)
- Interactive Brokers Trader Workstation (TWS)
- Thinkorswim thinkDesktop (TOS)
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:
- Create a database on your target server if necessary.
- Select a folder of the target database platform like Microsoft SQL Server.
- Open, check, and execute the install.sql file to create configuration tables.
- Open the templates folder.
- Select a folder of the target trading platform like TOS.RTD.
- Open, check, and execute files like QuoteListTOS.sql and OptionListTOS.sql to create ticker tables.
- Add tickers to the newly created tables like QuoteListTOS and OptionListTOS.
- Open, check, and execute files like QuoteDayHistoryTOS.sql or Option15MinuteHistoryTOS.sql to create data tables and configure formulas.
- 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:
- The data table CREATE TABLE statement
- One row of real_time_tables configuration
- 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.