I have to create a db design to store blacklisted fax numbers. I have created a table and one column of this table is customerID which is a foreign key to table Customer. Now i want to have a faxnumber which is blacklisted for all customers. How should i proceed with this. Should i use Null in this case. Please provide options
If its blacklisted for all customers then have a separate table for those with no relationships.
There are numbers that are blacklisted for all and those that are blacklisted for certain customers. The number cannot be by definition in both. Thus the numbers that are black listed for certain numbers (and I'm assuming a many:many relationship) you can use the classic many many association table design. For numbers that are blacklisted for all there are no relationships with customers which implies no join conditions. Since the data in each is mutually exclusive each type of data appears in different tables.
I cannot seem to get a image, of how I see the basic design, to display so I'll just paste the link here : http://www.freeimagehosting.net/image.php?9046f1985c.png