This commit creates an interface to use with the db so that we can abstract what kind of db we use, therefore allowing us to chose db based on config.