Monday, March 19, 2012

create relationship between tables in different databases??

Hi!
I have two databases. They represent two different systems. Now the two
systems will be merged in many ways. This means that there will now be
need for relations between tables in the two databases. I have existing
database diagrams for both, but is there a way to add tables in a
diagram from another database on the same sql server' Or should I just
have all the tables in one database' Any suggestions would be
appretiated!
Thanks
Henning :-)
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!You cannot diagram over several databases, nor can you define relationships
(foreign keys) cross
database. If you want to enforce referential integrity cross database, you c
an do it using triggers.
Or, as you say, another option is to put all objects into one database. Whet
her that is the best
thing to do or not is difficult to asses over a newsgroup post.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"kongsballa" <kongsgballa@.devdex.com> wrote in message news:eET3QYFBFHA.1396@.tk2msftngp13.p
hx.gbl...
> Hi!
> I have two databases. They represent two different systems. Now the two
> systems will be merged in many ways. This means that there will now be
> need for relations between tables in the two databases. I have existing
> database diagrams for both, but is there a way to add tables in a
> diagram from another database on the same sql server' Or should I just
> have all the tables in one database' Any suggestions would be
> appretiated!
> Thanks
> Henning :-)
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!|||Hi Tibor, and thanks for the quick response!
I guess there are a lot of pros and cons wether too have one or two
databases. The total size of the databases are no more than 500 MB, and
I would really like to see the day it reaches 1 GB. Having said that,
can you give me a hint or some place where this has been discussed'
Henning :-)
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||Hej Henning,
These are small databases, so that is IMO not a factor. I'd like to say as a
rule of thumb that if
the data is related, then go for one database. One practical thing to consid
er is backup. Having
several databases mean that backup of all data will not be a snapshot in tim
e (you first do one
database, then next). I'd search the Google archives (see my web-site) as th
is topic has been
discussed here before.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"kongsballa" <kongsgballa@.devdex.com> wrote in message news:uMeUPNGBFHA.3592@.TK2MSFTNGP09.p
hx.gbl...
> Hi Tibor, and thanks for the quick response!
> I guess there are a lot of pros and cons wether too have one or two
> databases. The total size of the databases are no more than 500 MB, and
> I would really like to see the day it reaches 1 GB. Having said that,
> can you give me a hint or some place where this has been discussed'
> Henning :-)
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!|||Tjna Tibor!
Thanks again. I will look around for information on the subject. Have a
nice day in Sweden!
Henning :-)
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!

No comments:

Post a Comment