troubleshooting Question

comma separated values or separate table

Avatar of govindarajan78
govindarajan78Flag for India asked on
DatabasesWeb DevelopmentMicrosoft SQL Server 2005
9 Comments2 Solutions752 ViewsLast Modified:
Hi,

we have 2 tables; product and accessories; a product can have multiple accessories.

which approach is faster & better

a. store the accessories id as a comma separated value in the product table
b. create a separate table and store the relationship
    b. 1  table columns:  product_id,accessories_id   (composite primary key)
    b.2   table columns: id (primary key),product_id,accessories_id

Thanks

/govind
ASKER CERTIFIED SOLUTION
Ram4020

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros