and be done - but out of the 10 or so proposed users, 7 will be carrying it on their laptops which will for various reasons often operate disconnected from the Web. It's also worth noting that most of these folks are not very amenable to additional software installations. Like, at all. E.g., installing MySQL, or even SQLite, would be treated with the horror befitting Amityville and such. So, the easiest thing I see would be for me to build this as a stand-alone app with no external dependencies (e.g., no MySQL installations.) In any case, the data is not huge - less than 30k for both the data sets even in text format - and looks like this:select concat('Cost range is ', min(cost), '-', max(cost)) from mail_c +ost mc join mail_areas ma on mc.zone = ma.zone where ma.area between +1 and 10 and mc.weight = 12;
for the first one, andzip area 001 2 002 2 003 2 005 3 012 6 [...]
The key question is - how the heck do I structure this stuff? The term "look up", to me, immediately implies a hash or two... but for some reason (perhaps this freakin' cold that's got my brain running at half-speed) I'm not seeing it. Especially since there are no unique keys in the second table - it's a series of ranges from 1 to 200 with their associated areas and costs. So while I'm OK with the first one looking something like this (although a little birdie is whispering "there's a more efficient way to do this, stupid!" in my ear, I'm not seeing that at the moment either):weight area cost 1 2 3.17 2 2 3.87 3 2 4.51 4 2 5.22 [...] 199 2 96.01 200 2 96.29 1 3 4.02 2 3 4.15 [...]
I have no idea what to do for the second one. Any help - mostly in the "how to structure this whole thing" sense - would be much appreciated.$areas = ( '001' => 2, '002' => 2, '003' => 2, [...] );
In reply to Effective data structures for join-type lookups by flightdm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |