Doop db

refractor doop.go and doop_db.go; separate physical db logic and logical db logic.

create a simple test on doop_db.