December 14, 2003 at 8:31 pm
Assume I have following three seperate employee tables: Accountant, Manager and Administrator. How can I add a constraint/Trigger (using SS_number) to make sure a employee can only work at one capacity (i.e. someone cannot be both an accountant and a manager)?
December 15, 2003 at 1:19 am
You should not use three different tables.
Put them in one table and add a column with their capacity.
You can add a table with the possible capacities and add a foreign key from your persons table to this table.
Please read articles and books about normalisation of relational databases.
Erik.
P.S. I don't think this is the right forum to post this question.
December 15, 2003 at 2:16 am
Yes, Erik is right, this might be a good start http://www.sqlservercentral.com/columnists/bkelley/normalization.asp .
And, yes, there are more appropriate forum categories like T SQL or General (works always
But unfortunately we can't move threads right now.
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply