I have to begin a medium-sized project in Java, but I'm not a big fan of ORMs in general so the question is: Should I design the project with an ORM in mind (for later use) or not?
The RDBMS is Oracle 10g and the queries will be very coupled to Oracle syntax/functions (i.e. text, mining, CONNECT BY, etc...).
Thanks a lot.
So, do you need an ORM? If you have any more or less complex project and you work with a relational database, then yes, definitely. Big ORMs seem "bloated" not because they are bad tools, but rather because the underlying problem of object-relational mapping is hard.
What is an ORM? An object-relational mapper provides an object-oriented layer between relational databases and object-oriented programming languages without having to write SQL queries. It standardizes interfaces reducing boilerplate and speeding development time.
An ORM library is a completely ordinary library written in your language of choice that encapsulates the code needed to manipulate the data, so you don't use SQL anymore; you interact directly with an object in the same language you're using. With an ORM library, it would look like this: book_list = BookTable.
When it comes to hands-on management, SQL is higher than ORM. It is because of the human expertise involved in running queries in data management and retrieval. It is important to know how to use SQL in order to maximize the benefits and performance of the database.
You might want to look at this earlier question which discusses the benefit of ORMs: What are the advantages of using an ORM?
The most relevant part (taken from the accepted answer):
If you have complex, hand-tuned SQL, there's not much point in using an ORM.
If you are constantly reaching past the ORM and writing your own SQL, the ORM might just end up getting in the way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With