Repair major naming problem in database