Update periods and rates tables with relations to each other