Which method is better to store the data in a database and why? Here is a restaurant example. I’m using a SQL database and JSON to communicate with the database.
Imagine each row is a column in a database
-
Mostly without objects
- Resturant ID -string
- Resturant name – string
- Resturant picture – hyperlink
- Resturant description – string
- Resturant hours – String
- Resturant is open – boolan
- Resturant type – string
- Location – string with lat and long
- Resturant Menu- array of objects {item name, price, description, type, picture}
- Resturant rating – array of objects {rating, description, critic_id}
-
Mostly with objects
- Resturant ID -string
- Resturant info – object {name,picture,description, hours, isOpen, type, location}
- Resturant Menu- array of objects {item name, price, description, type, picture}
- Resturant rating – array of objects {rating, description, critic_id}