Implement some of database API.

This patch implements insert and find.
update and remove will be implemented soon.