Wednesday, June 28, 2017

Re: Adding a lookup table

On Wed, 28 Jun 2017, John Thomas wrote:

> Could you create a City model and a County model and relate them one
> County to many Cities? I'm not sure how to populate those tables.

John,

Yes, that's the way to do it. I wrote my first idea before realizing that
two models/tables would be the way to go.

> As an aside, where do you get your City to County data. I've been meaning
> to look for that data.

My initial focus is on Oregon; Washington's next. Using duckduckgo.com I
entered the search term, "oregon cities by county," and found two useful
sites: 'Oregon Blue Book: Incorporated Cities: Arranged by County' and
'Oregon City to County Reference - A Cross-Reference List for ...'. I'm sure
other states will have similar sites.

Of course, not all cities are incorporated so when I find one not in the
list I assembled I do a bit more research, then add the name to the
appropriate county list. Example, Drewsey in Grant Co.

> Do all cities cleanly break into one county?

As far as I know, yes. At least in OR, WA, ID, NV, UT, WY, and MT. Some
cities are counties, I believe, and in New York City each borough is a
separate county.

Thanks,

Rich

No comments:

Post a Comment