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

Welcome to IWETHEY!

New Thoughts...
You're going from a 3rd normal form (possibly higher) to a single table. Generally speaking it's a bad idea in the database world (but - there are exceptions).

However, given your data, something is indeed strange. Why the hell are there 3 autoincrementing identifiers? The identifier for state (primary key) should be the 2 letter code (and nothing else). County should be a FK (state cd) with no primary (imo).

But that's just my opinion. YMMV

New You've about got it
All we need in the primary table is the state and county foreign keys.[1] It looks like someone had just taken a class in normalization and went a little bit crazy.




[1] Actually just the county one, because the state is encapsulated within it, but I don't want to get Scott started again. ;)
===

Implicitly condoning stupidity since 2001.
     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)

No, Mr. Bond! I expect you to die!
40 ms