Eloen, I'm not exactly certain as to what you're asking, but here's a guess: 1) I would eliminate tables paycust and payrepr and replace with views. 2) Since a customer may have many representatives you need another table, like "CustomerRepr" that would have the Cust_ID and Repr_ID columns. This way you could relate customers to their representatives ie.. Sel t1.CustomerName, t2.ReprName from Customer t1, Representative t2, CustomerRepr t3 whe t1.Cust_ID = t3.Repr_ID and t2.Repr_ID = t3.Repr_ID If you wanted to include Customers w/o representatives then add union Sel CustomerName,Null from Customers whe Cust_ID not in (sel Cust_ID from CustomerRepr) Ben Petersen
<< Table CUSTOMERS (CUST_ID,...), table REPRESENTATIVES (REPR_ID,....) with 1:m (optional) relation so 1 customer may have none,1 or many representatives there is also table PAYMENTS now what is the best design according to normalization: 1. PAYMENT (PAYMNT_ID,KIND_ID,WHO_ID,..) with KIND_ID = 'C' for CUSTOMERS, 'R' for REPRESENTATIVES) and WHO_ID = CUST_ID or REPR_ID respectively 2. tables PAYCUST (PAYCUST_ID,CUST_ID,...) and PAYREPR (PAYREPR_ID,REPR_ID,..) for each group of data never managed to solve this TIA P.Kontos Athens, Greece >> ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
