language agnostic - Is there anything between key-value-stores and full SQL databases? -


i run problem, have arrays of simple (pod) objects , need save disk, search contents 1 column , retrieve it.

let's take simple cache example:

id: integer expires: date query: string result: string

the common operations saving object (#1), retrieving object id (#2) , deleting after specific date (#3), without using dsl has parsed @ runtime (#4).
since know format data has don't need support storing arbitrary documents (#5).

this should common enough lead flood of libraries doing this, i'm seeing key-value-stores bdb, tokyocabinet, etc. (which don't work, because of #3), full-fletched sql-databases including sqlite, mysql etc. (#4), , schemaless databases couchdb, mongodb , on (#5). storing plain csv/xml/json works reasonably well, doesn't #2 , #3 well.

i'm looking boost's multi-index (but using disk storage) or squeryl using native backend instead of glorified dsl-to-sql-compiler.
there or damned either parse csv hand or write massive amounts of boilerplate use benefits of sql-database?

it sounds typically done in normal sql database. if create factory method save , load these objects, each of factories (if got more 1 object type) needs implement 2 queries (save , load) , maybe third update. if objects map directly table records, can create base object maps properties field names , generates these queries you. since every language has libraries every database, can set within day, if don't use 1 of many dbo features many languages support. simple implementation take less 200 lines of code , more powerful you're doing csvs.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -