This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Packaging Database Applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Packaging Database Applications" Watch "Packaging Database Applications" New topic

Packaging Database Applications

David Garratt
Ranch Hand

Joined: Aug 08, 2003
Posts: 196

Not strictly a technical question but I hope this is the most appropriate forum.

I'm writing an application that will work with a number of database platforms by limiting myself to simple tables and indexes. I am just a little concerned about the level of complexity required to install the database schema and also the steps required to update the users database overtime as new versions come out. The JDBC API seems to have a lot of functionality to extract metadata etc. Has anyone tried to create application schemas entirely from Java and if so could they share their experiences.

I was thinking of storing the database structure in an XML file and on application startup verify that the database is both present and up-to-date.

Is this feasable and practical or would it be better to handle this outside of java using regular SQL scripts etc ?

Thanks in advance

Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30085

It sounds like you want to verify the database setup after installation. It is a sound idea to want to write a verify script in Java. And since your application is dependent on the version of the schema, application startup is a good place to do this.

It definitely sounds feasable and practical. It also sounds like a very robust solution.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30085

And yes - this is the correct forum for such questions. Basically, anything that has to do with a database should go here.
I agree. Here's the link:
subject: Packaging Database Applications
Similar Threads
running java application in background
when EJB 3.0
How to display search time?
Need a database on DOS
creating of setup