initialize database protocols.

a whole lot of work...