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)..
Java Desktop app
Page 1 of 18 Replies - 248 Views - Last Post: 08 August 2012 - 05:02 PM
Replies To: Java Desktop app
#2
Re: Java Desktop app
Posted 08 August 2012 - 02:12 PM
#3
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
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
#4
Re: Java Desktop app
Posted 08 August 2012 - 03:09 PM
#5
Re: Java Desktop app
Posted 08 August 2012 - 03:16 PM
pbl, 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
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?
#6
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.
#7
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.
#8
Re: Java Desktop app
Posted 08 August 2012 - 04:45 PM
Yes. Use that for large applications
#9
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.
- 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.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|