View Full Version : prevent same text of title

03-26-2009, 10:23 AM
the table of submited articles:

key key

id language title
1 sl
2 en horse
3 sl
4 en horse

since there is no key on title column and even if there it would be one, there would be no difference, the records as they are, are taken as legal from databse point of wiev.

From logical stand point this is not ok (record 2 and 4), don't want to allow same title for two artcles in same language.

Any other suggestion except throwing away id column :)

03-26-2009, 03:51 PM
put a unique key across (language,title) that prevents the same title for the same language