• Post Reply Bookmark Topic Watch Topic
  • New Topic

New to java how to involve a database ?  RSS feed

 
mitchell cooper
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please i could really do with a couple of pointers to set me on my way to learn coding. I know it will seem i am jumping in at the deep end which im not, i would just appreciate if someone could help me out with a bit of understanding.
My goal in the future is to write a small game that will involve crafting and inventory, i have chosen java as the language i would like to use so i am ready to learn, but one thing i cant get my head around is how storing data and storing data that has been input by user.
For example inventory of a character how would it be stored in a program ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66261
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java interacts with databases through JDBC.

https://docs.oracle.com/javase/tutorial/jdbc/
 
mitchell cooper
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankyou for the reply so what actually is it lol ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66261
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is the standardized set of APIs used to access databases through Java. If you have yet to learn Java, JDBC is something that needs to come later when you understand core Java.
 
mitchell cooper
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok thankyou so is jdbc used in games like minecraft ?
 
Henry Wong
author
Sheriff
Posts: 23291
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How do you know that you need a database to store information? ... versus other options such as storing it into a file? From your post(s), it isn't clear that you know why you need a database.

Henry
 
Ron McLeod
Bartender
Posts: 1602
232
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For Mincecraft extensions, simple configuration data is typically stored in a file using YAML.

If the data is more complex, a relational data base can be used - that is where JDBC comes in. For relatively low read/write rates of small volumes of data, SQLite3 would be fine, otherwise you might want to use something like MySQL.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!