corrected sql db layout