init resource relationship structure
init foreign key relationaship for resources