What are ways search engines access there databases? small php and perl search engine's I've seen make cache of all the words a URL has, then searches all the cache for the requested term(s)... Are there other ways search engines do this? It can't be the best way..
AFAIK, that's the way they all do it. They build a list of all the terms in a document, compiling a list of all documents containing a term. When a term is searched for, they use this index to return a list of documents containint the term.
So do all just have a list like:? URL - word word word... URL - word word word... URL - word word word... ... this means they have to search the whole DB to see if a search term is in the DB.