[v6r12] new ps and fk dfc

This PR contains a new sql schema with enforced Foreign Key, as well as stored procedure. The managers to call the various PS are also included. It also contains numerous bug fixes 
When installing via dirac tools, the following is not needed (from this line up to line 14 included).