News for hackers. Stuff that matters.
Re:Cdb: a fast, reliable, simple package for creating, readi... by ctdean on Friday May 09, 2014 @10:20PM (#7724240)
CDB is one of my favorite data structures. When a student wants to learn about databases, I get them to implement cdb.

It's easy to implement and really demonstrates some good system engineering tradeoffs.

Re:Cdb: a fast, reliable, simple package for creating, readi... by zura on Saturday May 10, 2014 @04:09AM (#7724821)
Any links to theory behind cdb?
Re:Cdb: a fast, reliable, simple package for creating, readi... by netghost on Saturday May 10, 2014 @11:28AM (#7725715)
Here's an articles I came across that explains the structure: http://www.unixuser.org/~euske/doc/cdbinternals/

I think the theory is mostly that it's really simple and ends up requiring very few disk reads.

Re:Cdb: a fast, reliable, simple package for creating, readi... by twic on Saturday May 10, 2014 @06:27AM (#7725009)
I'd be particularly interested to know why there are 256 hashtables, rather than one, or some other number. I don't think i've seen this hybrid trie-hashtable before.

I wonder if there's any mileage in using a perfect hash function to build a database like this. It seems suited to the operating model of being slow to build but fast to access.

Re:Cdb: a fast, reliable, simple package for creating, readi... by geogriffin on Sunday May 11, 2014 @12:03AM (#7727726)
i second that; if anyone knows why there are 256 hashtables rather than just 1, please speak up. my only guess is that it might be a way to prevent 32-bit int overflow in the C code..