Welcome Guest, Not a member yet? Register   Sign In
MySQL Design Question
#2

[eluser]jedd[/eluser]
[quote author="insub2" date="1261154594"]
But that makes me feel like I'm doing something wrong.
[/quote]

Correct.

If you were to display your information using .. well, less words - it would look like this:
Business (n) -- to -- (m) Location
Review (n) -- to -- (m) Business

This is sufficient information to do what you are wanting to do. That is - you need two relationship tables, and three entity tables.

Unless the situation you describe - a review applying to a business at a location other than the business's location - is something you need to be able to model? This seems unlikely, though.

Quote:There is an implied relationship between the Location and Business through the Review but the relationship is independent of Reviews.

When describing these kinds of data you need to be really clear about the distinction between intent or desired behaviour, and apparent behaviour - that divergence is the key to understanding the problem.

So, yes, there is an explicit relationship between Location and Business. Any additional way of storing that relationship would de-normalise your schema.

Just to confuse matters .. a business may have multiple premises. A review may apply to one branch of a business, specific to a location. Your design may need to accommodate this.


Messages In This Thread
MySQL Design Question - by El Forum - 12-18-2009, 04:43 AM
MySQL Design Question - by El Forum - 12-18-2009, 05:15 AM
MySQL Design Question - by El Forum - 12-18-2009, 09:28 AM
MySQL Design Question - by El Forum - 12-18-2009, 09:33 AM
MySQL Design Question - by El Forum - 12-18-2009, 10:02 AM
MySQL Design Question - by El Forum - 12-18-2009, 03:48 PM
MySQL Design Question - by El Forum - 12-18-2009, 04:25 PM
MySQL Design Question - by El Forum - 12-18-2009, 04:31 PM
MySQL Design Question - by El Forum - 12-18-2009, 04:35 PM
MySQL Design Question - by El Forum - 12-18-2009, 04:49 PM
MySQL Design Question - by El Forum - 12-18-2009, 05:05 PM
MySQL Design Question - by El Forum - 12-18-2009, 05:08 PM
MySQL Design Question - by El Forum - 12-18-2009, 05:12 PM
MySQL Design Question - by El Forum - 12-18-2009, 05:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB