Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / March 2008

Tip: Looking for answers? Try searching our database.

Apache Derby : create several instances.

Thread view: 
Mr. X. - 11 Mar 2008 05:28 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.