December 29, 2003 at 5:08 am
Hello
I have tables Employee, engineer, and programmer. I want to create a "is a" relationship. So that the engineer and programmer table will be an "is a" relationship of the employee. I am not sure how to implement this in sql server.
many thanks in advance
Steve
December 29, 2003 at 5:24 am
Sorry, if I understand you correct, why do you have three tables at all?
Isn't a programmer at the same time also an employee?
However, is this what you're after
ALTER TABLE SpezialfondsKurse
ADD CONSTRAINT c_Spezialfonds FOREIGN KEY
(
kaid
)REFERENCES Kapitalanlagen (id)
ON DELETE CASCADE
ON UPDATE CASCADE
GO
Frank
Edited by - Frank Kalis on 12/29/2003 05:24:45 AM
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 29, 2003 at 6:09 am
Thanks for you reply.
Yes l do need the 3 tables, as a programmer "is a" employee and engineer "is a" employee. The programmer and engineer both inherit from the employee table.
I was hopping you could tell me how to do this using the SQL Enterprize manager.
Many thanks in advance
Steve
December 29, 2003 at 6:13 am
- Open your table in design view
- Right-click on properties
- Choose Relations (?!? Sorry, in german its' called Beziehungen) tab
- Add new
- Fill in the required informations as Parent and Child Table, columns in both tables...
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 29, 2003 at 7:16 am
Hello
Thanks for you help.
Steve
December 30, 2003 at 11:45 am
You should only need two tables a job_description table (i.e. Engineer, programmer, tester, etc) and an employees table that stores the foreign key from the job_description table.
Edward M. Sokolove
Edward M. Sokolove
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply