Win a copy of Learning Regular Expressions this week in the General Computing 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Database tutorial  RSS feed

 
Ranch Hand
Posts: 70
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have my project to the point where I am ready to add a database.

It will be a pretty simple database with only one table and 4 fields. It will contain maybe 100 records at most.

Field 1 - a unique number (int)
Field 2 - a alpha numeric code (string)
Field 3 - a alpha numeric description (string)
Field 4 - a alpha numeric template (string)

I want to load the database into a gridpane and be able to select what is loaded using the select statement in sql.

If ever I decide to send this to someone else I want to keep the distribution as simple as possible. Hopefully maybe no creation just
load it to someplace on their computer as I do want to include some sample entries already within the database.

I am looking for suggestions on a good tutorial that will help me get started and understand how it works.

Or if anyone has other suggestions rather than using a database I am open. I have even thought about a text file but
am not sure?

Thanks
Roger

 
Marshal
Posts: 60168
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I think you shou‍ld write the database as a standalone application and get it working before you add the Java® code to it. There is a section in the Java™ Tutorials, which I think is a good introductory tutorial, and there are many other tutorials available. You can find them simply by searching.
I recommend: get the database working independently of any Java® code and only after that shou‍ld you write anything to connect it to Java® code. Then you shou‍ld have an app with an API allowing you to see the data at the command line (maybe with System.out.println). Only when that is working correctly can you put a GUI atop it. Remember that databases constitute a science in their own right and you can spend your whole life writing database code and never write anything else, so don't expect to become an expert overnight.
 
Sheriff
Posts: 5130
138
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think to get started you might use SQLite and JDBC.  Google jdbc tutorial and you should get a bunch of tutorials on JDBC in Java.

SQLite is for when you want database functionality but don't need concurrency (more than one person accessing the DB at a time). 
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!