Re: Database Design - Multiple locations

2008-04-22 Thread Mr. Frank Cobia
Thanks. I will look into this and see if I can make it work. Frank On Apr 21, 2008, at 3:45 PM, Chuck Hill wrote: On Apr 20, 2008, at 6:15 PM, Mr. Frank Cobia wrote: I have a database design question. I am posting it to the WebObjects list because I am building a WebObjects app and want a

Re: Database Design - Multiple locations

2008-04-22 Thread Mr. Frank Cobia
I had thought of something along theses lines, but I was worried about searches. Most of the time I will not be accessing the locations through the tree, but doing a search such as where location = Georgia which will also need to pull up anything with a location in a country, metro region

Re: Database Design - Multiple locations

2008-04-22 Thread Mr. Frank Cobia
Correction, the search below with the code would be where location.code like us.georgia.metroatlanta% On Apr 22, 2008, at 10:35 AM, Mr. Frank Cobia wrote: I had thought of something along theses lines, but I was worried about searches. Most of the time I will not be accessing the locations

Re: Database Design - Multiple locations

2008-04-22 Thread James Cicenia
About that irrational fear... Sometimes code is your best friend. I like your URL approach. -j- On Apr 22, 2008, at 9:35 AM, Mr. Frank Cobia wrote: I had thought of something along theses lines, but I was worried about searches. Most of the time I will not be accessing the locations

Re: Database Design - Multiple locations

2008-04-21 Thread Mr. Frank Cobia
It does not always point to city and that is what is throwing me off. They do haphazardly point to different different locations. Thanks, Frank Cobia On Apr 20, 2008, at 11:05 PM, James Cicenia wrote: Does your data haphazardly point to any location? Or does it point always to city (the

Re: Database Design - Multiple locations

2008-04-21 Thread Ken Anderson
Why not model all the different location types with an abstract parent (like 'Location'), and then relate from your data object to the abstract 'Location' class? Something like this: Class/entity hierarchy: Location : City Location : State Location : Country Location : Region City could

Re: Database Design - Multiple locations

2008-04-21 Thread Chuck Hill
On Apr 20, 2008, at 6:15 PM, Mr. Frank Cobia wrote: I have a database design question. I am posting it to the WebObjects list because I am building a WebObjects app and want a solution that works well for EOF. I have a table of data that has to have a location associated with it.

Database Design - Multiple locations

2008-04-20 Thread Mr. Frank Cobia
I have a database design question. I am posting it to the WebObjects list because I am building a WebObjects app and want a solution that works well for EOF. I have a table of data that has to have a location associated with it. Unfortunately the level of the location is not constant. The

Re: Database Design - Multiple locations

2008-04-20 Thread James Cicenia
Does your data haphazardly point to any location? Or does it point always to city (the most discreet) which is hierarchical down from Country? If that is the case just point it to city and you will have access to all the other locations as they would all be joined in to-one relationship up