im making a search engine in java and am using a database.
one table represents the documents that users will search this has the following fields
title, documentRef, IndexTerms, DocId
i was thinking PK here of DocId which will be auto numbered so unique.
IndexTerms is a list of index terms that should map the semantics of the document something like "happy, day, birth, jesus".
now i also have another table with the following fields that allows me to search through indexterms to find the docs i need
IndexTerm , DocIdList
here a single index term has many possibly documents. also my PK was going to be IndexTerm. My problem is that i want the functionality of both tables but am unsure how best to join them up considering that the ideal foreign key is locked up inside a list.
i have tried considering other datatypes but to no avail all help welcome and appreciated thanx