PROC addAuthor( @name varchar )
IF EXISTS (SELECT * FROM authors WHERE author_name = @name )
RAISEERROR('not allowed two authors with same name')
INSERT INTO authors(author_name) values(@name)
Now... As you can see, I ensure that no two authors have the same name.
Would it be better if I did that check within a TRIGGER for that table?? Or is it fine where I have it?
You also have to consider that in a multi-user environment, what is true at one point in time is not necessarily true at another. Doing it your way there is always an outside chance of the uniqueness changing between the check & the insert. No such problems with a UC.