Db restructure