add tests and implementation for reading and writing domain information into and from the database
continue work on database adapter