r/DatabaseHelp • • Feb 28 '18

One table relationship with 2 different table

There is an attribute in table A which tells which table will it get.

Ex:

Table A (Infos)

     InfoID | Type 

Table B (Student)

     StudentID | Name | Course |

Table C (Employees)

     EmployeeID | Name | Company |

If type = 1 then get info in Table B(student)

    InfoID | StudentID | Name | Course

Else get info in Table C(Employees)

    InfoID | EmployeeID| Name | Company
1 Upvotes

6 comments sorted by