473,396 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 5690
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Jeremy Weiss | last post by:
I'm trying to build a database that will handle the monthly billing needs of a small company. I'm charting everything out and here's what I see: table for customers sub table to track payments...
21
by: Dan | last post by:
Hi, just ran into my first instance of a backend Access97 database not compacting. I'm getting the "MSACCESS.EXE has generated errors.." message on compact. I've narrowed it down to the largest...
20
by: Ed | last post by:
I am running Access 2002 and just ran the built in Access wizard for splitting a database into a back end (with tables) and front end (with queries, forms, modules, etc.). After running the...
4
by: Neil Ginsberg | last post by:
I have ODBC linked tables to a SQL 7 database in an A2K database. The linked tables do not have the password stored in them, so the first time the user accesses them, they need to enter the SQL...
1
by: Gandalf | last post by:
I'm creating relationships between tables using VBA and ADOX. I can create one-to-one relationships with an inner join, but I can't figure out how to create these relationships with an outer join...
2
by: Hi5 | last post by:
Hi, I am working on a project in access 2000, Whilst I already have a table called client and seems to be related with other tables ,I tried making TBL client as lookup too, I ended up having...
4
by: Bri | last post by:
Hi, First let me explain the process I have going on, then I'll address the problems I'm having: 1) Insert records in a temp table using a query 2) Using a query that joins the temp table with...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
5
by: mark_aok | last post by:
Hi all, I have a situation where I have a split database. At the back end, I need to - create a new table (I will call it newTable) with the exact fields, and relationships as another table...
3
by: anjee | last post by:
Hello, Is it possible to create multiple foreign keys on a field in a table from values in two separate tables where the field value can be from one table OR the other? For example, I have an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.