For Searching the huge database for a string best approach will be get strings and build Tries and then search the data in Tries Data Structure.