Re: Multiple database search

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 33833
interpreted = N
texte = Kevin -I think the problem is your database design, rather than your search. Without knowing more about your data, I can only give broad suggestions, but it appears to me you want to normalize your database one more step. That is just a fancy way of saying that you should create a new database consisting of just the SKU and SubjectCode(s) for each item. Some items will have more than one record; others will have just the one. Then the top level search does a summary on SubjectCode and the [founditems] does a lookup to the subjcode.db for the description.Then when you want to return the items which correspond to a given subject code, you key off the new database and do the lookup against the products.db for all of the other information.Anytime you have multiple fields containing the same type of information contained in a single record, it is more efficient to split that off to another database that just contains the SKU and multiple records of each subtype.HTHJohn PeacockKevin Lippert wrote: > > I have a multiple database search problem I can't figure out. > > A product is described by up to 6 different codes, and I want to display > all the codes from the product database, sorted by a code description > that is looked up from a second database. > > If a product is described by codes S1 to S6: > [search > db=products.db&group1field=S1+S2+S3+S4+S5+S6>group1data=&group1summ=T&asg > roup1sort=1] > > But I can't lookup the founditems based on group1; what I'd like to do is > something like: > [founditems] > [lookup > db=subjcode.db&value=[group1]&lookinfield=subjcode&returnfield=description] > > [/founditems] > > to give me a summarized list of code descriptions sorted by their > description. > > Is there anyway to do this without writing the [founditems] to a > temporary database, resorting, and looking them up from there? > > Thanks in advance, > > Kevin Lippert > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > Web Archive of this list is at: http://search.smithmicro.com/------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Multiple database search q -- Web Catalog 2.1 (John Peacock 2000)
  2. Multiple database search q -- Web Catalog 2.1 (Christopher Feyrer 2000)
  3. Re: Multiple database search (John Peacock 2000)
  4. Re: Multiple database search (Aaron Lynch 2000)
  5. Multiple database search (Kevin Lippert 2000)
Kevin -I think the problem is your database design, rather than your search. Without knowing more about your data, I can only give broad suggestions, but it appears to me you want to normalize your database one more step. That is just a fancy way of saying that you should create a new database consisting of just the SKU and SubjectCode(s) for each item. Some items will have more than one record; others will have just the one. Then the top level search does a summary on SubjectCode and the [founditems] does a lookup to the subjcode.db for the description.Then when you want to return the items which correspond to a given subject code, you key off the new database and do the lookup against the products.db for all of the other information.Anytime you have multiple fields containing the same type of information contained in a single record, it is more efficient to split that off to another database that just contains the SKU and multiple records of each subtype.HTHJohn PeacockKevin Lippert wrote: > > I have a multiple database search problem I can't figure out. > > A product is described by up to 6 different codes, and I want to display > all the codes from the product database, sorted by a code description > that is looked up from a second database. > > If a product is described by codes S1 to S6: > [search > db=products.db&group1field=S1+S2+S3+S4+S5+S6>group1data=&group1summ=T&asg > roup1sort=1] > > But I can't lookup the founditems based on group1; what I'd like to do is > something like: > [founditems] > [lookup > db=subjcode.db&value=[group1]&lookinfield=subjcode&returnfield=description] > > [/founditems] > > to give me a summarized list of code descriptions sorted by their > description. > > Is there anyway to do this without writing the [founditems] to a > temporary database, resorting, and looking them up from there? > > Thanks in advance, > > Kevin Lippert > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > Web Archive of this list is at: http://search.smithmicro.com/------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Strange search... (2001) two domains and one cart and database (2000) founditems and setheader (2000) taxTotal, grandTotal (1997) encrypt/decrypt - are docs correct?? (2002) placement of ? (2000) WebMerchant 1.6 and SHTML (1997) Re:no [search] with NT (1997) Bug Report, maybe (1997) How do I get Google to crawl a WebCat site? (2003) hmmm (2006) Credit Card Checking?? (1998) [WebDNA] Install/config issue: WebDNA-MacTel-6.2>OS X Server (2009) Authorize.net for dummies (2003) BBEdit WedDNA Codeless Language Module (2007) Re:Emailer and encryption (1997) Execute Applescript (1997) Requiring that certain fields be completed (1997) writing orders to a db (1997) WebCat2 - Getting to the browser's username/password data (1997)