Normalize db schema