November 22, 2006

ORM tools

Writing about web page /java/entry/java_connection_pool/

Writing about an entry you don't have permission to view

Object Relational Mapping (ORM) Tools provide a slick way of persisting objects (data) into database. It has a great impact on Java applications. It reduces the need for developers to write native SQL. The developers can easily let the tools generated complicated SQL. To achieve there program efficiency, developer tend to join several objects, without realizing it will generated a huge SQL require multiple table joins. For DBAs, it means they need to improve performance tuning skills. Oracle optimizer might choose inferior execution plan for a big query.

As a DBA, aware of the following point:

  • Using native SQL in corner cases 90/10. ORM tools is good for manipulate data. For batch loading, updating, deleting, it is far better to use native SQL. For instance, to display all information of several parents and their children, a Java application is likely to loop over every parent to get his children. This way will generate a lot of hit to database. With native SQL, you can easily get this information in one single SQL.
    Some tools provide semi-native portable SQL, for instance, hibernate has HQL, EJB has EJB-QL, you might encourage developer to use them as well.
  • Use lazy loading to avoid generated tons of SQL. Suppose a parent has many children, every child has its own children. If you just want to get information fom a child, with eager loading, this child will automatically load its children. This can leads to generate several queries.
  • break down one complicated big SQL into two or more SQLs.

- No comments Not publicly viewable


Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

Search this blog

Search Warwick Blogs

 

Tags

Most recent comments

  • Oracle 11g is the clear leader in this area. Oracle has invested heavily into self–tuning capabiliti… by shaane on this entry
  • All the features are very nice.I like Repair Advisors the most.Oracle 10G introduced some of the dat… by lucy on this entry
  • "logical standby failed to re–start, I am also getting the same error. I have search on internet and… by anemia on this entry
  • Thanks for the nice information because from last three days i am stuck on this problem…. by robot vacuum on this entry
  • So what happen City speed dating when you tried this coding once in your PC.. Please tell me so i am… by John Bergeron on this entry
Not signed in
Sign in

Powered by BlogBuilder
© MMXXII