February 7, 2005 at 9:59 am
Hi
I'm tryng to connect this 3 simple tables:
1. employee (EmpID (PK),EmpRoomNum(FK Rooms),...)
2. Rooms(RoomNum(PK), ...)
3. Device (DevID(PK),DeVRoomNum(FK Rooms), DevSignByEmp(FK employee),.)
I See No reason why cant I connect these tables ?
Where is the cycles or multiple cascade paths ???
Thanks
February 7, 2005 at 11:21 pm
I'm not sure, but I suspect that it has to do with there been 2 ways to cascade a delete or update from Rooms to Device
(Rooms->Device), (Rooms->Employee->Device)
You should be able to create the link Device-Employee if you make it non-cascading.
If your IDs are identity, then there should be no need to cascade updates at all, and (from what I can tell) you wouldn't want a cascade delete there.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 8, 2005 at 6:42 am
My Id's Are not Identityes And i cant make them Identityes.
U R right abut the delete cascade but I do need the update cscade!
any other ideas ?
February 8, 2005 at 7:29 am
Well it's not a particuarly good idea to modify primary keys in the first place. Why is it necessary to mod the pk? If the pk is changed, are there any fields that will stay the same
I could suggest an Update trigger to correct the fk in device.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply