I have 4 tables
A(ida, name)
B(ida, B-specific stuff)
C(ida, C-specific stuff)
D(ida, D-specific stuff)
and i want that another table E could refer to just B OR C (not D). What can i write in the
CREATE TABLE E
?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Seems to me that you are trying to use some kind of supertype/subtype — as opposed to simple vertical partitioning. If so, do introduce a type-discriminator.
Because this is generic example (A, B, C, D ..) it is hard to guess what relates to what, so here are two options as my best guess.
Option 1
Option 2