Optimized database context.