Not really an IRC guy, sorry.
Well basically you'd want somekind of interface to automatically add results into the system.
In that case, you'd need really ANY of the following:
A programming language that can interpret and process SQL queries (basically any SQL connection library + array support)
Somekind of interface to supply it with actions (your !search function would call one of those, another is "add result", "remove result" etc.)
Normalization methods (best if written on the programming language side of things)
Escape methods (you don't want people to do nasty shit to your database)
For example, all I've mentioned is pretty much built-into php.
The whole search system would work as following:
4 tables in db
Result:
ID (My ID)
Category_ID (ID of my category)
Data (Your info, can of course be more than 1 column)
Category:
ID (My ID)
Name (Category Name)
Tag:
ID (My ID)
Tag_String (My assigned string)
Tag_Assignments:
ID (My ID)
Tag_ID (Tag's ID)
Result_ID (Result's ID)
To quickly go over the two unexplained methods:
Add result:
1. Select / Make category
2. Get Category ID
3. Type in the result data, let's refer here to it as "Result Data"
The Result Data has to be first escaped (removing SQL stuff from the string) and then normalized (to lower characters, no special characters [unless you want them]) and then split into words
So if you'd input the Result Data as "A wild wolf"
The finished data from this would be an array, 3 strings "a", "wild" and "wolf"
After that is done, you insert your new Result and get it's ID
Let's say you get ID 42 on insert, after that you save it to a variable and then set up tags.
First off you have to check every single tag and see if it was created already.
So you do a call like
SELECT `ID` FROM `Tag` WHERE `Tag_String` = '---your word---'
If it returns a number - you add the tag assignment, so you call INSERT to `Tag_Assignments` with your Result ID (42) and Tag's ID. 1/2