On Fri, Jul 13 2012, Dave Howorth <dhowo...@mrc-lmb.cam.ac.uk> wrote:
> Patrick Meidl wrote: > > > there are two reasons why you want to model the relationship city -> > > state -> country in such a rigid (and maybe simplified) way: > > > > first, it helps you maintain data integrity. after all, you don't want > > anybody to enter a store which is in Paris, Bavaria, UK, right? > > But you do want them to be able to enter Paris, France as well as Paris, > Texas, USA. :-P sure, but even if you model your data as I described, that would still be possible: you would have two city entities called "Paris", each linked to the respective state/country. > And in Germany, the state (Land) is not part of the address, AFAIK, so > Bavaria, or Freistaat Bayern, will never appear. And it's most > definitely not right to have to write Singapore, Singapore, Singapore > as an address. So I think some more flexibility is required, as others > have suggested. good point. the fact that in most countries (except the US) states are irrelevant for address purposes is certainly a goog argument for not linking cities to countries via states. but as I said, I don't think there is one good way to represent this data, it will always depend on your actual problem. patrick -- Patrick Meidl ........................ patr...@pantheon.at Vienna, Austria ...................... http://gplus.to/pmeidl _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk