I am making a web application in Java. I want to continue to develop this application even when i dont have administrative privileges on my work laptop. I am unable to install databases on my local system. Are there any free online databases i can use. I want to be able to provide a connection URL and perform transactions like in a local db.
I also want to try and connect to as many different databases as possible to test out my code.
Would in memory dbs need installation? Could there be a work arround there?
Thanks in advance.
You could use a JDBC wrapper for Sqlite.
Check out Sqlite-JDBC, or this list.
No installation needed.
For online database hosting:
MongoLab. Free for a 500mb shared database.
Compose.io offers MongoDb, ProstgreSQL, RethinkDb and more. 30 day trial.
Lots of options for MySql, eg. http://www.freemysqlhosting.net/.
Many more, Google will help you.
I Hope my answer helps you.
Instead of free-ish online databases I would also recommend to mount your own local home server, install the databases you want to try there and then publish your server to the internet either checking its public IP everytime before you leave to work or using a service like Hamachi for a local VPN or no-ip to have a domain so you can connect to these databases from work.
You can download and install some common free databases like:
MySQL Community Edition
Postgres
Oracle XE
SQLite
Related
I've downloaded and imported into my project this JDBC driver that supposedly supports Linux (albeit tested only on SUSE Linux).
What I want is to be able to use a .mdf database through Java on Linux. The queries obviously need something to run on, not simply connect to a database - if I am understanding this correctly.
I found a question on SO that seems to have valuable information concerning my issue.
So I was thinking a FreeTDS + JDBC combination. Will queries execute as expected or do I have to go use the database natively, on Windows? The latter basically crushes OS agnosticism that Java provides which I would like avoid, if possible.
The database itself isn't anything fancy, only a few tables - this is merely a school assignment, after all.
I will provide additional information, if needed.
An mdf file can be an old (JET based) Microsoft Access database file, so a JDBC driver for SQL Server, a totally different product, isn't going to help you much. Here on SO there are a couple of posts that explain how to use the JDBC-ODBC bridge to access Access databases via the ODBC driver detour, but since you specifically mention Linux that's not going to help you.
I see two possible (free) approaches:
use the open source jackcess package that allows Java programs across platforms to open, read and write MS Access database
transfer the content of the MSAccess database file to some database that has native Java drivers (that is, most of them that are not MS Access).
However, an mdf file could also be a SQLServer database, but using that database under Linux is also going to be quite tricky, as you'll need some edition of SQL Server to open it - see here for some details on how to "attach" such an mdf file to an installed instance of SQLServer - but to my knowledge there is no edition of SQL Server that runs under Linux. So, unless you can find some Windows machine to run SQLServer on, and then connect to it using the JDBC driver you have both options mentioned before may be valid alternatives (ie, option 1 = copy your data into an MSAccess file and access that file with jackcess or option 2, copy the data into some Linux-tolerant database with a decent JDBC driver and use that)
Some people have been mislead by my question (I am not a native speaker of English, could be that), the database was meant to be run locally (explicitly not on a remote server) which simply cannot happen with the SQL Server + Linux combination. Wine is a possibility, but that is just too much hassle. So, the solution is either to simply use SQL Server on Windows or use an alternative cross-platform RDBMS like MySQL.
Nevertheless, I'll accept fvu's edited answer and would like to thank other users for the time they've invested in their own answers.
I'd like to ask for your opinion on local databases for a java application i'm developing.
Its veterinary application, meaning I'll need to store Customer, Pet and Medical History details for a start. I know how to use JDBC but I've only used it online in applets.
So, I really dont know much about local solutions and how those gonna work when I'll publish the application in a .jar, so please guide me. Would MySQL still work?
Thanks!
This is fairly general question and light on details and MySQL sounds like it would work here. If this is for local-only access and a typical client-server model is not needed then I'd encourage looking into a database engine that can be loaded directly in the JVM. One of the benefits is that there is no need to install any separate database components and the JARs for the entire database engine can be packaged in your application.
Below are a few of these:
Apache Derby
HyperSQL
H2
SQLite - Some Java wrappers around the C library are available but there are not any pure Java JDBC drivers available for this that I am aware of.
I realize that it is not difficult for developers to configure MySQL for local use but it could lead to a number of support issues for end users. It may be possible to script the installation to preconfigure a large amount of it but I am not sure of the details of that and it would be an additional item for you to work out when packaging the application.
Some general questions about utilizing MySQL for this are shown below. It may very well be the best way to go but these are just some things to consider. Most of these are not really specific to the development of the application and are more on the support side of things. Utilizing a database engine noted above can eliminate all or many of these.
Will multiple computers every have to connect simultaneously to the same database?
What MySQL password do you use?
Do you recommend that end users all use the same one which may not be good security?
Or do the end users need to create one in which case you may need to deal with forgotten passwords and the end user having to configure the password in your application?
Do your end users run antivirus software that may interfere with the database connection?
What if they have another program that uses MySQL that is already using the default port?
I'm creating a simple CMS software which doesn't have much data to be stored. I'm currently using mysql as my data provider and have a java application in the presentation layer. This CMS will be a standalone which means datacollection and processing will be done in a single computer.
I created a installer to install in my clients computers. But I need to setup mysql then the database as well. And my clients doesn't have sufficient IT knowledge to setup the databases themselves. So for each client I have to attend and install mysql server.
What I need is a way to integrate data-provider to the application without using mysql or any other sql or nosql server. So my clients can install it themselves using simple guided steps in installation wizards.
You can use one of embedded db, like JavaDB (ex. Derby). Support of this database is added to JRE. So all your client need is installed JRE. And you get full relational database without any installation and other stuff setup.
You can try using hsqldb or sqlite db. These dbs can be bundled with the application in memory or can use a simple file as db. Hope it helps
I found a good example here
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javadb/
thanks every one for help
I wish to distribute my restaurant application, which uses MySQL to store the data. I plan to use Lauch4j to distribute its .exe file.
But the program also requires the user to have mysql Installed, is it possible to hard code mysql setup within the application? or anything else that could be done to avoid the user the pain of downloading and installing it?
It is a matter of opinion, but I advise you to not do it.
If your main concern is the install process being easy for the user, use some embedded DB. That way, the user not only will not have to care about things like firewalls, possible mysql vulnerabilities and so on.
If you need something that only mysql or other standalone DBs can provide you, don't hide it from the user. Technical capable users should be allowed to configure your app to run in the sql engines they already have installed (if they want to). Other people should at least know that you are installing something else apart of your app. Of course less tech-savy users will be scared, but if they do not know what they are doing they should not be tinkering with MySQL (or even installing programs).
In essence: Let the people know what you are installing in their systems. Allow them to reuse other DB engines if they chose to.
If i was you, if MySQL was the option, I would just take it for granted that it is installed and ask for the connection parameters (make it the first step of the installation procedure so you can check it before proceeding).
You can use SQLite in for your application. If any application needs to store data in the same system only and the application needs to be small and lightweight application then you can use sqlite as database. SQLite makes a great application file format.
I am studying Information Technology at a local college. I am currently doing a Java project for one of my Modules. We are expected to make a Java application that communicates with a Microsoft Access database. I am working in a group, and all of us are assigned to code separate functions of the software. However, we need to share one database. We are currently using ODBC on our individual computers and are using JDBC to connect to the database on the local machine. What we have thought is to just work on separate Microsoft Access databases and then just combine them later on. But I think that's not the best way. Is there a way that will allow me and my group members to have a centralized database, to which all of us can connect and make our queries? Is this possible by hosting the Microsoft Access database somewhere online, and then connecting to it from inside the Java software. Please help me out, as I have no idea how to get a centralized Microsoft Access database.
If you want to get rid of this by using Microsoft Access is because that's the easiest way out for you and your group to solve this kind of problem but I'd rather suggest you to use the database using a database provided by Java Derby database, it's quite help you to short your code within the server. Maybe I will suggest you to use Netbeans as a GUI and the Derby to control the database.
So what's your core problem is that a programming side or configuration and control within the hosting ? Thanks