optimized db model