update db structure and cascading