Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » DB inside an RCP Application(How to embed a DB inside an RCP Application)
DB inside an RCP Application [message #662557] Thu, 31 March 2011 06:18 Go to next message
parmy Missing name is currently offline parmy Missing name
Messages: 14
Registered: July 2009
Junior Member
Hi

I'm planning to create a RCP project which will use a local database; hence when the RCP Application is distributed each user will have a copy of their own database.


For updates I plan to have a centralised database on a server, which the client can send data to and retrieve updates from.


The reason for a local database for each user is the fact the data is fairly static, it allows for disconnected usage and the data for each user lends itself to SQL queries.


The other option I have is to create my own database system inside the RCP application which is written to a local file.


Would you recommend using DTP for Eclipse in this way, and is it in fact possible? Are their any tutorials or examples of embedding a DB in this way?


So the idea would be a user downloads and installs the RCP application. When the RCP application launches it will auto start the DB (installed with the RCP application).


Any suggestions or feedback would be appreciated.

Cheers

Parmy
Re: DB inside an RCP Application [message #663557 is a reply to message #662557] Tue, 05 April 2011 15:52 Go to previous messageGo to next message
Brian Fitzpatrick is currently offline Brian Fitzpatrick
Messages: 495
Registered: July 2009
Senior Member
Parmy -

What database are you thinking of using? I think the BIRT/ODA folks have done something around starting a local database like this, but I wasn't involved.

Linda - do you know?

--Fitz
Re: DB inside an RCP Application [message #663984 is a reply to message #663557] Thu, 07 April 2011 05:26 Go to previous messageGo to next message
parmy Missing name is currently offline parmy Missing name
Messages: 14
Registered: July 2009
Junior Member
Hi Fitz

Thank you so much for responding to my post.

I'm planning on using the Derby Database that ships with the Java SDK.

Sorry for the delay in responding to you, but I thought I'd give it a go first.

In the end it was actually quite easy.

If it would be useful I'm quite happy to pull together a tutorial which you guys can post.

In the end it was simply a case of:

1 - Adding the derby.jar file to the project
2 - You now have two choices, create a Derby Database and embed in the RCP Project or create one in the code using JDBC.
3 - To access the Database Directory (in other words to provide a URL to the JDBC Connector) use org.eclipse.core.runtime.FileLocator to point to a directory within the RCP Project Bundle.

I've exported the RCP Project and it works a treat.

That's it in a nutshell; but if it helps I'm happy to put a tutorial together.

Once again thanks for getting back to me so quickly.

Best

Parmy
Re: DB inside an RCP Application [message #664235 is a reply to message #663984] Thu, 07 April 2011 23:25 Go to previous messageGo to next message
Brian Fitzpatrick is currently offline Brian Fitzpatrick
Messages: 495
Registered: July 2009
Senior Member
We would love a tutorial! And we'd be happy to link to it from our Wiki site if you want to post it elsewhere.

But that's awesome that you were able to get it working quickly.

Thanks for letting us know! Smile

--Fitz
Re: DB inside an RCP Application [message #664340 is a reply to message #664235] Fri, 08 April 2011 12:41 Go to previous messageGo to next message
parmy Missing name is currently offline parmy Missing name
Messages: 14
Registered: July 2009
Junior Member
Hey Brian

That would be my pleasure.

Give me a couple of weeks to pull something together; what's the best way for me to get it to you for preview?

Cheers

Parmy
Re: DB inside an RCP Application [message #666521 is a reply to message #664340] Wed, 20 April 2011 16:46 Go to previous message
Brian Fitzpatrick is currently offline Brian Fitzpatrick
Messages: 495
Registered: July 2009
Senior Member
Just post it on a blog you have access to and we can link to it from the wiki. Doesn't have to be anywhere special, just so long as it's publicly accessible.

If you need me to, I can put it up on my Blogger blog if you don't have a place for it.

--Fitz
Previous Topic:Create jar file of project with derby DB
Next Topic:SQL Server 2008 Support
Goto Forum:
  


Current Time: Thu Sep 18 23:56:08 GMT 2014

Powered by FUDForum. Page generated in 0.01952 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software