Skip to content

Database Schema

lkzailac edited this page May 27, 2021 · 13 revisions


User

column name data type details
id integer not null, primary key
first_name string
last_name string
username string not null,
email string not null, unique
buying_power integer not null, unique
hashedPassword string not null, unique

Asset

column name data type details
id integer not null, primary key
company_name string not null
ticker_symbol string not null, unique
description string not null
ceo string not null
employees integer not null
headquarters string not null
founded integer not null
market_cap integer not null
price_earning_ratio integer not null
dividend_yield integer not null
average_volume integer not null
created_at date not null
updated_at date not null

Transaction

column name data type details
id integer not null, primary key
asset_id integer not null, foreign key
user_id integer not null, foreign key
share_quantity integer not null
price_per_share integer not null
buy_sell Boolean not null
  • asset_id references Asset table
  • user_id references User table

Watchlist

column name data type details
id integer not null, primary key
watchlist_name varchar not null
user_id integer not null, foreign key
  • asset_id references Asset table
  • user_id references User table

Watchlist_Table

column name data type details
id integer not null, primary key
asset_id integer not null, foreign key
watchlist_id integer not null, foreign key
  • asset_id references Asset table
  • user_id references User table
Clone this wiki locally