Database Schema - 88joonyc/AIR-Land-N-Sea GitHub Wiki

Database Schema

users

Column Name Data Type Details
id int not null, primary key
firstName varchar not null
lastName varchar not null
userName varchar not null, unique
email varchar not null, unique
picture varchar
hashedPassword varchar not null
  • UNIQUE index on [user_name, email]

bookings

Column Name Data Type Details
id int not null, primary key
toyId int not null
userId int not null
startDate datetime not null
endDate datetime not null
  • toyId references toys Table
  • userId references users Table

toys

Column Name Data Type Details
id int not null, primary key
userId int not null
description varchar
year int not null
make varchar not null
model varchar not null
type varchar not null
level int not null
price int not null
  • userId references users Table

reviews

Column Name Data Type Details
id int not null, primary key
userId int not null
toyId int not null
review varchar
stars int not null
  • userId references users Table
  • toyId references toys Table

images

Column Name Data Type Details
id int not null, primary key
toyId int not null
url varchar not null
  • toyId references toys Table

hearts

Column Name Data Type Details
id int not null, primary key
userId int not null
toyId int not null
  • userId references users Table
  • toyId references toys Table