Skip to content
Henry Walton edited this page Jun 24, 2021 · 3 revisions

Database Schema

Database Schema

users

column name data type details
id integer PK
name varchar(50) not null
username varchar(50) not null
email varchar(50) not null, unique
password varchar(100) not null
productId integer not null, FK
profileImg varchar(50) not null
bio text not null
created_at datetime not null
  • productId references products table

comments

column name data type details
id integer PK
productId integer not null, FK
userId varchar(50) not null, FK
body varchar(400) not null
created_at datetime not null
  • productId references products table
  • userId references users table

products

column name data type details
id integer PK
name varchar(50) not null
commentId integer not null, FK
imgUrl varchar(50) not null
productUrl varchar(50) not null
categoryId integer not null, FK
creatorName varchar(50) not null
description text not null
userId integer not null, FK
created_at datetime not null
  • categoryId references categories table
  • userId references users table
  • commentId references comments table

categories

column name data type details
id integer PK
name varchar(50) not null, unique
Clone this wiki locally