Link between 2 different database

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Link between 2 different database

Ubos
Hi friends,
I would like to know if it possible to relate two different databases that share one single variable.

For example VarX is present in database1 and database2, I need to use this key to compute some informations of database2 in database1.
Please consider that database1 and database2 have differents numbers of observations.

Thank you very much in advance.

Ubos
Reply | Threaded
Open this post in threaded view
|

Re: Link between 2 different database

PRogman
If varX is unique in one of the databases you can use it as a look-up table. Sort the data on that variable and the use MATCH FILES to add variables to your current data. The you can do your computations.

If VarX does not identify a unique record in either database you need more information on how to identify which record to link to. It is important to have a 1:n relation. If you have n:n (many:many)  you are in trouble...
/PR
Reply | Threaded
Open this post in threaded view
|

Re: Link between 2 different database

David Marso
Administrator
"If you have n:n (many:many)  you are in trouble... "
Not necessarily.
Could flatten one or both tables using CasesToVars or other then let the devil sort the mess out later!

PRogman wrote
If varX is unique in one of the databases you can use it as a look-up table. Sort the data on that variable and the use MATCH FILES to add variables to your current data. The you can do your computations.

If VarX does not identify a unique record in either database you need more information on how to identify which record to link to. It is important to have a 1:n relation. If you have n:n (many:many)  you are in trouble...
/PR
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Link between 2 different database

Ubos

Hello to all,
thank you very much indeed to informations.
I did not solved the problem to relate two databases that share a variable but with different numbers of observations using SPSS.
I solved the problem by using a data manager in which it is possible to create a relation between data.
Thanks a lot.