🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.soft-sys.powerbuilder
3 messages
3 total messages Started by jayvee Fri, 02 Oct 1998 00:00
Title Search??
#45
Author: jayvee
Date: Fri, 02 Oct 1998 00:00
53 lines
1939 bytes


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    
Re: Title Search??
#46
Author: royle
Date: Fri, 02 Oct 1998 00:00
65 lines
2573 bytes
Well, you can always do a search for ' ' + word + ' ', but that won't catch
words at the end or beginning of the sentence.  You could write an
explode() function and filter the things through that.
An explode() function takes a string and turns it into an array based on a
delimiter, so given a string suchas "The PowerBuilder for DOS", if you did:

  explode( my_string, " ", my_array )
my_array would wind up with:
  "The", "PowerBuilder", "for", "DOS"
At which point you could search the array for what you want.

 -Matt

jayvee@mayon.cats.edu.ph wrote:

> 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
Re: Title Search??
#47
Author: Joseph M. Morgan
Date: Fri, 02 Oct 1998 00:00
74 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads