set up db context.