• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

java + database

 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am looking to implement a database that java can interact with. I'm pretty sure I can make it work with a SQL database but I've not used SQL extensively and would have no idea where to start. Does anyone know of any resources that might help me figure out how to implement the database and make java interact with it?
 
Ranch Hand
Posts: 2412
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would recommend using MySQL. It's very easy. You can find information at http://www.mysql.com
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could try Postgre SQL. Its another open source database which supports transactions, subselects etc.

try,
http://www.postgresql.org/
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To connect to a database from Java, you will probably want to learn about JDBC. Moving this to our JDBC forum...
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some totally free databases:
MySQL had good documentation and a very active and public user community; however, it has more non-standard things about than Postgres.

Postgres is more "industrial strength"; the documenatition and user community are good.

Both Postgres and MySQL are full-fledged database server products; they need to be set up and administered and they run continuously. Neither of them require a huge amount of computer resources, but they do require some, especially memory.

HSQL and Derby (no relation, formerly IBM's Cloudscape) are embeddable Java-based databases; this means they can literally be part of your Java application, without the server setup. Both are newer and less-featureful than MySQL and Postgres. In particular, I seem to remember that one of them doesn't support transactions, which are essential for multi-threaded updates to a database.

There are other totally free good choices too, such as Firebird, but I can't really speak to their pros and cons (a guy can't know everything...)

Additionally, some commercial database vendors make their programs available for free for development/training purposes. In particular, Oracle allows developers to use their unrestricted DB for free, limited to one single user. They also produce a free "light" database with some built-in limits that is both multi-user and freely usable in commercial projects. You have to register, but it's a free download.

The ACM's sigmod maintains an incomplete list of database software that is free for either academic or personal use, here:
http://www.sigmod.org/databaseSoftware/
not all of them support JDBC (in fact, the majority don't).
[ April 18, 2006: Message edited by: stu derby ]
 
Ranch Hand
Posts: 214
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After you have selected a database system, you need to design the database itself, that is define tables, relationships to other tables, indexes, and so forth. Then you need to connect your Java application to the database.

Are you comfortable with these steps? If not, ask back and we'll be glad to help.
 
That's a very big dog. I think I want to go home now and hug this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic