2

First of all, I'm sorry for a long explanation.

I need to develop a desktop app that will enable users to enter patients lab results for tracking diabetes treatment.

I usually code in php/mysql, but I'm not allowed to use it (my first choice was to use LAMP / XAMPP, but was told not to do so). I was told to use MS Access, as the easiest tool, but since I've never used it before, it gave me a lot of headache. Its wizards are great, but I needed to use data from several tables in my forms, and was simply unable to efficiently do so.

So, here is my question: What sort of db can I use with Java to create such an Application? As I said, I'm most comfortable with PHP/MYSQL combination, but during my studies I also used Java quite a lot. If I could find some sort of 'template' for such an application, I could probably create this easily.

I found this http://netbeans.org/kb/docs/java/gui-db.html using google. How complicated is this?

I need to create this ASAP, since I need to get this App to a team of medical staff, since I need this data to use as datasets for my MSc thesis (related to case based reasoning). I'm really behind schedule here :). And someone will probably break my neck if I don't develop it in a few days and start working on a theoretical part of my thesis.

Thank you in advance.

4
  • 1
    "And someone will probably break my neck if I don't develop it in a few days and start working on a theoretical part of my thesis." Heh, BTDT. Commented Feb 20, 2011 at 17:36
  • charlie :) then share your experiences and advise me how to survive :) Commented Feb 20, 2011 at 17:39
  • 2
    How do you eat an elephant? one elephant sandwich at a time. It's a theorem that if tasks can be scheduled at all, they can be scheduled nearest deadline first. So get them off your back on this, then get the hell out of the office. Take a long bus ride. boredom will force you to think about your thesis. Then think of small tasks with clear end points that get you toward the goal, pick one, do it, rinse, repeat. Commented Feb 20, 2011 at 17:56
  • comments should be selectable as answers ;) Commented Feb 20, 2011 at 18:30

3 Answers 3

1

Okay, this one is near and dear having just been diagnosed as pre-diabetic.

What's not completely clear from your description is if you are keeping a separate database for each instance of the app, or are you sharing the data in one big remote database?

And how much data are you expecting?

If it's just for each instance, then any old database will work; the lightest weight one is actually probably sqlite3, but since you're in a hurry and used to LAMP, mysql will certainly work.

For remote data, go with mysql.

Either way around, there are plenty of ways to connect to the database, most all of them based on JDBC. It seems like you basiucally need two tables: patient, and labs. Patient will be something like <name,dob,ssan,address>, and labs something like <ssan, labtype, value, units>. SSAN would be the key and a record would be something like

 123-45-6789|A1C| 6.0|pct glucolated

In that case, I'd just make the tables, have two forms with the data, and don't try for anything too fancy.

Update

Okay, from your comments, yes, either use Derby or just use text files. Do you need any particularly complicated queries? In the Old Days we would just have made something like a CSV file and read it into memory.

Oh, and look into Java Web Start for distributing the app.

Sign up to request clarification or add additional context in comments.

Comments

1

You can use Java to connect to a database via JDBC. Check out this tutorial. http://download.oracle.com/javase/tutorial/jdbc/index.html. You can use mySQL as your database. You can also use embedded databases such as derby which don't require an external database application.

3 Comments

thx jeff, i'll check it out asap. my main goal is to create an app that will be ready to be used as simply as possible. there are several problems related to this project. i'm not able to go there and do any kind of 'installation' to them - i can only give them JRE and my app. if this tutorial includes setting up the db, then i can't use it.
Then you might want to look at using derby db.apache.org/derby. It is an embedded database, meaning it is not launched as a separate app but it is just another jar in your app. The disadvantage is that it is typically not used for multiple users accessing the same database, rather it is stored as a file on a user's machine, but you could always have the database written to a shared location where multiple clients can access it.
Also, if you are hosting the database server or you can setup the database server, then your app can just point to the database you setup an manage, in which case you can use any backend database.
0

Here are 2 tutoriala how to build CRUD application on top of the NetBeans Platform (a Swing-based RCP):

http://platform.netbeans.org/tutorials/nbm-maven-crud.html

http://platform.netbeans.org/tutorials/nbm-crud.html

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.