Database Structure
The transaction_detail table entries can be searched by using a search term submitted by the user. The keywords column includes search terms such as description and customer name and are inserted when a new record is added. Then the keywords column is checked for any matches with the search term.
Person table
+----+------+
| ID | NAME |
+----+------+
| 12 | Mike |
+----+------+
Transaction_detail Table
+----+--------------------------+-----------------+---------------------------+
| ID | DESCRIPTION | CUSTOMER_ID(FK) | KEYWORDS |
+----+--------------------------+-----------------+---------------------------+
| 55 | Delivery from ABC Stores | 12 | ABC stores, delivery,mike |
+----+--------------------------+-----------------+---------------------------+
Scenario
When the customer name(Mike) is changed, it is necessary to update the keyword column in every row with the Customer_id 12.
However when the Transaction_details table has a few hundreds of rows this method becomes quite inefficient. Can someone tell me another way to improve the searching for a record in the table.
As @Niko said, this should be stored in another table ( or two ):
Keywords table
Person-to-keywords table
Then, when you want to know what keyword goes to witch person, just join them on the IDs and you will get your list.