[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.4

Best Practices for One to Many to Many relationship

Asked by g0rath in MS SQL Server

Tags: relationship, one

I have a situation where I'm writing an application that has a 1 to many to many relationship.

1 Audit -> n number of BatchIDs -> m number of possible errors.
so per audit that has average 40 batchids and average 8 errors

Version 1
Create 1 audit in table 1, create n number of batchid data in table 2 repeating m times for same batch id but different error
average 1 record table 1 and average 320 records in table 2

version 2
create 1 audit in table 1, create 1 batchid in table 2, create many errors in table 3
average 1 record in table 1 and average 40 records in table 2 and 8 records in table 3

Version 3
create 1 audit in table 1, create 1 batchid in table 2 and also populate m number of errors as seperate columns
average 1 record in table 1 and average 40 records in table 2

version 4
create 1 audit in table 1, create 1 batchid in table 2 and also populate an int using bit level math on an INT column
average 1 record in table 1 and average 40 records in table 2


The error list is populated via another table that only shows me the possible errors for this type of audit.

Which is the best method? I prefer method 4 because I can support up to 64 different errors per audit type and it's database driven...the lookup and data entry just does a conversion to an int.

Version 3 may be more readable, but I would have to do an alter table for each possible error
and since 1 error for 1 audit type isn't the same for another this chould get out of hand

Version 1 I don't like because of disk space

version 2 is proper? as in normalized?
[+][-]04/14/04 12:41 PM, ID: 10827008Accepted Solution

Your question has an Asker Certified™ answer! g0rath verified that this solution worked for them--which means it will likely work for you, too. Click to view the solution free for 30-days now.

About this solution

Zone: MS SQL Server
Tags: relationship, one
Sign Up Now!
Solution Provided By: ScottPletcher
Participating Experts: 2
Solution Grade: A
 
[+][-]04/14/04 11:51 AM, ID: 10826547Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/14/04 12:44 PM, ID: 10827033Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04/14/04 12:55 PM, ID: 10827162Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/14/04 12:56 PM, ID: 10827170Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/14/04 01:00 PM, ID: 10827219Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/14/04 01:03 PM, ID: 10827232Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/14/04 01:15 PM, ID: 10827342Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/14/04 01:25 PM, ID: 10827408Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/14/04 01:48 PM, ID: 10827635Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20100308-EE-VQP-140
Your technology problems solved.
Close See Plans and Pricing. Try it FREE for 30 days.