Added the database connection

Added a database connection to mongodb.