nzoam93 / AirbNZ

Website Clone of AirBnB
0 stars 0 forks source link

PA Review: Database Schema #3

Open Shhmabbey opened 1 year ago

Shhmabbey commented 1 year ago

Database Schema

Shhmabbey commented 1 year ago
Shhmabbey commented 1 year ago
Shhmabbey commented 1 year ago

Nicely done Noam! Just double check your datatypes and be more specific on what foreign keys reference which tables. Below is a sample to help. Thanks!

Shhmabbey commented 1 year ago

users

column name data type details
id bigint not null, primary key
email string not null
password_digest string not null
session_token bigInt not null, indexed

carts

column name data type details
id bigint not null, primary key
user_id integer not null, foreign key

products

column name data type details
id bigint not null, primary key
title string not null
description string not null
size string
style string
price decimal not null
stock integer not null
category_id integer foreign key, indexed
Shhmabbey commented 1 year ago