Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 125482 - Support for embedded databases
Support for embedded databases
Status: NEW
Product: db
Classification: Unclassified
Component: Code
All All
: P3 (vote)
Assigned To: Libor Fischmeistr
Depends on:
  Show dependency treegraph
Reported: 2008-01-17 14:48 UTC by ditikos
Modified: 2013-09-04 11:21 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description ditikos 2008-01-17 14:48:30 UTC
Currently netbeans supports databases over the services tab / databases. Even though this is a very useful tool for
server databases, where connections are generic pointed to a database url like localhost, for the embedded databases it
is not working properly.

Embedded databases in my point of view are regarded both as a central resource for all projects (like the server
equivalent) but also should be project specific.

Currently when you create an embedded database (for example a derbydb embedded database) the usual path to do this is
.netbeans-derby on the user folder (in windows: c:\document and settings\<user>\.netbeans-derby\<database>). When you
create this database, you can use the reference to jpa/persistence/ create entity beans from database features, yet this
is not the project database, but rather resides as a generic database connection. Afterwards it creates the
corresponding database on the target project location, but yet the data you control are being controlled from the user
folder and not from the live data of the real project created database. Also when using the database desktop wizard with
an embedded database, netbeans believes there is a duplicate reference (to the home dir) so it throws exceptions.

Embedded databases should be project oriented. You create a project, and if you want to attach a database within there
should be an option from the project name. Right clicking project name and attaching/detaching a database there. That
database could create a true reference path to the database explorer (if you want to keep the databases organized there
tidy and etc, netbeans way, if there is such), or a variable pointing to $nbprojectpath/db/$dbname. For example, let's
just say that in windows I have a project called project1 to c:\java\projects\project1. If I want to attach a javadb
called "embdb" there, netbeans should add that to c:\java\projects\project1\embdb\ or
c:\java\projects\project1\db\embdb\. That would be added to databases ready to process / alter data. The thing about
that is, that the path would be relative to the project, thus if for any reason I move to another os (example linux) and
my project is now /home/user/project1/
the database should be on /home/user/project1/db/embdb/ and reflected there accordingly from netbeans of the current
Comment 1 Jiri Rechtacek 2009-10-16 14:02:56 UTC
Reassigned to new owner.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo