top | item 29139018

(no title)

08-15 | 4 years ago

I must be missing something, but the "solution" with the 3NF and five separate tables with their own indices seems artificial and like pointless overengineering. Isn't this solved by a single index?

Or maybe a relational DB is already overengineering. Using a hash table (some libdbm lookalike) to map (ip,helo,from,to) to (time) solves the problem, too, and doesn't have a low performance failure mode.

This doesn't change the major point about everyone having been a newbie at point, though.

discuss

order

nerdponx|4 years ago

Are there any libdbm-style databases that support "tuples" as keys and values, instead of plain "strings"? I've felt like I wanted them in some applications, but didn't want to stringify everything.

rudasn|4 years ago

I'm not familiar with "libdbm-style databases", but CouchDB's map/reduce views allows you to emit any JS object as the key, like so

emit(key, value)

Eg

emit([0,"one"], 2)

And you can query by the value of the key.

heavenlyblue|4 years ago

You can however cache values in 3NF better down the stack (i.e. you can cache a lookup of a string to a PK and then only use PKs down the line).