CDB implementation in Erlang