Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now

Issue 9.5


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.