I am thinking of writing a tool that will list all the tables in an oracle database. Clicking on any of the links for each of the table will load the data from that table.
Usually i just use plain old jdbc with standard sql queries or stored procedures in the code. This has worked fine for me so far but i am wondering if using hibernate will help and reduce the work load. It is also a good way to learn about hibernate.
Could you please let me know if hibernate can help and how. i can think of the following reasonings
- No need to write the queries
- No need to manage queries
- Managing the transactions will probably be easier.
There are also some issues which im not sure what the answers are. For example, the database i will be working with is quite old and not all the table have primary keys. Reading up on tutorials about hibernate, the following questions have arisen
- Do all tables have to have a primary key named "id"? None of my tables have a column called id. The primary keys are named something else
- Do tables have to have primary keys? Not all of my tables have primary keys. Especially tables with standing data.
- Some tables have primary keys as compound keys (The primary key is comprised of 2 columns). Would these be allowed?
I would also be interested in any simple tutorials. I have seen a couple but none are intended for newbies to hiberate.
Thanks