Are you talking about searching just your site or searching the web?
A database is generally going to be the preferred option, but if you're only searching a small amount of pages you can set up a text file or an xml file or something other than a database to record the data.
On the scale of Google and Yahoo it's more like a whole lot of databases.
__________________ l Search Engine Friendly Web Design | Please login or register to view this content. Registration is FREE
l Tips On Marketing, SEO, Design, and Development | Please login or register to view this content. Registration is FREE
I'd imagine Google, Yahoo etc have warehouses of databases XD Creating your own search engine is a fairly stupid idea, first off there are already way too many out there (certainly to compete against) and secondly I'd like to see anyone try and make their own search engine - doesn't seem like an easy task in any way.
But if you want to search your own website google have a tool that allows you to search your site and the web too. But you can get scripts to search your site only if need be.