I would like to start by saying thanks to everyone who takes some time to view this thread and try to help.
I have 3 tables in MS Access, which shall be dimmed as T, A1, and A2.
Application, which was written in C++ using WIN32 API, has a menu with two items, labeled as same as the above mentioned tables ( A1 and A2 ).
EDIT #1:
************************************
When user selects one of 2 items from the menu ,specific column in table T should reference the corresponding table's data.
The problem is that the data isn't simple attribute to be inserted into column, but a table A1 or table A2, depending on the user's choice, and that represents an issue for me.
I should design relations between tables, but I don't know how.
*********************************
I should make primary and foreign keys to reference mentioned tables, but I do not know how.
Value from tables A1 and A2 can appear in table T many times, but value for table T can appear in tables A1 and A2 only once, so I guess it is 1:N relationship for both cases.
Furthermore, I guess I should make T's primary key a foreign key for both tables ( A1 and A2 ).
Also, tables A1 and A2 are, in my opinion, weak entities, and depend on table T.
A small, improvised, graphical help:
T <------ A1 ( if user selected option A1 from menu )
^
|
|
A2 ( if user selected option A1 from menu )
So my question is:
What are proper relations for these 3 tables ( foreign key, primary key ... )?
Should I introduce 4th table, and if so, what should be primary key, foreign key... ?
Thank you,kindly.