Add database handling
Merge pull request #6 from karthik339/master

Add database handling