as6730 / JustEats

Full-Stack web application that allows users to search, discover and review restaurants | | Ruby on Rails (PostgreSQL), React, Redux
https://justeat.herokuapp.com/#/
10 stars 1 forks source link

DB Schema #3

Closed xnanodax closed 6 years ago

xnanodax commented 6 years ago

Database Schema

Comments:

xnanodax commented 6 years ago

In the current configuration, the restaurants can only have ONE tag, photo, menu, review. Is that what you wanted? We need to overhaul your db schema. We need to add more join tables so we can have a one to many relationship built.

I would suggest for tags to have a Tags table (includes name of tag) and a Tagging joins table (joins tags to restaurant_id). That way you don't have to store multiple row entries that have the exact same tag name for multiple restaurants. Same can be same for payment option and cuisine.

xnanodax commented 6 years ago

Looks good!