0
Java + SQL?
My dad works the machines at Aqua Römer and he was told that they'd need a program to note down all the bottles they've filled. For example: 12/5/2017 03:23 Orange Lemonade 3000 Would this be possible using Java and SQL? How do I join those two even?
7 Respuestas
+ 4
You'll need a JDBC connection for that:
https://www.tutorialspoint.com/jdbc/jdbc-sample-code.htm
JDBC acts as a "bridge" between a Java application and a database. You can write a SQL sentence on Java, pass it through the JDBC bridge, and retrieve the resulting records back into Java.
+ 3
strongly suggest in you to drop the jdbc and learn hibernate (object/relational mapping), as you project grow jdbc will become harder to maintain.
+ 2
use hibernate it will ease you a lot. it will be just one time pain to write Hibernate class but in the rest of the project you can use it like a normal Java object and Hibernate will do all the query work for you.
+ 1
@Keshave Jat: sorry, I had heard of Hibernate, but I haven't worked with it. Maybe this tutorial can be helpful: https://www.tutorialspoint.com/hibernate/
+ 1
Sounds great, @Álvaro, i will look into it.
0
It will not be a giant project, just an SQL database on a server accessible through different java applications. I doubt it will become very complicated.
0
By the way with Hibernate you may use JpaRepository. It will be a lot easy for you.