I have a simple question.
I am building a web application using MySQL and am currently designing it. I only have a small question about performance.
I would like to know which is more efficient:
Scenario number 1:
Table: Restaurant
-Name
-City
-Province
-Country
-Continent
sql =~ select * from restaurant where id = something.
or
Scenario number 2:
Table: Restaurant
-Name
-City
Table: City
-Name
-Province
Table: Province
-Name
-Country
Table: Country
-Name
-Continent
Table: Continent
-Name
sql =~ [insert multiple sql queries that will output the name and the city,
with the corresponding province, country, and continent]
Logically, I think scenario # 1 is better (less request), but some people have sworn to me otherwise.
source
share