database of quotations

  • Thread starter Thread starter Doug C
  • Start date Start date
D

Doug C

I want to keep a simple database of quotations, but I'm having trouble
working out the best way to index them with keywords. So for example, "To be
or not to be" won't need indexing by either Shakespeare or Hamlet, since
that will be covered in author and title fields in an Book table, but it
will need keywords for say, death and sleep. What's the best way to add
keywords for searching on particular topics?

Doug C
 
Doug,
I would think a Keyword table associated with a Quotes table (One quote to Many
keywords) would be the best way to go.
QuoteID Quote
153 "To be or....

QuoteID Keyword
153 Sleep
153 Death
153 Slings
153 Arrow etc...
 
I'd think you'd want a table of keywords:

KeywordId Keyword
12 Sleep
14 Death
236 Slings
446 Arrow

and then have an intersection table to handle the many-to-many relationship
between quotes and keywords:

KeywordId QuoteID
12 153
14 153
236 153
446 153
 
Back
Top