Article Preview
Buy Now
COLUMN
Object-Relational Mapping
Making databases easier
Issue: 9.5 (July/August 2011)
Author Bio: Paul Lefebvre has been using Real Studio for 9 years. His company, LogicalVue Software, specializes in creating database applications using Real Studio. Paul also runs the RBDevZone community site and is a founding member of the Association of REALbasic Professionals.
Article Description: No description available.
Article Length (in bytes): 5,616
Starting Page Number: 74
Article Number: 9511
Related Link(s): None
Excerpt of article text...
Last time we learned about object-relational mapping and how it can simplify your code. But an ORM is not all unicorns and rainbows. This time we're are going to look at some of the downsides of using an ORM.
Disadvantages of ORM
Can be slower than direct DB access
As you might suspect, adding another layer to your database access can make your database reads and writes a bit slower than when accessing it directly.
The framework needs to map the class properties to the database columns and eventually create an SQL statement every time that data is loaded or saved. It's also possible that the ORM will create SQL behind the scenes that is not as optimized as what you could code by hand.
This can be mitigated somewhat by having the ORM cache your data. In this case, the ORM checks the cache before going to the database at all.
...End of Excerpt. Please purchase the magazine to read the full article.