Article View: comp.soft-sys.powerbuilder
Article #47Re: Title Search??
From: Joseph M. Morgan
Date: Fri, 02 Oct 1998 00:00
Date: Fri, 02 Oct 1998 00:00
74 lines
2905 bytes
2905 bytes
If you are needing to perform a pure word search against a list of free-style titles or phrases in a DB, it looks as though you're on the right path. There are many ways to kludge SQL to get the results you want... like spending a lot of time dynamically changing SQL in powerscript or making your search perform a sequential scan against your data for every possible word.... but there is no reason to make it hard on yourself. I had a similar situation once where the table containing my titles contained over 200,000 entries. Imagine how long it would have taken to get the SQL to return the results if I hadn't have indexed the words! How would you build an index, for example, on a column where the index has some kind of dynamic offset into your phrase? The fact of the matter is... you can't! Your solution is right on track. Keep going! Joe Morgan jayvee@mayon.cats.edu.ph wrote in message <6v1ti4$a8g$1@nnrp1.dejanews.com>... > > > >I would like to ask some hints about SEARCHING... >This is about Library Management System. > >Let's say I have the following in titles in the database: > >1 "The PowerBuilder for DOS" >2 "An Introduction to Database and SQL" >3 "Advance Newbie" >4 "Accelerate into C++ Programming" >5 "C++ for Dummies" > >When the user search for: > >"PowerBuilder" Displays(1) >"SQ" No result >"SQL" Displays(2) >"C++" Displays(4,5) > >(Also I will be filtering : A, An, The, Is, For, blah blah.. To get > only the root word) > >I don't think I can achive this with that set of data. I'm planing to >add another table to store the choped version of the title. > >Something like this: > >1:PowerBuuilder >1:Dos >2:Introduction >2:Database >2:SQL >3:Advance >3:Newbie >4:Accelerate >4:C++ >4:Programming >5:C++ >5:Dummies > >With this I can do an IN clause or a series of AND blah.. AND blah... > >Is this OK?? Or I'm getting into confusion. Please put me into >the right path... Or maybe give me some link about this topic. > >Thank you very much. > >(please respond by e-mail) > >-----------== Posted via Deja News, The Discussion Network ==---------- >http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<6v2lfv$dii$1@excalibur.flash.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6v1ti4$a8g$1@nnrp1.dejanews.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111366,92b5b71610a48eeb X-Google-Attributes: gid111366,public X-Google-Thread: 10288e,92b5b71610a48eeb X-Google-Attributes: gid10288e,public From: "Joseph M. Morgan" <jmorgan@gr.com> Subject: Re: Title Search?? Date: 1998/10/02 Message-ID: <6v2lfv$dii$1@excalibur.flash.net> X-Deja-AN: 397038606 Sender: morganj1@206.215.52.2 References: <6v1ti4$a8g$1@nnrp1.dejanews.com> Organization: Flashnet Communications, http://www.flash.net X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Newsgroups: comp.soft-sys.powerbuilder,borland.public.cppbuilder.database