News for hackers. Stuff that matters.
Re:MongoDB vs Redis, a different interpretation of what's wr... by davidmathers on Wednesday June 03, 2009 @09:11PM (#640776)
I'm not 100% sure, but it looks like redis might already have the low level building blocks of a relational dbms. The relational model is: relations + relational operators + boolean logic.

A relation is just a special kind of set construction and redis has sets, so relations can be built. All of logic and operations can be built from either (not + and) or (not + or). You have SISMEMBER (not), SUNION (and), and SINTER (or).

That might be enough.

Re:MongoDB vs Redis, a different interpretation of what's wr... by kragen on Wednesday June 03, 2009 @09:53PM (#640820)
You can't get select, project, or cartesian product out of ismember, union, and intersection. Also, union corresponds to and and intersection corresponds to or, not the other way around as your comment has it.
Re:MongoDB vs Redis, a different interpretation of what's wr... by davidmathers on Wednesday June 03, 2009 @10:12PM (#640842)
You can't get select, project, or cartesian product out of ismember, union, and intersection.

Sorry, I didn't mention that redis has SADD and SREM for implementing projection. I'm not sure what you mean by select. You're right about product. I think that's what's missing.

Also, union corresponds to and and intersection corresponds to or

That's exactly what I said. We both got it backwards.

Re:MongoDB vs Redis, a different interpretation of what's wr... by kragen on Thursday June 04, 2009 @07:48AM (#641240)
Haha! You're right.

"Select" is the SPC-algebra operation which gives you the subset of a relation whose tuples satisfy some Boolean condition, e.g. firstname='bob'.