Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
vamsimahi
Starting Member
29 Posts |
Posted - 2008-04-21 : 19:15:11
|
| What ate the method/techniques i can use for enforcing referential integrity, Without using foreign key constraints ? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-04-21 : 19:20:18
|
| Triggers or via your application. Foreign key constraints are so much easier.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2008-04-25 : 04:32:19
|
and the actual constraints prevent orphaned data if you try to manage it via application and someone with direct access made some db changes (oh some emergency shrinkage of db size), there goes your logical constraintquote: Originally posted by tkizer Triggers or via your application. Foreign key constraints are so much easier.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/
--------------------keeping it simple... |
 |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2008-04-25 : 04:39:11
|
| What's preventing you from using FK constraints?Mark |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-04-25 : 04:40:08
|
Interview question. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
vamsimahi
Starting Member
29 Posts |
Posted - 2008-05-19 : 23:28:44
|
| Right !! that was a interview question... |
 |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2008-05-20 : 09:18:41
|
| Thats the sort of interview question where if a candidate answered too quickly I wouldn't hire them. Like, if I ask them to recite the syntax for declaring a cursor, opening it, stepping through it, closing it, and deallocating it, and they can do it from memory.....I probably don't want them writing code for me!e4 d5 xd5 Nf6 |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2008-05-20 : 09:22:26
|
| That's also the type of question where, if I was applying for a job and someone asked me that, I'd say: "Umm, on second thought, I don't think I am right for this job."- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
|
|
|
|
|
|