It is impossible to have a database relation between two fields in separate databases, however, you can do this of course with server side logic in your application code.
If you do, make sure you add a trigger to enforce referential integrity to make sure the relation can be made if it requires a field not to be null
Add Foreign Key relationship between two Databases
Create Trigger dbo.MyTableTrigger ON dbo.MyTable, After Insert, Update
As
Begin
If NOT Exists(select PK from OtherDB.dbo.TableName where PK in (Select FK from inserted) BEGIN
-- Handle the Referential Error Here
END
END