• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to build a database in java, how to store and read information (objects) ?

 
Marie-Christine Jusseret
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I would like to write a stand alone application in Java to organize my tasks and set up reminders via Sms or Email to my mobile.

I have followed some trainings in Java but no training explains to me how to build a database to store all my datas (objects) to read them etc ..

Maybe it is too complicated for a beginner I don't know but in fact I would like to begin by this .

I don't know what I have to use for that , what is the best (Ms access Sql etc...) I am completely lost

Can you advice me a little bit please ...maybe you have some tutorial to help me.
Thanks in advance for your help
Emelda
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3165
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marie-Christine Jusseret wrote:Hi,

I would like to write a stand alone application in Java to organize my tasks and set up reminders via Sms or Email to my mobile.

I have followed some trainings in Java but no training explains to me how to build a database to store all my datas (objects) to read them etc ..

Maybe it is too complicated for a beginner I don't know but in fact I would like to begin by this .

I don't know what I have to use for that , what is the best (Ms access Sql etc...) I am completely lost

Can you advice me a little bit please ...maybe you have some tutorial to help me.
Thanks in advance for your help
Emelda


To build a Database you use RDBMS along with SQL. Use JDBC from Java to connect to the database. So your RDBMS will store all the data.

I dont think this is the right forum to ask about a Database related question. Moderators will be in a better position to move this to a related forum.
 
Suhrid Karthik
Ranch Hand
Posts: 58
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't always need a database to store data. Why not just use flat files for your app ?
 
Ed Ward
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Technically speaking, you could even just use serialized objects.
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.....

Its better you will use RDBMS.I don't think flat files will helps..it may create problems.
when you have to access the large data.You have to write a program to sort the elements while retrieving them from files.which is possible by simple Oracle command.
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you considered that -for reminders to work- this application would need to be running and internet-connected at all times?

Also, being a single-user application with a limited dataset, a database would be overkill in my opinion. Structured files (maybe properties files or XML) would work just fine. There's nothing wrong with using a proper database if you want to learn about them, but since you admit to being a beginner, it's a complication you should avoid for the time being.
 
Martin Caminoa
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's possible to use SQLite into an application. There is available a Firefox extension called SQLite Manager, this extension is very useful to create and edit SQLite databases. It's mandatory to add sqlitejdbc jar into the project. The following code will display the records:




Links:

SQLite Manager add-on for Firefox

SQLiteJDBC driver
 
Alex Hurtt
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaDB I believe comes with the Sun....errrr Oracle...JDK version 6. It is a nice compact (about 2MB footprint) but powerful 100% Java and 100% FREE database system based on Apache Derby (Ok well it probably really mostly IS Derby rebranded by Sun/Oracle). It is another alternative you can consider in addition to the previously mentioned SQLLite. If a database driven application is what you want to start on and you feel you're up to it, don't let nay-sayers stop you. As long as you're learning and having fun at the same time, that's what it's all about.
 
Campbell Ritchie
Sheriff
Posts: 51344
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this thread would sit better on our databases forum. Moving.
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3165
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suhrid Karthik wrote:You don't always need a database to store data. Why not just use flat files for your app ?


A DB makes things simple in terms of retrieving the data. Flat files might require some processing, parsing to be done by the programmer.

Best I can suggest is to install Netbeans and then follow the tutorial to create a DB application from Netbeans. When you download the complete Netbeans version- It comes bundled with an App server, DB as well.
 
Abhishek Ralhan
Ranch Hand
Posts: 40
Chrome Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you are a beginner, I would say you keep your application as simple as it can be. Once you are able to run that application, then may be you can add up the database or Hibernate (ORM) and other things as per your requirement.

So any of the below solutions would be enough to start of:

You don't always need a database to store data. Why not just use flat files for your app ?


Technically speaking, you could even just use serialized objects.


By the way, its a nice idea. Surely you will have learning if you take it seriously..
Good Luck!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic