Database Schema - zyusnow/eRobin GitHub Wiki

users
| column name |
data type |
details |
| id |
int |
not null, pk |
| first_name |
string |
not null |
| last_name |
string |
not null |
| username |
string |
not null, unique |
| email |
string |
not null, unique |
| hashedPassword |
string |
not null |
| init_balance |
float |
not null |
| curr_balance |
float |
not null |
watchlists
| column name |
data type |
details |
| id |
int |
not null, pk |
| name |
string |
not null |
| ticker |
string |
not null |
| user_id |
int |
not null, foreign_key |
user_id references users table
watchlist_tickers
| column name |
data type |
details |
| id |
int |
not null, pk |
| ticker |
string |
not null |
| watchlist_id |
int |
not null, foreign_key |
watchlist_id references watchlists table
transactions
| column name |
data type |
details |
| id |
int |
not null, pk |
| transaction_shares |
int |
not null |
| transaction_price |
float |
not null |
| transaction_type |
string |
not null |
| user_id |
int |
not null, foreign_key |
| ticker |
int |
not null |
user_id references users table
holdings
| column name |
data type |
details |
| id |
int |
not null, pk |
| total_shares |
int |
not null |
| avg_price |
float |
not null |
| ticker |
int |
not null |
| user_id |
int |
not null, foreign_key |
user_id references users table