Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Better approach: Database Design


Message #1 by "Chirag Shah" <chiragiit@y...> on Tue, 28 Jan 2003 15:55:08
I am having a table name "Carriers" (Basically they are insurance carries
(companies) and my table fields are 
Carrier_Name,Address,City,zipcode,Phone,Fax and insurance type of 
insurance practices (for eg. Auto,Health,Life,Property and Casualty,Loss 
Control, Bonds etc.) 

Part of my problem is this insurance practices list for an individual 
carrier can go upto 50 different practices (adding few more to my previous 
list workers compensation,Homeowners, Inland Marine Classes etc.) 

I can split table as "carriers" and "practices" but I will still have 50 
fields in the "practices" table. Can someone suggest a better approach for 
design. Thanks in advance
Message #2 by scott.murdock@o... on Tue, 28 Jan 2003 17:47:23
I would make a separate table containing the practices of each carrier, 
but without concatenating all the practices into one big field.  Use your 
primary key from the Carrier table as a foreign key in the practices table 
and use a separate row for each practice a carrier has.  It would look 
something like...

CARRIER_ID                               PRACTICE
1                                        Auto
1                                        Health
1                                        Life
2                                        Boat
2                                        Auto

Then you can use a SQL statement with an inner join to select both the 
contact info and practices for each carrier.

Hope that works for you,
Scott Murdock
Intranet Applications Manager
Omnicom Group
Message #3 by "Chirag Shah" <chiragiit@y...> on Tue, 28 Jan 2003 18:39:40
Thanks for your help. I appreciate it. 

  Return to Index