Click to See Complete Forum and Search --> : Word Indexing


BrewGuru99
October 6th, 1999, 03:52 AM
Can someone please explain how a "word index" works?
(See my previeous post, something about a cookie.)
I kindof understand it, but my mind draws blanks when I start trying to figure out the actual functionality of it.

Appreciated.

Chris Eastwood
October 6th, 1999, 03:21 PM
One way of implementing a word index is storing details in several different tables, eg.

Words Table
-----------

ID - Numeric
Word - String - Indexed

Article Table
-------------

ID - Numeric
Article_Text - String / Memo / Blob / Whatever

WordIndex Table
---------------

WordID - Numeric - Linked to 'Word' Table
ArticleID - Numeric - Linked to 'Article' Table

When you come to process each 'article', you need to split up the words, check if they exist in the word table, if so, create a new association in the WordIndex table.

This is a very generalised method, there are much more complex (and faster) ways around it.


Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

BrewGuru99
October 6th, 1999, 07:18 PM
Could you please point me in the direction where I could find out more about those faster ways?

Chris Eastwood
October 7th, 1999, 01:55 AM
I'd recommend one/all of the following :

1. Get a really good book on database design - if possible, try and get one on 'standard' sql, or one specifically for the database you'll be using.

2. Check out the database newsgroups, either the 'comp.' or 'microsoft.' ones should help. You may also want to search previous newsgroups at http://www.deja.com

3. Do a little surfing on the net - there's plenty of sites out there for database design/implementation.

Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb