471,083 Members | 1,205 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,083 software developers and data experts.

Table relationships

Hi,
Does anyone have any suggestions on the best to go about enforcing a
relationship between two tables that exist within separate databases
on the same SQL Server instance.
Jul 20 '05 #1
7 5607
Hi

You could do this using a instead of trigger or using a check constraint and
function. The latter may not perform that well.

John

"Paul" <pa***************@hotmail.com> wrote in message
news:19**************************@posting.google.c om...
Hi,
Does anyone have any suggestions on the best to go about enforcing a
relationship between two tables that exist within separate databases
on the same SQL Server instance.

Jul 20 '05 #2
Hi

You could do this using a instead of trigger or using a check constraint and
function. The latter may not perform that well.

John

"Paul" <pa***************@hotmail.com> wrote in message
news:19**************************@posting.google.c om...
Hi,
Does anyone have any suggestions on the best to go about enforcing a
relationship between two tables that exist within separate databases
on the same SQL Server instance.

Jul 20 '05 #3
Hi

The second query should show them, but the problem would be that all
possible combinations will be shown.

As there is not a fixed number of exams that may be either the min or max,
the best solution is to do the transformations on the client.

John

"Paul" <pa***************@hotmail.com> wrote in message
news:19**************************@posting.google.c om...
Hi,
Does anyone have any suggestions on the best to go about enforcing a
relationship between two tables that exist within separate databases
on the same SQL Server instance.

Jul 20 '05 #4
Hi

The second query should show them, but the problem would be that all
possible combinations will be shown.

As there is not a fixed number of exams that may be either the min or max,
the best solution is to do the transformations on the client.

John

"Paul" <pa***************@hotmail.com> wrote in message
news:19**************************@posting.google.c om...
Hi,
Does anyone have any suggestions on the best to go about enforcing a
relationship between two tables that exist within separate databases
on the same SQL Server instance.

Jul 20 '05 #5
Thanks John,
That's pretty much the kind of response I was expecting.
I just wanted to make sure that I wasn't missing out an alternative
route.

The only draw-back I can see to using triggers is related to
maintenance, but that is a draw-back that I can live with.

Paul

pa***************@hotmail.com (Paul) wrote in message news:<19**************************@posting.google. com>...
Hi,
Does anyone have any suggestions on the best to go about enforcing a
relationship between two tables that exist within separate databases
on the same SQL Server instance.

Jul 20 '05 #6
Thanks John,
That's pretty much the kind of response I was expecting.
I just wanted to make sure that I wasn't missing out an alternative
route.

The only draw-back I can see to using triggers is related to
maintenance, but that is a draw-back that I can live with.

Paul

pa***************@hotmail.com (Paul) wrote in message news:<19**************************@posting.google. com>...
Hi,
Does anyone have any suggestions on the best to go about enforcing a
relationship between two tables that exist within separate databases
on the same SQL Server instance.

Jul 20 '05 #7
Hi

If you have done the analysis fully I thing trigger code is less
likely to change than any other area. If your documentation is up to
scratch then everyone should realise they are there! The actual coding
of them is not really very different to any stored procedure.
Therefore I would not be too worried about it.
John

pa***************@hotmail.com (Paul) wrote in message news:<19**************************@posting.google. com>...
Thanks John,
That's pretty much the kind of response I was expecting.
I just wanted to make sure that I wasn't missing out an alternative
route.

The only draw-back I can see to using triggers is related to
maintenance, but that is a draw-back that I can live with.

Paul

pa***************@hotmail.com (Paul) wrote in message news:<19**************************@posting.google. com>...
Hi,
Does anyone have any suggestions on the best to go about enforcing a
relationship between two tables that exist within separate databases
on the same SQL Server instance.

Jul 20 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

21 posts views Thread by Dan | last post: by
4 posts views Thread by Neil Ginsberg | last post: by
1 post views Thread by Gandalf | last post: by
117 posts views Thread by phil-news-nospam | last post: by
3 posts views Thread by anjee | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.