Need help to build a query

Reply

Join Date: Nov 2007
Posts: 2
Reputation: veggen is an unknown quantity at this point 
Solved Threads: 0
veggen veggen is offline Offline
Newbie Poster

Need help to build a query

 
0
  #1
Nov 15th, 2007
I'm having trouble with the following scenario:
drivers may have any of the 16 types of certificates, tasks may require any of the 16 types as well. What I need to do is build a query that will selectd all the tasks a certain driver can perform.
Example:
driver has these certificates: A,B,C,C1,C1E
so he can perform tasks that require any of these certs or any combination of certs (ie. only A, only B, both A and B, A and C1E, A,B and C1 etc).

I already have come up with a solution (which makes every possible combination), but it is very complicated and works well only with a smaller number of certificates, but with 16 (as it is the case) it requires more memory then it is available...

Any idea how to make a more efficient query?

Thanks for the time
Last edited by veggen; Nov 15th, 2007 at 1:27 pm.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 376
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: Need help to build a query

 
0
  #2
Nov 15th, 2007
You would have to go for a 'dynamic solution' where you are not guaranteed to hit the optimal solution.

A good example would be Dijkstra's shortest path finding algo.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2
Reputation: veggen is an unknown quantity at this point 
Solved Threads: 0
veggen veggen is offline Offline
Newbie Poster

Re: Need help to build a query

 
0
  #3
Nov 16th, 2007
Thanks, I'll look into it.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC