Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Table3 { (int id, int type) PK }
- Table1 { (int id, int type [CHECK type = 1]) FK Table3 }
- Table2 { (int id, int type [CHECK type = 2]) FK Table3 }
- Table4 { (int id, int type [CHECK type IN (1,2)]) PK }
- Table1 { (int id, int type [CHECK type = 1]) FK Table4 }
- Table2 { (int id, int type [CHECK type = 2]) FK Table4 }
- Table3 { (int id, int type) FK Table4 }
- TABLE_A:
- PK_FIELD int NOT NULL
- OTHER_FIELD int NOT NULL, NOT IN TABLE_B.OTHER_FIELD
- TABLE_B:
- PK_FIELD int NOT NULL
- OTHER_FIELD int NOT NULL, NOT IN TABLE_A.OTHER_FIELD
- TABLE_C:
- PK_FIELD int NOT NULL
- OTHER_FIELD int NOT NULL IN (TABLE_A.OTHER_FIELD OR TABLE_B.OTHER_FIELD
Add Comment
Please, Sign In to add comment