regex - Advice about database design with tokens -


if going create app alerts, users can post little messages traffic, crimes, , other news, how difficult and/or if implement sort of compiler analyze each piece of msg, , categorize in sections crime/murder or traffic/reallyslow.

i think easier approach obligate user select appropriate category more appropriate:

create table alert{    id_alert int not null primary key auto_increment,    alert varchar(255),    id_sub_category,    foreign key(id_sub_category) references sub_category(id_sub_category) }  create table sub_category{    id_sub_category int not null primary key auto_increment,    sub_category varchar(45),     id_category,    foreign key(id_category) references category(id_category) }  create table category{    id_category int not null primary key auto_increment,    category  varchar(45),    } 

i need advice how difficult implement first approach

the database design seems appropriate enough, not knowing final solution needed.

your ultimate question has nothing database design however. seem need create kind of algorithm interpret raw user input event , automatically classify according kind of keywords. not trivial exercise , error prone.

you correct easier, , more accurate, approach have user self select categories. best user experience since because expecting type of reports anyways, user right classification few presses instead of typing out descriptions.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -