Search Engine

This is just a questin, probably way out of my league. But what is it called when you have a search engine within your website where someone could enter keywords and bring up links to get to that page on your site. Just like a yahoo search engine. Is it possible in flash? If so is there a way to read up on how to do this or books on it. Would i have to make a database?