removed references to sids in table creation and foreign keys, this should
fix problems