Creation of the db access layer and config