-
Notifications
You must be signed in to change notification settings - Fork 0
Database Schema
Zhuoxin Tan edited this page Aug 24, 2021
·
6 revisions
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| username | string | not null, unique |
| string | not null, unique | |
| icon | string | not null |
| hashedPassword | string | not null |
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| ownerId | integer | not null, foreign key |
| title | string(100) | not null |
| phone | string(20) | not null |
| description | textarea | not null |
| address | string(100) | not null |
| city | string(50) | not null |
| state | string(50) | not null |
| zipCode | string(20) | not null |
| lat | decimal | |
| lng | decimal |
-
ownerIdreferencesUsersTable, One user can have many restaurants.
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| userId | integer | not null, foreign key |
| restaurantId | integer | not null, foreign key |
| size | integer | not null |
| startDate | integer | not null |
| startTime | integer | not null |
-
userIdreferencesUserstable -
restaurantIdreferencesRestaurantstable - many to many relationship, many users can make many reservations.
