This is a setup script to view the basics for the SQLite DataBase management. It does the following:
- Access SQLite in the Ubuntu remote server;
- Access the SQLite DataBase;
- Manages SQLite tables;
SSH into your server and enter SQLite:
# default SQLite browser
sqlite3
# suggested SQLite browser
sqlite3 -column -headerOpen the option-data.db DataBase:
.open option-data.dbShow the tables inside the DataBase:
.tablesGet the structure of the tables btc_option_data and eth_option_data inside the DataBase:
# BTC option data structure
.schema btc_option_data
# ETH option_data
.schema eth_option_dataShow tables via SQL commands:
# show all elements
SELECT * FROM btc_option_data;
SELECT * FROM eth_option_data;
# show 5 entries
SELECT * FROM btc_option_data LIMIT 5;
SELECT * FROM eth_option_data LIMIT 5;
# get instrument name, market price and timestamp
SELECT instrument_name, mark_price, timestamp FROM btc_option_data;
SELECT instrument_name, mark_price, timestamp FROM eth_option_data;
# get all the available data for a specific instrument
SELECT * FROM btc_option_data WHERE instrument_name = 'BTC-24SEP21-7000-P';Exit SQLite
.quitThis setup script has been tested against SQLite version 3.31.1