Subject Re: Dynamic Variable Instantiation Within A Stored Procedure
Author Adam
> >
> :-)
> I was talking about the "Word x Record" table, it will have a lot of
> duplicates since a lot of records will have the word "Alexandre" for
> example.


Yes, the problem you will face here is there will be a foreign key to
the words table, and because there have got to be no less than 100000
books with the title "Alexandre" in any collection, you are not going
to be able to use the PK at the end work around I don't think.

I imagine you could create a wordexception table, where the word is
only added to words if it is not in the wordexception table. Using
this approach, common words like Alexandre will not influence search

The import could be done with nothing in the word exception table.

Then a query like

select first 100 w.value, count(*)
from words w
join bookword bw on ( = bw.wordsid)
group by w.value
having count(*) > 10
order by 2 desc

Would start to give you some idea about which words should be
considered exceptions.