Raoul Duke wrote: > what do people use for doing in-memory simple dbs? like, do people > just use persistent maps, or do they go out and use derby or > something? >
Sean Devlin's suggested a contrib library which adds a bunch of functions for working with maps. Have a look at this thread on the clojure-dev list: http://groups.google.com/group/clojure-dev/browse_thread/thread/9a518c853bfbba8b Here's my take (see the examples at the bottom of the file): http://github.com/ato/clojure-utils/blob/master/src/org/meshy/seq_utils.clj As you can see I kind of prefer an pre-generated index to the join functions Sean is proposing, as its faster. I guess joins could be useful for ad-hoc queries though where you don't want to construct an index upfront. I can't see why you'd want to use SQL for an in-memory database as Clojure's data structures provide everything you need (including transactions) and are much more flexible and general. You write your queries in Clojure code instead of having to switch to SQL, so they can do many more things and you can store arbitrary java objects, not just stuff that's serializable. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en