db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4550) Using ij to copy data from one DB to an other
Date Tue, 16 Feb 2010 16:53:28 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834302#action_12834302

Rick Hillegas commented on DERBY-4550:

Hi Sylvain,

This is a very interesting proposal. To me the limitation in ij seems to be the inability
to reference identifiers created by other connections. A more extensible solution might be
to add a level to the identifier namespace:

    identifier ::= [ connectionName . ] unqualifiedIdentifierName

Then you could write the following script:

connect 'jdbc:derby:memory:dummy;create=true;user=fred' as fred_conn;

create table t1( a int, b int );
insert into t1( a, b ) values ( 1, 100 ), ( 2, 200 );

autocommit off;

prepare select_from_t1 as 'select * from t1';

connect 'jdbc:derby:memory:dummy;user=alice' as alice_conn;

create table t3( a int, b int );

execute 'insert into t3( a, b ) values ( ?, ? )' using fred_conn.select_from_t1;

We might want to consider the meaning of this fragment:

set connection fred_conn;

prepare alice_conn.second_select as 'select * from t1';

To be conservative, we might want to start out saying that you can't create or remove identifiers
in another connection's namespace.

I think that being able to reference identifers created by other connections would be generally
useful and would solve other problems besides the bulk import issue you are addressing right

> Using ij to copy data from one DB to an other
> ---------------------------------------------
>                 Key: DERBY-4550
>                 URL: https://issues.apache.org/jira/browse/DERBY-4550
>             Project: Derby
>          Issue Type: Improvement
>          Components: Tools
>            Reporter: Sylvain Leroux
>            Assignee: Sylvain Leroux
>            Priority: Minor
>         Attachments: DERBY-4550.diff, DERBY-4550.sql
> It is possible to have open connections to several databases while running ij, but it
is not currently possible to copy data from one DB to an other one.
> Not only such a feature would allow to copy data between Derby databases. But, ij being
mostly DB agnostic, if will ease import/export from any JDBC compliant data source.
> See http://old.nabble.com/Using-IJ-to-copy-data-from-one-DB-to-an-other-one-td27598138.html

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message