Database design

greenspun.com : LUSENET : DBAzine : One Thread

I have a PAYMENTS table with a RECEIVER field, the problem is that the receiver may come from two different tables: EMPLOYEES and SUPPLIERS. What is the best way to link these tables?

-- Yukio Ito (yukio@topdata.com.br), May 27, 2002

Answers

hi,

if u r using some frontend application then its simple as:

create table payments with a field RECEIVER_STATUS and RECEIVER_ID ,,now when someone choosed to enter receiver,,he first choose whether it an employee or a supplier,,this will be saved in RECEIVER_STATUS and then correspondingly values from respective table should be populated in combo to be entered in RECEIVER_ID field.

but if u r using backend to manage it ,,then plz do inform me the solution u found ,,and also if u 've still not found any.

regards

-- Muhammad Umar Liaquat (zindadil7t8@yahoo.com), June 19, 2004.


Moderation questions? read the FAQ