Skip to content

Database Schema

Tran Le edited this page Jun 3, 2021 · 13 revisions
Radiant database schema

Users

column name data type details
id int not null, primary key
username string not null
email string not null
hashed_password string not null

Products

column name data type details
id int not null, primary key
product_name string not null
brand_name string not null
skincare_step string not null
target string
am_use boolean not null
pm_use boolean not null
description text not null
directions text
ingredients text
img_url string
user_id int not null
  • user_id references Users table

Entries

column name data type details
id int not null, primary key
img_url string
description text not null
rating int
am_products text
pm_products text
user_id int not null
created_at date not null
  • user_id references Users table

Routines

column name data type details
id int not null, primary key
routine_type string not null
user_id int not null
  • user_id references Users table

RoutineProducts

column name data type details
id int not null, primary key
routine_id int not null
product_id int not null
  • routine_id references Routines table
  • product_id references Products table

AMProducts

column name data type details
id int not null, primary key
product_id int not null
entry_id int not null
  • product_id references Products table
  • entry_id references Entries table

PMProducts

column name data type details
id int not null, primary key
product_id int not null
entry_id int not null
  • product_id references Products table
  • entry_id references Entries table
Clone this wiki locally