Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. alter table ACCOUNT add constraint FK_ACCOUNT_REFERENCE_BUILDING foreign key (ACCOUNTID)
  2. references BUILDING (BUILDINGID) on delete restrict on update restrict;
  3.  
  4. alter table BILL add constraint FK_BILL_REFERENCE_BUILDING foreign key (BUILDINGEXPENSEID)
  5. references BUILDINGEXPENSE (BUILDINGEXPENSEID) on delete restrict on update restrict;
  6.  
  7. alter table BUILDINGEXPENSE add constraint FK_BUILDING_REFERENCE_BUILDING foreign key (BUILDINGID)
  8. references BUILDING (BUILDINGID) on delete restrict on update restrict;
  9.  
  10. alter table BUILDINGEXPENSE add constraint FK_BUILDING_REFERENCE_EXPENSE foreign key (EXPENSEID)
  11. references EXPENSE (EXPENSEID) on delete restrict on update restrict;
  12.  
  13. alter table BUILDINGEXPENSE add constraint FK_BUILDING_REFERENCE_FREQUENC foreign key (FREQUENCYID)
  14. references FREQUENCY (FREQUENCYID) on delete restrict on update restrict;
  15.  
  16. alter table BUILDINGEXPENSE add constraint FK_BUILDING_REFERENCE_USER foreign key (SETTERID)
  17. references USER (USERID) on delete restrict on update restrict;
  18.  
  19. alter table EXPENSE add constraint FK_EXPENSE_REFERENCE_USER foreign key (USERID)
  20. references USER (USERID) on delete restrict on update restrict;
  21.  
  22. alter table MANAGES add constraint FK_MANAGES_REFERENCE_USER foreign key (ID)
  23. references USER (USERID) on delete restrict on update restrict;
  24.  
  25. alter table MANAGES add constraint FK_MANAGES_REFERENCE_BUILDING foreign key (BUILDINGID)
  26. references BUILDING (BUILDINGID) on delete restrict on update restrict;
  27.  
  28. alter table OCCUPIES add constraint FK_OCCUPIES_REFERENCE_USER foreign key (USERID)
  29. references USER (USERID) on delete restrict on update restrict;
  30.  
  31. alter table OCCUPIES add constraint FK_OCCUPIES_REFERENCE_UNIT foreign key (UNITID)
  32. references UNIT (UNITID) on delete restrict on update restrict;
  33.  
  34. alter table TRANSACTION add constraint FK_TRANSACT_REFERENCE_UNITACCO foreign key (UNITACCOUNTID)
  35. references UNITACCOUNT (UNITACCOUNTID) on delete restrict on update restrict;
  36.  
  37. alter table TRANSACTION add constraint FK_TRANSACT_REFERENCE_USER foreign key (USERID)
  38. references USER (USERID) on delete restrict on update restrict;
  39.  
  40. alter table TRANSACTION add constraint FK_TRANSACT_REFERENCE_UNITBILL foreign key (UNITBILLID)
  41. references UNITBILL (UNITBILLID) on delete restrict on update restrict;
  42.  
  43. alter table UNIT add constraint FK_UNIT_REFERENCE_BUILDING foreign key (BUILDINGID)
  44. references BUILDING (BUILDINGID) on delete restrict on update restrict;
  45.  
  46. alter table UNIT add constraint FK_UNIT_REFERENCE_UNITSTAT foreign key (UNITSTATUSID)
  47. references UNITSTATUS (UNITSTATUSID) on delete restrict on update restrict;
  48.  
  49. alter table UNIT add constraint FK_UNIT_REFERENCE_UNITTYPE foreign key (UNITTYPEID)
  50. references UNITTYPE (UNITTYPEID) on delete restrict on update restrict;
  51.  
  52. alter table UNITACCOUNT add constraint FK_UNITACCO_REFERENCE_ACCOUNT foreign key (BUILDINGID)
  53. references ACCOUNT (ACCOUNTID) on delete restrict on update restrict;
  54.  
  55. alter table UNITACCOUNT add constraint FK_UNITACCO_REFERENCE_UNIT foreign key (UNITID)
  56. references UNIT (UNITID) on delete restrict on update restrict;
  57.  
  58. alter table UNITBILL add constraint FK_UNITBILL_REFERENCE_BILL foreign key (BILLID)
  59. references BILL (BILLID) on delete restrict on update restrict;
  60.  
  61. alter table UNITBILL add constraint FK_UNITBILL_REFERENCE_UNIT foreign key (UNITID)
  62. references UNIT (UNITID) on delete restrict on update restrict;
  63.  
  64. alter table USER add constraint FK_USER_REFERENCE_USERTYPE foreign key (USERTYPEID)
  65. references USERTYPE (USERTYPEID) on delete restrict on update restrict;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement