Add db layer.
Merge pull request #2 from thschroeter/rest-api

Add db layer.