Jump to content

To join or not to join?


astralaaron

Recommended Posts

I have one more thing bothering me right now...say I have a website that listed parks in different areas. Each park has a name , address details, some features, and also pricing for admission. Does it make sense at all to store the information in multiple tables?------------------------table_parkspark_id | park_name | description | features | date_added table_parks_locationpark_id | city | state | zip | address table_parks_detailpark_id | park_opens | park_closes | adult_price | child_price | contact_phone | contact_email----------------------- Is there any benefit compared to something like this?:------------table_parkspark_id | park_name | description | features | date_added | city | state | zip | address | park_opens | park_closes | adult_price | child_price | contact_phone | contact_email----------- Would I just be making extra work to have to join the tables together? or would there be any speed benefits besides being easier to look over by a human?

Link to comment
Share on other sites

second onse is more appropiate. When you will need to get the information of two or more tables (from first structure) join will take extra time. as all of the coumn belongs to park (think it as a park object and column of it as propeties of that object) so keep it a single table will be better

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...