IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New That's how I've already set it up
Dropping the state field entirely was just a possibility. I can't remember if it was MySQL or Postgres, but one of them allows you to define an index on a portion of a string. Then joins against that same portion -- ie: LEFT( countycode, 2 ) -- would be as fast as against a separate field.
===

Implicitly condoning stupidity since 2001.
New It's not a matter of speed.
Embedded data is a bad idea.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Generally I agree
But in this case we're going to start using the oficial county codes from the USPS, and the data is already there. I wouldn't advocate creating it that way, but since we're going to be getting the data that way it seems reasonable.
===

Implicitly condoning stupidity since 2001.
New Even so.
You put the official county code in one column, and extract the state for the other column.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New I agree with Malraux on this one
The county code could change in the future and no longer have state embedded in it. Best to keep an explicit State column around rather than parse the county ID to get State. "Smart ID's" are dangerous things.
________________
oop.ismad.com
     Is this schema screwed up, or is it just me? - (drewk) - (16)
         Your new schema looks good. - (jbrabeck) - (2)
             I guess what I'm looking for is ... - (drewk) - (1)
                 Guessing - (jbrabeck)
         Dependent Foreign Keys - (ChrisR) - (10)
             Can't happen, each county is unique - (drewk) - (9)
                 Still a function of integrity - (ChrisR) - (8)
                     Don't even need a lookup table - (drewk) - (7)
                         Maybe it's just me - (tseliot) - (6)
                             Agreed. - (admin) - (5)
                                 That's how I've already set it up - (drewk) - (4)
                                     It's not a matter of speed. - (admin) - (3)
                                         Generally I agree - (drewk) - (2)
                                             Even so. - (admin)
                                             I agree with Malraux on this one - (tablizer)
         Thoughts... - (Simon_Jester) - (1)
             You've about got it - (drewk)

Gleefully participating in the heat death of the Universe!
90 ms