Results 1 to 13 of 13
Like Tree1Likes
  • 1 Post By doWhile

Thread: Embedded Database with Multi-Platform support

  1. #1
    StormyWaters is offline Senior Member
    Join Date
    Feb 2009
    Posts
    307
    Rep Power
    6

    Default Embedded Database with Multi-Platform support

    Hello everyone,

    I'll try to keep this brief as I can probably go on for a page or two on everything, but the main question I have is "What Database would you recommend for transitioning an Application from using a specific Database on a specific Platform to using an Embedded Database targeting multiple platforms."

    A little Background:
    I've been programming for ~5 years, with most of my experience dealing with Java. I currently have a "suit" of applications, programmed in Java, that have been developed for running on an IBM iSeries, using the DB2 Database. I want to move into a more Platform-Independent environment, specifically targeting the following Platforms:
    • Windows
    • Linux
    • IBM AIX
    • HP-UX


    To do this I will require a Database to store some information, and I've been looking up possible ways to do this. For ease-of-use by users, it would be best if they didn't even know the Database exists. I've already looked into using other Databases (MySQL, PostgreSQL, etc) as a separate program that would be expected to be installed somewhere and having the users specify the Database Type, and connecting to it through JDBC internally, however this seems to be too much for Users to handle and has lead to complications(MySQL dropping support on some Platforms, Users not wanting to install other databases/applications, Syntax differences between different Database Types), so I've decided to try an embedded approach.

    I've already looked into using a embedded MySQL Database using MXJ and it does seem promising, however the fact that MySQL is dropping support on some of my targeted platforms is making me look towards other alternatives.

    I am hoping to gain some insight on what Databases people would recommend for something like this or at least what approach they would use. The code is somewhat flexible, as long as I am able to establish a JDBC connection to the Database, it should work.

    Any help would be appreciated as it should simplify my research. Thanks.

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

    Default Re: Embedded Database with Multi-Platform support

    What Database would you recommend for transitioning an Application from using a specific Database on a specific Platform to using an Embedded Database targeting multiple platforms
    Take a look at Apache Derby.
    Apache Derby

  3. #3
    StormyWaters is offline Senior Member
    Join Date
    Feb 2009
    Posts
    307
    Rep Power
    6

    Default Re: Embedded Database with Multi-Platform support

    Thanks for the reply, doWhile

    I'm looking at Derby currently (Never used it, always heard about it). My biggest concern revolves around working on all the Platforms, but I'm unable to get a clear answer as whether or not it would be supported on all of them. Also, since multiple "Applications" would require access to the Database, would I be able to connect them?

    Here's a better explanation on the different Applications:
    • There is an "Engine" that would be running in the background (Either embedded inside someone else's application or on a Web Application Server). This is where the main Database tie in is needed.
    • There's an "Administrator" application that connects to the Database and makes changes to the Database.


    Since currently the Database is stand-alone, it's always started and the 2 applications can use it without problems. I fear that using some embedded databases won't allow this type of access. I am in the process of testing a Derby Database in this manner, however, as the Tests take time to create/run. Would Derby allow this?

    Thanks again for the help.

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

    Default Re: Embedded Database with Multi-Platform support

    Derby can be run as both a server as well as embedded (I believe embedded will only allow single client access - if you need multiple clients to read an embedded database consider using a single server, or write a wrapper client).

    It is written completely in java, so any OS that runs java can run Derby.
    Fubarable likes this.

  5. #5
    StormyWaters is offline Senior Member
    Join Date
    Feb 2009
    Posts
    307
    Rep Power
    6

    Default Re: Embedded Database with Multi-Platform support

    Do you think it would be possible to Start the Derby Network server inside the Java Applications or something? I don't want to introduce having the User install anything related to the Database for my application to work. If it doesn't, I wonder if there might be someway to automate this installation.

    Thanks again for the reply, it really does help

  6. #6
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

    Default Re: Embedded Database with Multi-Platform support

    Quote Originally Posted by StormyWaters View Post
    Do you think it would be possible to Start the Derby Network server inside the Java Applications or something? I don't want to introduce having the User install anything related to the Database for my application to work. If it doesn't, I wonder if there might be someway to automate this installation.

    Thanks again for the reply, it really does help
    The Derby library can be deployed with your application, and all connections can be constrained to your application. Launch the application and create/connect to the database - its a jar, so it can be deployed with your app just as any other jar library would. Using it embedded such as this, there are limitations - each client has their own database. Thus multiple clients don't share the same database information without writing code necessary to for the client-client communication...if you need data sharing between clients, I recommend creating a centralized server.

  7. #7
    StormyWaters is offline Senior Member
    Join Date
    Feb 2009
    Posts
    307
    Rep Power
    6

    Default Re: Embedded Database with Multi-Platform support

    Bare with me if you will, but I'm not too good when it comes to terms. Can you give me a brief explanation of what you mean by "centralized server" so I can make sure I'm understanding everything correctly?

    I do need to share the data between the two applications and they cannot be tied together, I'm trying to keep the "Administrator" and "Engine" applications separate so that the "Administrator" application could still be used on Engines which will still use the DB2 Database (I can't change the existing "Engine" application there). This is why I was leaning towards MySQL MXJ as it basically gives a program full control over a MySQL Server, allowing outside applications to connect to it using JDBC. I'm still going to continue looking into using a Derby Server and figuring out a way to launch the Database so that outside applications can connect, but based on what you said this seems like it may not be possible.

    If it seems impossible that any Embedded Database solution would work, then I can look into changing how these two programs communicate, however, as for right now I'll continue looking down this line. If a "centralized server" just means installing MySQL Server separately from my application, then it wouldn't work as one of the points is to ease the installation/use of my applications.


    I appreciate the help. Thanks,

  8. #8
    StormyWaters is offline Senior Member
    Join Date
    Feb 2009
    Posts
    307
    Rep Power
    6

    Thumbs up Re: Embedded Database with Multi-Platform support

    It appears you can start a Derby Network Server, and establish connections to it from both the application that would start it, and other applications which would want to use the Database. A Test program I made confirmed it. I just got to install/run it on the Targeted Platforms to ensure everything works as expected.

    Thanks for all the help, I'll most likely pursue using the Derby Database, as MySQL MXJ only seems to support some of the platforms without changes to the jar files. I just need to continue checking a couple other Database options before I can commit to this design.

  9. #9
    StormyWaters is offline Senior Member
    Join Date
    Feb 2009
    Posts
    307
    Rep Power
    6

    Default Re: Embedded Database with Multi-Platform support

    Does anyone else have a suggestion about what Database to use? I would like to make sure I don't overlook something.

  10. #10
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

    Default Re: Embedded Database with Multi-Platform support

    I am confused. You first mention you want an embedded database and do not need data to be shared between applications, now in post #8 you allude to starting Derby as a Network server. If you want it to be embedded, why do you need the network server?

    If you want a centralized location to store the data irregardless of the client then establish a public server in which the clients can connect remotely. If you want each deployment to have its own data, then deploy each application with its own embedded database.
    See Step 3: Embedded Derby

  11. #11
    StormyWaters is offline Senior Member
    Join Date
    Feb 2009
    Posts
    307
    Rep Power
    6

    Default Re: Embedded Database with Multi-Platform support

    The data does need to be shared between my applications. On the iSeries the database is always available, so this was never really an issue. When moving over to a Platform Independent version, there's no guarantee a Database will be installed. Previously, I required that they had a Database installed on their System, and I would just have the applications connect and use the selected Database Type.

    This was becoming a hassle as people who wanted to use my applications didn't really understand/want to install a third party Database on the Servers, so instead of supporting a variety of different Database Servers, I decided it would be nice if I could just bundle one with the applications that would run on all the Platforms that people wanted to use it on. I started researching the different Database Types/Servers available to see what Platforms they would support and how easy it would be to integrate. I've so far evaluated the following:
    • MySQL XMJ
    • Derby
    • H2


    Since my applications didn't really interact with each other but just the underlying Database on the iSeries, I needed this functionality with whatever Database option I choose. This meant that I can't run a truly Embedded Database where access to the Database is restricted to the application that is using it, since the other applications would need access to the Data. I could have changed it so that there is a "Primary" application that has the Embedded Database inside, which the other Applications would then talk to to obtain the information they require and to make changes, but this seems overly complicated and would require a pretty big rewrite to my "Administrator" application as the most logical place to put the Embedded Database would be in the Engine.

    I didn't mean to confuse anyone and I apologize for it. I hope this clears it up. I'm still currently evaluating the H2 Database and it is looking promising. The MySQL XMJ would be the easiest for my applications to integrate with as I have support already built in for a MySQL Server but the lack of support on some of the Targeted Platforms is weighing this option down. I'd choose the H2 over Derby as H2 promises better performance so that pretty much rules Derby out. I just got to get over a couple hurdles integrating with H2 (Mitigating the Libraries/Tables, updating some SQL calls, adding handling for auto updating of Time-Stamps).

    I was just looking for suggestions on Database Servers people have embedded inside their Applications and/or problems people have had with certain Database Servers on any of the Target Platforms I was looking into. I figured somebody would have done something like this before and could help me by cutting down on the required research and by offering up suggestions.

    Thanks again to everybody who posted/helped. I am still evaluating everything so suggestions/help is still appreciated. I'll do a follow-up when everything is figured out (I dislike leaving Threads with no conclusions).

  12. #12
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,185
    Rep Power
    20

    Default Re: Embedded Database with Multi-Platform support

    If you have multiple apps accessing the same database at the same time then calling it "embedded" is what is throwing people...it isn't embedded.

  13. #13
    StormyWaters is offline Senior Member
    Join Date
    Feb 2009
    Posts
    307
    Rep Power
    6

    Default Re: Embedded Database with Multi-Platform support

    Yeah sorry about that. I am not too great when it comes to terms. What I meant was I want it to be bundled with my applications. In the future it might be nice to have an Embedded Database instead of Bundling one, however, right now it isn't realistic. Baby steps.

Similar Threads

  1. Axiomatic Multi-Platform C 1.6.7
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 08-10-2007, 05:46 PM
  2. Axiomatic Multi-Platform C 1.6.5
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-11-2007, 04:19 PM
  3. Axiomatic Multi-Platform C 1.6.4 (Mac OS X)
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 06-22-2007, 06:59 PM
  4. Axiomatic Multi-Platform C 1.6.4
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 06-22-2007, 12:49 AM
  5. Axiomatic Multi-Platform C 1.6.3
    By levent in forum Java Software
    Replies: 0
    Last Post: 06-05-2007, 12:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •