Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 58
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't always need a database to store data. Why not just use flat files for your app ?
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Technically speaking, you could even just use serialized objects.
 
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 74371
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think this thread would sit better on our databases forum. Moving.
 
Mohamed Sanaulla
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 40
Eclipse IDE Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic