Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORM: Yes or no? [closed]

Tags:

java

orm

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.

like image 485
ATorras Avatar asked May 05 '09 16:05

ATorras


People also ask

Should I use ORM or not?

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 and why you should use it?

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.

What is ORM example?

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.

Is ORM better than SQL?

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.


1 Answers

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.

like image 114
Aaron Maenpaa Avatar answered Sep 28 '22 03:09

Aaron Maenpaa