I've been studying proper relational algebra, from Christopher Date's book Database in Depth: Relational Theory for Practitioners. Throughout the book he uses the language he and Hugh Darwen came up with in order to convey the theory — Tutorial D. In general I think Tutorial D is a very workable query language, much more flexible than SQL and so I (just for fun) was keen to take a stab at writing a (poor performing, undoubtedly) little RDBMS based on Tutorial D, rather than SQL.
Realizing this is a mammoth of a task even just to make something basic, I wonder if there are existing storage systems available that don't represent tables in the SQL sense, but represent relations in the relational sense and don't assume any particular query language is used to access the data, but rather just provide low-level functions like product
, join
, intersect
, union
, project
etc (at the C-level, not at a query language level).
Am I making sense? :) Basically I'd like to take something like this and stick a Tutorial D (or similar) query interface in front of it.
It's really easy to do everything in memory, but representing the data structures on disk in a fashion that is even mildly efficient is pretty tricky and probably over my head without some serious research.