I'm trying to implement a function to LaTeX but i don't know how. I'm compiling using this  page: docs.latexlab.org


Question: Combining Java with SQL?
Answer: What you will probably be doing is using JDBC to allow Java to connect to SQL databases. There are also persistence layers, such as Hibernate, that you can use to store and retrieve data in a database using Java.

I think the JDBC tutorials should be enough to get you started. Just don't get in too far over your head too early. Take your time and ask questions as they come up.