If you are just looking for exact matches, then a non-SQL database like DB_File (the tied-hash interface) is probably adequate; if not, then a SQL database using 1 table, 1 column, and an index. Then of course you have to develop processes to update the database and keep in sync with the text files.