I'm looking for some help from experienced coders. it may be better to post in a database forum but I am sure you guys have come across this problem before and have solutions.
situation
I have designed an email management module for a professional practice management system. sort of an enhanced CRM system.
All emails are ingested by the module and need to be 'filed' against the right project.
Recognition on sender name or receiver name is not possible as there is a many to many relationship between projects and both name criteria.
Instead recognition is done on an hierarchical basis:
if there is a unique project identifier in the email body then recognise on that.
otherwise recognise on keywords.
keywords are stored in a database against each project.
the first stage of the processing is to scan the email for the project ID. if that is found then no problem.
There are approximately 500 active projects at any one time. Each project has about 5 (unique) keywords. There are about 250 emails per day across the projects.
Question
My question is, what is the best way to process the second limb? Examples are:
* multiple strpos() calls on an iteration of the recordset of all keywords on all projects
* some db query (note that the email body actually does not live in a database until later in its life cycle. But a temp table can be easily created for this kind of manipulation).
* something else.
whichever way I look at it, i get a hellish looking piece of processing that i will definitely want to hand off to a some forked process. I can't help thinking that there is a way to skin the cat though.
Your sage advice is appreciated.
thanks
Justin
situation
I have designed an email management module for a professional practice management system. sort of an enhanced CRM system.
All emails are ingested by the module and need to be 'filed' against the right project.
Recognition on sender name or receiver name is not possible as there is a many to many relationship between projects and both name criteria.
Instead recognition is done on an hierarchical basis:
if there is a unique project identifier in the email body then recognise on that.
otherwise recognise on keywords.
keywords are stored in a database against each project.
the first stage of the processing is to scan the email for the project ID. if that is found then no problem.
There are approximately 500 active projects at any one time. Each project has about 5 (unique) keywords. There are about 250 emails per day across the projects.
Question
My question is, what is the best way to process the second limb? Examples are:
* multiple strpos() calls on an iteration of the recordset of all keywords on all projects
* some db query (note that the email body actually does not live in a database until later in its life cycle. But a temp table can be easily created for this kind of manipulation).
* something else.
whichever way I look at it, i get a hellish looking piece of processing that i will definitely want to hand off to a some forked process. I can't help thinking that there is a way to skin the cat though.
Your sage advice is appreciated.
thanks
Justin