I have knowledge about Toplink to translate objects to database and vica versa. But it was a part of a JSP site and today Used to do some EJB stuff by using it to. Now's my question: could it be good to utilize things like Toplink inside a Java Desktop application or perhaps is it more prevalent to make use of native sql stuff from Java?
Maybe some connection with prof. developpers may be good. I have to create a seriously application for any client. I am doing the work in Java and I am gonna keep data inside a database.
ORM is great in case your data model is well structured, not excessively complex and, first and foremost, for those who have treatments for it.
Legacy databases or poorly modelled ones are not as easy to become symbolized with ORM, and doing this could be strongly frustrated, as the application would add further difficulties over individuals implied through the model itself.
If you're confident with some ORM tool for example Hibernate as well as your database is rather congratulations, go for this. They sure save you plenty of boilerplate code and also have some nice query optimisation code underneath the hood. Otherwise, you might want to use JDBC directly as well as other framework to simplify JDBC use but nonetheless using plain SQL. For such situations I suggest MyBatis.
TopLink (and EclipseLink/JPA) work equally well inside a desktop application as with a server side application. Actually TopLink has been available since the 90s with client-server Smalltalk applications prior to the server side was popular.
It's determined by your use cases
ORM technologies can nicely abstract away database specifics and permit you to concentrate from the domain model. However, you will find conditions where utilizing an ORM layer isn't appropriate (very large data sets may cause performance issues for instance, database schemas which are hard to map to things is yet another).
I would suggest utilizing a JPA compliant technology for example Hibernate. This way you are while using ORM that implements a Java standard and you will pretty much swap out and in implementations.
For anything else then JDBC is really a flexible friend
is dependent on database volume too. For databases with huge data use hibernate. It may be a big help instead of writing JDBC code