8 Replies - 470 Views - Last Post: 08 August 2012 - 05:02 PM Rate Topic: -----

#1 Mehim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-August 12

Java Desktop app

Posted 08 August 2012 - 02:05 PM

I would like to create a Java desktop database app. I want it to keep info like name, surname, email etc. of a person. I want to use JTable for viewing/adding/editing the data, but i have no idea how to store the data.. In files? If so will those files be safe? Won't the application lag if i had like 500 people data stored in it? Is this kind of data storage even worth a try? Would it be fast or laggy as hell? Any other solutions? Embedded Database is kinda too difficult for me.. I mean i haven't found a really good tutorial so i could understand how it works (for dummies tutorial needed badly in this case)..

Is This A Good Question/Topic? 0
  • +

Replies To: Java Desktop app

#2 x68zeppelin80x  Icon User is offline

  • D.I.C Addict

Reputation: 130
  • View blog
  • Posts: 576
  • Joined: 07-March 09

Re: Java Desktop app

Posted 08 August 2012 - 02:12 PM

You could start here.

A quick Google search turned up this tutorial on JDBC API.

Here is an overview of the JDBC API.

This post has been edited by x68zeppelin80x: 08 August 2012 - 02:16 PM

Was This Post Helpful? 0
  • +
  • -

#3 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8327
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Java Desktop app

Posted 08 August 2012 - 02:16 PM

If you don't want to learn SQL I wouldn't worry about the performances realted to file holding 500 entries.

You can load them in memory (storing them in an ArrayList). User won't notice any lag time when you will re-write the whole ArrayList to disk when an entry is added/deleted/updated
Was This Post Helpful? 0
  • +
  • -

#4 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2674
  • View blog
  • Posts: 11,294
  • Joined: 20-September 08

Re: Java Desktop app

Posted 08 August 2012 - 03:09 PM

http://java.sun.com/...Desktop/javadb/

Never a good idea to reinvent a db imo
Was This Post Helpful? 0
  • +
  • -

#5 Mehim  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 08-August 12

Re: Java Desktop app

Posted 08 August 2012 - 03:16 PM

View Postpbl, on 08 August 2012 - 02:16 PM, said:

If you don't want to learn SQL I wouldn't worry about the performances realted to file holding 500 entries.

You can load them in memory (storing them in an ArrayList). User won't notice any lag time when you will re-write the whole ArrayList to disk when an entry is added/deleted/updated

Thanks for reply. It's not that i don't want to learn SQL. I don't know where to start? I guess learning SQL from a book would be a good start but will it explain how it co-operates with Java and how to set it all up?
Was This Post Helpful? 0
  • +
  • -

#6 darek9576  Icon User is offline

  • D.I.C Lover

Reputation: 198
  • View blog
  • Posts: 1,686
  • Joined: 13-March 10

Re: Java Desktop app

Posted 08 August 2012 - 03:25 PM

I found JDBC really nice when working with databases in Java. Hibernate is your other option - i have no experience with that.
Was This Post Helpful? 0
  • +
  • -

#7 Ghlavac  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 519
  • Joined: 14-January 09

Re: Java Desktop app

Posted 08 August 2012 - 04:43 PM

He probably should avoid hibernate, it'd be like using a nuke to blow up a house for him.
Was This Post Helpful? 1
  • +
  • -

#8 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2674
  • View blog
  • Posts: 11,294
  • Joined: 20-September 08

Re: Java Desktop app

Posted 08 August 2012 - 04:45 PM

Yes. Use that for large applications
Was This Post Helpful? 0
  • +
  • -

#9 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8327
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Java Desktop app

Posted 08 August 2012 - 05:02 PM

Actually, I consider, for a newbie, that:
- using an ArrayList<Contact>
- learning how to add/update/delete from/to that ArrayList
- learning how to use writeObject(), readObject() on that ArrayList

is quite a good learning curve. You will have plenty of time later on to learn about SQL and Hibernate.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1