Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Custom Fields design

Author  Topic 

nvishnu
Starting Member

1 Post

Posted - 2004-12-09 : 14:54:43
I have a design question

Customer A has a contact table coulmns like below
tblContact (for CustomerA)
ContactID
CustomerID (fk from tblCustomer
ContactFirstName
ContactLastName
while customer B may need an extra contact info like Age. Another customer
may have Age and DOB.
tblContact (for CustomerB)
ContactID
CustomerID (fk from tblCustomer
ContactFirstName
ContactLastName
DOB
The number of fields for contact field may vary from
customer to customer. Assume that each client has different database (we
dont need to customerid as foreign key. Whats the best design in this case.
I have thought of 2 cases 1. Add the dynamic fields to the same table 2.
have a seperate table call table extension and append the fields in that
table with a foreign key in the Contact table.

Does anyone know how ERP packages achieve this.

Thanks for suggestion. I hope this time its clear,

Navin

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2004-12-09 : 15:11:18
quote:

Does anyone know how ERP packages achieve this.



With many NULLs


DavidM

"Always pre-heat the oven"
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-12-09 : 15:13:18
With many NULLs = the wrong way

Actually, With Many Nulls was an old American Indian who was notorious for creating badly designed database applications.
Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2004-12-09 : 15:32:18
quote:

Actually, With Many Nulls was an old American Indian who was notorious for creating badly designed database applications.



He wrote the "Treaty" database that had no contraints and hence most treaties where deemed NULL and void. :-)


DavidM

"Always pre-heat the oven"
Go to Top of Page
   

- Advertisement -