You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Jamil Atta Junior Atta <at...@gmail.com> on 2010/07/19 22:15:14 UTC

Get metadata from two database

Hi,

I want to get metadata from two database without two connections and I don't
know if it is possible using views???

thanks,

Jamil Atta Junior
Analista/Programador
Organização Pan-Americana da Saúde (Bireme/Scielo)
Rua Botucatu, 862 - 04023-901 - São Paulo/SP - Brasil
http://www.opas.org.br
atta.jamil@gmail.com

Re: Get metadata from two database

Posted by Jamil Atta Junior Atta <at...@gmail.com>.
What you means?

2010/7/21 Moore, Lorenzo <Lo...@dhs.gov>

> unsubscribe
>
> -----Original Message-----
> From: user-return-11603-Lorenzo.Moore=dhs.gov@couchdb.apache.org [mailto:
> user-return-11603-Lorenzo.Moore=dhs.gov@couchdb.apache.org] On Behalf Of
> Jamil Atta Junior Atta
> Sent: Wednesday, July 21, 2010 6:28 AM
> To: user@couchdb.apache.org
> Subject: Re: Get metadata from two database
>
> I'm doing a migration and the older database in the same format for test
> using couchdb and I try to continue the same structure.
>
> cheers
> Jamil Atta Junior
>
> 2010/7/21 Dave Cottlehuber <da...@muse.net.nz>
>
> > > Jamil Atta Junior Atta wrote:
> >
> > >> 1. I have a database1 and daabase2;
> > >>
> > >> 2. I get all metadata from this database1;
> > >>
> > >> 3. but another information is in database2 (Today I open another
> > connection
> > >> to database2 send a key to get this information);
> >
> > so what's the use case driving you to segregate data into separate
> couches?
> >
> > cheers
> > Dave
> >
>
>
>
> --
> Atenciosamente,
>
> Jamil Atta Junior
> Analista/Programador
> Organização Pan-Americana da Saúde (Bireme/Scielo)
> Rua Botucatu, 862 - 04023-901 - São Paulo/SP - Brasil
> http://www.opas.org.br
> atta.jamil@gmail.com
>



-- 
Atenciosamente,

Jamil Atta Junior
Analista/Programador
Organização Pan-Americana da Saúde (Bireme/Scielo)
Rua Botucatu, 862 - 04023-901 - São Paulo/SP - Brasil
http://www.opas.org.br
atta.jamil@gmail.com

Re: Get metadata from two database

Posted by Jamil Atta Junior Atta <at...@gmail.com>.
What you means?

2010/7/21 Moore, Lorenzo <Lo...@dhs.gov>

> unsubscribe
>
> -----Original Message-----
> From: user-return-11603-Lorenzo.Moore=dhs.gov@couchdb.apache.org [mailto:
> user-return-11603-Lorenzo.Moore=dhs.gov@couchdb.apache.org] On Behalf Of
> Jamil Atta Junior Atta
> Sent: Wednesday, July 21, 2010 6:28 AM
> To: user@couchdb.apache.org
> Subject: Re: Get metadata from two database
>
> I'm doing a migration and the older database in the same format for test
> using couchdb and I try to continue the same structure.
>
> cheers
> Jamil Atta Junior
>
> 2010/7/21 Dave Cottlehuber <da...@muse.net.nz>
>
> > > Jamil Atta Junior Atta wrote:
> >
> > >> 1. I have a database1 and daabase2;
> > >>
> > >> 2. I get all metadata from this database1;
> > >>
> > >> 3. but another information is in database2 (Today I open another
> > connection
> > >> to database2 send a key to get this information);
> >
> > so what's the use case driving you to segregate data into separate
> couches?
> >
> > cheers
> > Dave
> >
>
>
>
> --
> Atenciosamente,
>
> Jamil Atta Junior
> Analista/Programador
> Organização Pan-Americana da Saúde (Bireme/Scielo)
> Rua Botucatu, 862 - 04023-901 - São Paulo/SP - Brasil
> http://www.opas.org.br
> atta.jamil@gmail.com
>



-- 
Atenciosamente,

Jamil Atta Junior
Analista/Programador
Organização Pan-Americana da Saúde (Bireme/Scielo)
Rua Botucatu, 862 - 04023-901 - São Paulo/SP - Brasil
http://www.opas.org.br
atta.jamil@gmail.com

RE: Get metadata from two database

Posted by "Moore, Lorenzo" <Lo...@dhs.gov>.
unsubscribe

-----Original Message-----
From: user-return-11603-Lorenzo.Moore=dhs.gov@couchdb.apache.org [mailto:user-return-11603-Lorenzo.Moore=dhs.gov@couchdb.apache.org] On Behalf Of Jamil Atta Junior Atta
Sent: Wednesday, July 21, 2010 6:28 AM
To: user@couchdb.apache.org
Subject: Re: Get metadata from two database

I'm doing a migration and the older database in the same format for test
using couchdb and I try to continue the same structure.

cheers
Jamil Atta Junior

2010/7/21 Dave Cottlehuber <da...@muse.net.nz>

> > Jamil Atta Junior Atta wrote:
>
> >> 1. I have a database1 and daabase2;
> >>
> >> 2. I get all metadata from this database1;
> >>
> >> 3. but another information is in database2 (Today I open another
> connection
> >> to database2 send a key to get this information);
>
> so what's the use case driving you to segregate data into separate couches?
>
> cheers
> Dave
>



-- 
Atenciosamente,

Jamil Atta Junior
Analista/Programador
Organização Pan-Americana da Saúde (Bireme/Scielo)
Rua Botucatu, 862 - 04023-901 - São Paulo/SP - Brasil
http://www.opas.org.br
atta.jamil@gmail.com

Re: Get metadata from two database

Posted by Jamil Atta Junior Atta <at...@gmail.com>.
I'm doing a migration and the older database in the same format for test
using couchdb and I try to continue the same structure.

cheers
Jamil Atta Junior

2010/7/21 Dave Cottlehuber <da...@muse.net.nz>

> > Jamil Atta Junior Atta wrote:
>
> >> 1. I have a database1 and daabase2;
> >>
> >> 2. I get all metadata from this database1;
> >>
> >> 3. but another information is in database2 (Today I open another
> connection
> >> to database2 send a key to get this information);
>
> so what's the use case driving you to segregate data into separate couches?
>
> cheers
> Dave
>



-- 
Atenciosamente,

Jamil Atta Junior
Analista/Programador
Organização Pan-Americana da Saúde (Bireme/Scielo)
Rua Botucatu, 862 - 04023-901 - São Paulo/SP - Brasil
http://www.opas.org.br
atta.jamil@gmail.com

Re: Get metadata from two database

Posted by Dave Cottlehuber <da...@muse.net.nz>.
> Jamil Atta Junior Atta wrote:

>> 1. I have a database1 and daabase2;
>>
>> 2. I get all metadata from this database1;
>>
>> 3. but another information is in database2 (Today I open another connection
>> to database2 send a key to get this information);

so what's the use case driving you to segregate data into separate couches?

cheers
Dave

Re: Get metadata from two database

Posted by Nils Breunese <N....@vpro.nl>.
Jamil Atta Junior Atta wrote:

> so  can't we use couchdb like in SQL that we use join to get union from two
> tables?

You can, but views are constrained to a database. Just like SQL joins are constrained to a single database AFAIK. CouchDB doesn't have the concept of tables, but a common pattern is to store documents of different types in a single database. You can combine them any way you want in a view.

> Explain:
> 1. I have a database1 and daabase2;
>
> 2. I get all metadata from this database1;
>
> 3. but another information is in database2 (Today I open another connection
> to database2 send a key to get this information);
>
> I'm asking if is possible have one view to get all the information in one
> return to my .php, today I open two connections.

No, it's not possible, since queries can not span multiple databases. But maybe you can store all information in a single database? Otherwise you will need to do multiple queries.

Nils.

De informatie vervat in deze  e-mail en meegezonden bijlagen is uitsluitend bedoeld voor gebruik door de geadresseerde en kan vertrouwelijke informatie bevatten. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is voorbehouden aan geadresseerde. De VPRO staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden e-mail, noch voor tijdige ontvangst daarvan.

Re: Get metadata from two database

Posted by Jamil Atta Junior Atta <at...@gmail.com>.
Hi Chris,

so  can't we use couchdb like in SQL that we use join to get union from two
tables?

Explain:
1. I have a database1 and daabase2;

2. I get all metadata from this database1;

3. but another information is in database2 (Today I open another connection
to database2 send a key to get this information);

I'm asking if is possible have one view to get all the information in one
return to my .php, today I open two connections.

Thanks,

Jamil Atta Junior

2010/7/19 J Chris Anderson <jc...@gmail.com>

>
> On Jul 19, 2010, at 1:15 PM, Jamil Atta Junior Atta wrote:
>
> > Hi,
> >
> > I want to get metadata from two database without two connections and I
> don't
> > know if it is possible using views???
> >
>
> not really. you could:
>
> a) merge the databases using replication
> b) use some of the parts of couchdb-lounge to build a view merger
>
> > thanks,
> >
> > Jamil Atta Junior
> > Analista/Programador
> > Organização Pan-Americana da Saúde (Bireme/Scielo)
> > Rua Botucatu, 862 - 04023-901 - São Paulo/SP - Brasil
> > http://www.opas.org.br
> > atta.jamil@gmail.com
>
>


-- 
Atenciosamente,

Jamil Atta Junior
Analista/Programador
Organização Pan-Americana da Saúde (Bireme/Scielo)
Rua Botucatu, 862 - 04023-901 - São Paulo/SP - Brasil
http://www.opas.org.br
atta.jamil@gmail.com

Re: Get metadata from two database

Posted by J Chris Anderson <jc...@gmail.com>.
On Jul 19, 2010, at 1:15 PM, Jamil Atta Junior Atta wrote:

> Hi,
> 
> I want to get metadata from two database without two connections and I don't
> know if it is possible using views???
> 

not really. you could:

a) merge the databases using replication
b) use some of the parts of couchdb-lounge to build a view merger

> thanks,
> 
> Jamil Atta Junior
> Analista/Programador
> Organização Pan-Americana da Saúde (Bireme/Scielo)
> Rua Botucatu, 862 - 04023-901 - São Paulo/SP - Brasil
> http://www.opas.org.br
> atta.jamil@gmail.com