You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by jaz1988 <88...@gmail.com> on 2012/06/14 07:02:19 UTC
Merge and combine different data from databases
Hi!
Currently I have a DB named myDB and myDB consists of a few tables in it.
Lets say I want to write to myDB from different computers concurrently(each
computer will have its own myDB), how do I merge and combine the DB from
each computer into 1 central DB at the end of the day?
Is there a proper way to it in Apache Derby?
Thanks!
--
View this message in context: http://old.nabble.com/Merge-and-combine-different-data-from-databases-tp34009833p34009833.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.
Re: Merge and combine different data from databases
Posted by Bryan Pendleton <bp...@gmail.com>.
> Currently I have a DB named myDB and myDB consists of a few tables in it.
> Lets say I want to write to myDB from different computers concurrently(each
> computer will have its own myDB), how do I merge and combine the DB from
> each computer into 1 central DB at the end of the day?
One technique is to use a single Network Server instance, and a single
physical DB, but multiple database schemas, one for each computer.
Each computer connects to the server and reads and writes data from its own
set of tables in its separate schema.
A separate application can then connect and use UNION VIEW syntax to
view the various separate tables as unified larger tables containing
all the data, union-ed together.
thanks,
bryan
Re: Merge and combine different data from databases
Posted by Rick Hillegas <ri...@oracle.com>.
On 6/13/12 10:02 PM, jaz1988 wrote:
> Hi!
>
> Currently I have a DB named myDB and myDB consists of a few tables in it.
> Lets say I want to write to myDB from different computers concurrently(each
> computer will have its own myDB), how do I merge and combine the DB from
> each computer into 1 central DB at the end of the day?
>
> Is there a proper way to it in Apache Derby?
>
> Thanks!
If each machine really has to have its own database, and you can't use a
central server as Bryan suggests, then you might take a look at the
ForeignTableVTI attached to
https://issues.apache.org/jira/browse/DERBY-4962. This table function is
useful for the sort of end-of-the-day data integration problem you
describe. Essentially what you would do is this:
1) In the central database, create a separate schema for each of the
satellite databases.
2) Then, in each schema, use ForeignTableVTI to declare views which will
siphon the data out of the corresponding satellite.
Hope this helps,
-Rick