Hello.
I am using Apache derby database (Client network).
I see that when I create table it is created on an instance APP
(I don't know if instance is the correct word. sorry of my English).
I see that there are other instances (NULLID, SQLJ, SYS, etc).
Can I create an instance of my own in derby database, and how can I do that
?
(One instance may be used for repository, another for Datawarehouse, ...)
Another thing :
If I create several databases for te above reason (repository may be on
another db), how can I join them, when I am connected to database1, and want
to run a query that join both tables from database1 and database2 ?
Thanks :)
Thomas Kellerer - 11 Mar 2008 08:37 GMT
Mr. X., 11.03.2008 05:28:
> Hello.
> I am using Apache derby database (Client network).
[quoted text clipped - 4 lines]
> ?
> (One instance may be used for repository, another for Datawarehouse, ...)
You are talking about a SCHEMA (not an instance).
You can create a new schema using the CREATE SCHEMA statement:
http://db.apache.org/derby/docs/10.3/ref/rrefsqlj31580.html
> Another thing :
> If I create several databases for te above reason (repository may be on
> another db), how can I join them, when I am connected to database1, and want
> to run a query that join both tables from database1 and database2 ?
No problem, you can reference tables in a different schema see:
http://db.apache.org/derby/docs/10.3/ref/rreftablename.html
http://db.apache.org/derby/docs/10.3/ref/rrefschemaname.html
Thomas
Mr. X. - 14 Mar 2008 05:01 GMT
After I did create schema ...
How can create table on specific schema (it always created on schema APP by
default) ?
Thanks :)
Thomas Kellerer - 14 Mar 2008 08:36 GMT
Mr. X., 14.03.2008 05:01:
> After I did create schema ...
> How can create table on specific schema (it always created on schema APP by
> default) ?
http://db.apache.org/derby/docs/10.3/ref/rrefsqlj32268.html