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

[eluser]insub2[/eluser]
My solution doesn't seem right to me....

I'm working on a reviews website that focuses on travel so I have to deal with Airports and Airlines (among other things). So I have a table for Businesses and a table for Locations that are related to each other by a BusinessLocations table. And a table for Reviews that contain one Business ID and are also related to Locations by a ReviewLocations table.

Code:
...Business <- BusinessLocations -> Locations <- ReviewLocations -> Reviews -> Business...
[i]*wraps into a circle[/i]

My issue is that with this design, it's possible for a Review to be of Business at a Location that isn't a Location for that Business.

...er, say there is a BusinessLocation relationship between United Airlines and O'Hare Airport. And there is a Review of United Airlines but something got messed up in the database and the ReviewLocation says the Review is for United Airlines at 123 Fake St.

There is an implied relationship between the Location and Business through the Review but the relationship is independent of Reviews. So I need to repeat data. But that makes me feel like I'm doing something wrong.


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