Database Class

Adding the db class.