Get your CodeRanch badge!*
The moose likes JDBC and the fly likes What is the best data base to use? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "What is the best data base to use?" Watch "What is the best data base to use?" New topic
Author

What is the best data base to use?

George Sparks
Greenhorn

Joined: Apr 10, 2006
Posts: 10
I am new to this site. Have some java experience (not much), but I am trying to create a stand-alone (desktop application) that requires quite a decent data base.
What is the best data base to use:
Criteria-
1 - Works well with java.
2 - Easy to learn.
3 - Has the ability to handle text and graphic quiries.

Thanks,
George


The universe is small be bigger than the universe.
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
Originally posted by G. H. Sparks:
I am new to this site. Have some java experience (not much), but I am trying to create a stand-alone (desktop application) that requires quite a decent data base.
What is the best data base to use:
Criteria-
1 - Works well with java.
2 - Easy to learn.
3 - Has the ability to handle text and graphic quiries.

Thanks,
George

I think the most important criteria for you is the one you mentioned but did not list. Stand-alone.

For that I would consider either MS-Access or one of the embedded databases like Hypersonic DB. What platforms are you looking to deploy on?

You should also look to find yourself a good book on relational databaes and SQL. Relational databases all use SQL (with some local quirks and extensions) so once you get the theory and basics down you will be able to apply this knowledge to other databases as well. The first one will have the steepest learning curve for you and then they'll get better after that.
George Sparks
Greenhorn

Joined: Apr 10, 2006
Posts: 10
Thanks for the quick reply!!!
Actually I wondered if Access would work (I do know Access enough to do what I want), but thought there may be better options that I did not want to overlook.

As far as platforms the data set would be loaded in Access and would actually become just a data table file wouldn't it?
The platform would be JRE.


Thanks,
George
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
Originally posted by G. H. Sparks:
Thanks for the quick reply!!!
Actually I wondered if Access would work (I do know Access enough to do what I want), but thought there may be better options that I did not want to overlook.

As far as platforms the data set would be loaded in Access and would actually become just a data table file wouldn't it?
The platform would be JRE.


Thanks,
George


If you know Access it's fine for what you want. If your code is written properly then if you need to switch databases later it will be as simple as changing drivers.

By platform I mean what OS will you be running your program on. Access requires the use of a bridge driver that works only on Windows systems. You can run on other systems (Mac and Linux) but it's either (a) expensive and/or (b) tricky. So if you planning to deploy on Mac, Linux or something else that isn't Windows I would choose another database.
dema rogatkin
Ranch Hand

Joined: Oct 09, 2002
Posts: 294
Derby is good for beginners. Access doesn't give a feeling of a real database.


Tough in space?, <a href="http://tjws.sf.net" target="_blank" rel="nofollow">Get J2EE servlet container under 150Kbytes here</a><br />Love your iPod and want it anywhere?<a href="http://mediachest.sf.net" target="_blank" rel="nofollow">Check it here.</a><br /><a href="http://7bee.j2ee.us/book/Generics%20in%20JDK%201.5.html" target="_blank" rel="nofollow">Curious about generic in Java?</a><br /><a href="http://7bee.j2ee.us/bee/index-bee.html" target="_blank" rel="nofollow">Hate ant? Use bee.</a><br /><a href="http://7bee.j2ee.us/addressbook/" target="_blank" rel="nofollow">Need contacts anywhere?</a><br /><a href="http://searchdir.sourceforge.net/" target="_blank" rel="nofollow">How to promote your business with a search engine</a>
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
Originally posted by dema rogatkin:
Access doesn't give a feeling of a real database.


Care to elaborate on this point please? There is nothing wrong with using Access for a stand alone app. And for someone starting with databases it is an excellent tool because it has a very good GUI.
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
Originally posted by Maximilian Xavier Stocker:


Care to elaborate on this point please? There is nothing wrong with using Access for a stand alone app. And for someone starting with databases it is an excellent tool because it has a very good GUI.


My personal small-to-medium-beefs with Access (unordered):
1) not good for an application with any concurrent DB access
2) have to use the JDBC-ODBC bridge
3) Windows only
4) no real transactionality
5) I dislike the GUI (I generally prefer CLIs), really just a personal preference

I would argue that concurrency and transactionality are key concepts in learning how to program for databases. For someone starting with databases, I thing Access encourages (or doesn't discourage) bad habits.

That said, there are certainly plenty of projects where Access is going to be the right choice for one reason or other, and the Original Poster's project may well be one such (but I'd encourage him to look at Derby or HSQL anyway).
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
Originally posted by stu derby:


My personal small-to-medium-beefs with Access (unordered):
1) not good for an application with any concurrent DB access
2) have to use the JDBC-ODBC bridge
3) Windows only
4) no real transactionality
5) I dislike the GUI (I generally prefer CLIs), really just a personal preference


Well 1 to 3 don't seem to apply here. 4 is true but I wouldn't say it's dire. 5 is a personal preference as you stated. I like the Access GUI. I use it alot as a front end to SQL Server actually.

I think if you are an MS based person and you are learning DB's Access has a not too steep learning curve.

Anyway I would hardly say it's the best product ever and trying to use it as something it's not is foolish... but it has it's place I think. As a first tool to me it has it's advantages.
George Sparks
Greenhorn

Joined: Apr 10, 2006
Posts: 10
A little slow getting back to this thread. Almost all of the potential users will be using Windows. I do not think that will be a problem.

I am on a time constraint for what I want to do so any additional time spent trying to learn something new is just more pressure that I do not need right now, but there is one other thing that I did not mention.

At some point the program will need to be easily deployed and updated over the web. I would like to use the same database type at that point that I load onto the application.

I will say one thing about these forums. You guys are really trying to help and actually explaining your choices. Do you have any idea how rare that is?

Thanks,
Maximilian Xavier Stocker
Ranch Hand

Joined: Sep 20, 2005
Posts: 381
Originally posted by G. H. Sparks:
At some point the program will need to be easily deployed and updated over the web. I would like to use the same database type at that point that I load onto the application.
[/QB]


Well for that you want something else.

However. Provided you don't use database specific features but stay with good practices like standard SQL, don't use reserved words as table or column identifiers, label your columns in SELECT, use PreparedStatements and use read-only, forward only cursors you should not encounter problems switching databases later. It would be as simple as changing the driver class being loaded and the URL used to connect and these could be in a text file.

You might want to look at MySQL. While it's not the enterprise solution MySQL shills would like to say it is a proper database server and considering the price point (free) it might be of use to you.

There is a steeper learning curve between a standalone or embedded database and a database server but if you are going to have an application that needs to talk to a database over a network then a database server is a must.
George Stoianov
Ranch Hand

Joined: Jan 15, 2006
Posts: 94
Has the ability to handle text and graphic quiries.


If you wish to store images in the database tables i.e. BLOBs (Binary Large Object) of some sort you can forget MS Access. It cannot store such objects and expecting something good performance wise if you were able to put something in someway would be most probably a mistake. Access would be very good to prototype and test just text queries etc, but doing it straight in the db of choice will save you time and forewarn you of deployment problems.

You may look at something like embedding MySQL if you want to be free and have options, if you want pure java you can also look at HSSQL that would be the preferred way for me.

Hope this helps,
george
William Rouse
Ranch Hand

Joined: Apr 12, 2006
Posts: 73
Has anyone used Apache Derby?
George Sparks
Greenhorn

Joined: Apr 10, 2006
Posts: 10
It looks like Derby maybe the route I am going to go. I have been reading on this and it seems like a decent match for what I want. The learning curve is just something I will have to tolerate.
So when I get started on that end, I hope you folks like questions.

Thanks,
George
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the best data base to use?
 
Similar Threads
JDBC
Handling Exceptions in MVC +Command Pattern
Text area problem!
Java beans + JDBC
Java client/server encrypted connection