You can reference objects stored in table columns in one database from another database.
For example, assume the following configuration:
The Address class is installed in db1 and db2.
The emps table has been created in both db1 with owner Smith, and in db2, with owner Jones.
In these examples, the current database is db1. You can invoke a join or a method across databases. For example:
A join across databases might look like this:
declare @count int select @count(*) from db2.Jones.emps, db1.Smith.emps where db2.Jones.emps.home_addr>>zip = db1.Smith.emps.home_addr>>zip
A method invocation across databases might look like this:
select db2.Jones.emps.home_addr>>toString( ) from db2.Jones.emps where db2.Jones.emps.name = 'John Stone'
In these examples, instance values are not transferred. Fields and methods of an instance contained in db2 are merely referenced by a routine in db1. Thus, for across-database joins and method invocations:
db1 need not contain an Address class.
If db1 does contain an Address class, it can have completely different properties than the Address class in db2.