Mr. X., 11.03.2008 05:28:
> 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,
...)
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


|