More types to db.erl

Slowly but surely