I need to create a simple Java application that connects to a local database file, and will run on a mac.
I've figured that JDBC is a good option, but what file format/drivers should I use? Is .MDB files a possibility?
Thanks for any help!
I need to create a simple Java application that connects to a local database file, and will run on a mac.
I've figured that JDBC is a good option, but what file format/drivers should I use? Is .MDB files a possibility?
Thanks for any help!
For a small DB I would suggest using a DB written in Java. The DB's below or all < 2mb. Keeping it in java means it is easy to transfer to Windows / Linux if need be.
Possible DB's include:
H2 - H2 has a mixed mode where the first time the DB is opened it is op Advantages:
HSQLDB - Version HSQLDB 1.80 is the smallest jar of the three (by a big margin) The 2.* jars are similar in size to H2 Advantages:
Apache Derby
All three offer Server and Embedded mode, H2 has mixed mode as well. All three are open source.
Use Apache Derby embedded in your application. This keeps it simple while still using standard JDBC.
H
Is .MDB files a possibility?
It could be, via a library like UCanAccess. However, using an Access database (.mdb or .accdb) would only be advisable if there was some other compelling reason to do so, e.g., to take a copy of the database file and use it with some other application that requires an Access database.
Otherwise, one of the suggestions from the other answers would probably be a better choice.