Search code examples
javamysqlplayframeworkmysql-connectorembedded-database

What are the pros/cons/substitutes for using MySQL Connector/MXJ for an application


I recently made an interesting application using Play Framework and MySQL Connector/MXJ to make a completely portable web server with database, independent of any currently installed software(including Java).

I'm still new to MXJ, and the desktop application realm (as opposed to straight-up webapps), so I'm wondering if there are other, better methods for storing/accessing large amounts of data than embedded MySQL. I would assume so, since it seems not many people use MXJ. It essentially just packs mysqld.exe in its various forms for multiple operating systems and platforms. It runs in its own thread, and stores its data in whatever directory you provide.

For an application that frequently analyzes and searches through data in large chunks(100MB to 5GB), what other (fast)options are there, or am I justified in my webapp-laziness of bringing along MySQL?


Solution

  • Independent of any currently installed software(including Java).

    If you are looking for an embedded database for a desktop application, then you can go for SQLITE. However, there are pros/cons for using either MySQL or SQLite

    SQLite:

    1. Easier to setup
    2. Great for temporary (testing databases)
    3. Great for rapid development
    4. Great for embedding in an application
    5. Doesn't have user management
    6. Doesn't have many performance features
    7. Doesn't scale well.

    MySQL:

    1. Far more difficult/complex to set up
    2. Better options for performance tuning
    3. Fit for a production database
    4. Can scale well if tuned properly
    5. Can manage users, permissions, etc.

    You can find more info on when to use SQLite here

    UPDATE: I came across HSQLDB and here are its test results. HamsterDb is another option.