DataBase Schema - MDasch22/react-solo-project Wiki

Database Schema

image

Users

column name data type details
id integer not null, primary key
profilePic varchar
userName varchar not null
email varchar not null, unique
hashedPassword varchar not null, unique
createdAt timeStamp
createdAt timestamp

Reviews

column name data type details
id integer not null, primary key
userId integer not null
beachId integer not null
rating integer not null
comment text
createdAt timeStamp
createdAt timestamp
  • userId references Users table
  • beachId references Beaches table

Beaches

column name data type details
id integer not null, primary key
ownerId integer not null
title varchar not null
description text not null
address varchar not null
city varchar not null
country varchar not null
zipCode varchar not null
createdAt timestamp
updatedAt timestamp
  • ownerId references Users table
  • id references Reviews table