Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I want to create a small java application which allows to connect to a database and exchange information.
It should be possible to start the DB via Java, so I don't need anything but my application to work with the DB. (Not like XAMPP where I need the XAMPP menu to start the DB server for example)
What DB should I use for such a project?
The JDK comes bundled with Java DB which is a fully functional RDBMS that is suited for small scale apps and small scale databases.
Why dont you try H2 DB, its pretty light weight and suited for small applications. If you want to move the same application at a later stage to any RDBMS, you can take mysql.
If you just want to experiment with your small application use Java DB (Previously known as Derby). If you are using JDK 7 then it comes bundled with the JDK. For older versions of JDK you have to download the Derby database from
https://db.apache.org/derby/derby_downloads.html
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 10 months ago.
Improve this question
I would like to create a front-end application in Java to query a Microsoft SQL database. This application will need to be distributed to around 20 computers and must be extremely user friendly. I'm hoping someone can explain two things:
The simplest way to distribute this application across multiple windows machines. I.e.least amount of software installation and maintenance.
Explain how once distributed, the application might be able to connect to the database upon launch, as opposed to authenticating a user each time.
So far I plan to use Java, JavaFX, & Microsoft JDBC driver. Open to new ideas though, cheers in advance.
For distribution, I can think of a couple of choices:
IF you are sure that each of you 20 computers has a JVM installed, you could package the app as a "FatJar", a single Jar file with all of the dependencies in it. There are plugins for this in both Maven and Gradle.
If you don't have a JVM on these computers, and don't want to have to install one, you could create a native application using GraalVM and Gluon.
Take a look at https://gluonhq.com/create-native-javafx-applications-using-graalvm-22-builds-from-gluon
If you want to connect to the database without user intervention, see sql server login credential for jdbc
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I have crated simple library management system in Java. Should I use database for my application ? If yes I use database, do my client also need to install database for using application ?. I have seen many software's who store data in windows app-data, my documents folder. I want to create software with simple Installer; Install and Run. Please help me about data storage options.
You can get the benefits of both using a database and having the application simple to install and run, if you use an "embedded" database engine.
An embedded database is just a library you add to your program. There is no external server that you have to manage. Internally, the data is stored in a file or files which you can place in an "application data" folder.
Popular choices for an embedded database system are SQLite and Apache Derby
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Am very interested in using cloudant's new sync library for iOS and Android. However, I'd also like like comparable support for desktop via J2SE. I realize this may be possible simply by bundling a local couchdb instance with your J2SE app & then using a wrapper like ektorp. However, I would prefer something a little lighter - e.g. cloudant sync runs atop of a local SQLite db; rather than on top of local couchdb.
I've loaded the code into eclipse as a J2SE project however have about 40 errors to resolve; most of which are due to dependancies on android.database.sqlite.SQLiteDatabase. Un suprisingly, copying the classes in question from the Android SDK didn't work.
I would appreciate any advice / pointers on a port, or alternative.
Thanks
At this point, as you discovered, while we choose the right data access class to use based on the runtime environment -- i.e., sqlite4java or the Android SQL classes -- the library requires the Android classes to be in the classpath even when running on a desktop.
We are hoping to address this with better dependency injection or build processes in the near future, and I'll try to keep this answer up to date.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have a web application developed with Java (JSP, Servlets, etc) where I use MySQL as DBMS, take care:
Connection Pool
PreparedStatement
Stored Procedures
-Triggers
My question is how many changes I have to make my application (In addition to changing the name of the driver and the. Jar) for smooth functions with MariaDB.?
Or what considerations should I take for that change?
There is a compability list on MariaDBs pages so you can see that 99% is the same like in MySQL. And from Java perspective, your statements and connection pool should remain the same, however I suppose they can be minor changes in a way how to write stored procedures.
So generally, this transition shouldn't cause any problems but you still want to test this thoroughly in order to be sure that nothing really changed.
MariaDB is a direct fork of the MySQL codebase which hasn't diverged much from it yet. The developers are doing their best to avoid any compatibility-breaking changes to make sure that MariaDB can be used as a drop-in replacement for MySQL. That means switching from MySQL to MariaDB is comparable with updating your MySQL version.
It is unlikely that you will have to make any modifications at your application at all. Still, a proper integration test is definitely in order before migrating the production system, especially when your MySQL version isn't up-to-date.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am currently working on a project in which I am storing the name of program/application window titles and my knowledge of databases and datastores is fairly limited.
The idea is that I want to query the database with a string to see if it is present in the database. I am currently using MongoDB to do this but I have seen that MongoDB is mostly used to be run on a server which isn't what I'm looking for.
My question is - if I am just storing strings / searching for strings would a custom Array or HashMap be sufficient or would search times make it inefficient meaning that SQLite would be more ideal for this situation.
SQLite is perfect for this application. Firefox, for example, uses SQLite for storing its internal configuration settings (the about:config page). SQLite databases are single files, and it can be transparent to the user and requires very little in the way of system resources--unlike most server/client database solutions.
i would suggest to use java preferences api, if the data to be saved is not too much and if it needs to be available even when the application is terminated and restarted.,