Jump to content

To join or not to join?


astralaaron
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...