optimised creating join tables and other such related datas