Five Reasons for Using an O/R Mapping Tool

So, why should you use any O/R mapping tool? I am not talking about a specific tool but rather all O/R mapping tools in general. There are a number of reasons for using an O/R mapping tool but before I dive into that, let me give you a brief overview of what an O/R mapping tool really is.

An O/R mapping tool generates persistence objects for your .NET application. It is a modeling and code generation tool that connects to your database and reads its schema, then lets you map objects to database tables and views, specify single-row insert, update, load, and delete operations, queries and stored procedure calls, as methods to these objects. And, it also lets you define one-to-one, one-to-many, many-to-one, and many-to-many relationships between objects based on relationships between tables in the database. It then generates fully working persistence objects code for you.

There are many other features that a good O/R mapping tool provides but I'm keeping my description brief so I can talk more about the benefits.

Reason 1: Cuts down your development time

First benefit of an O/R mapping tool is that it saves you a ton of development time (20% to 50% time depending on your situation). Now, O/R mapping tool is not generating any "rocket science" code for you and you could definitely do it manually if you wanted. But, this is a lot of tedious work and you would definitely be happier if you didn't have to do it yourself. Let's do some simple math.

A typical application with 15-20 database tables has 30-50 objects (including domain and factory objects) and this is roughly 5000 to 10,000 lines of code. It is likely to take you a few weeks to a couple of months to develop and test this code. And, if your application has more tables than this (which many do), then just multiple the above numbers by that much.

On the other hand, an O/R Mapping tool would generate this code for you in a day or two. Even here, you need these 1-2 days primarily to determine your object mappings to the database. The actual code generation is instantaneous. So, your time saving is tremendous.

Reason 2: Produces better designed code

Second benefit of an O/R mapping tool is that it lets you produce better designed code than doing it yourself by-hand. I know what you're thinking. You think you can do a better job than an O/R mapping tool because you write every aspect of your code. Some of you definitely can but not everyone. Consider this. An average development team has different levels of expertise and experience and not everybody is a good designer. As a result, they may not follow design patterns in their code and end up with a lesser quality code. And, if multiple developers are writing code, their code is very likely going to be inconsistent with each other. And, inconsistency itself is a big source of poor quality in an application's code.

On the other hand, a good O/R mapping tool uses code templates that have excellent design because they are very likely designed and created by very senior (architect level) engineers. And, these code templates almost always follow known design patterns. So, the code that you'll generate from an O/R mapping tool is very likely going to be better designed than code designed by your own development team.

Reason 3: You don't have to be a .NET expert

Third benefit of using an O/R mapping tool is that you don't have to be a .NET expert to develop your persistence code. As you know, data access code is critical for the overall performance of your application. If this code is designed and developed poorly, it can severely affect your application. So, if you developed this code by hand, you need to be an export of .NET, COM+, stateless components, and MTS.

However, if you use an O/R mapping tool, you can focus primarily on the "logical design" of your persistence objects including object mapping and the different types of interactions with the database including insert, update, load, delete, queries, stored procedure calls, relationships, and more. And, the O/R mapping tool would do the rest for it. It would ensure that the generated code follows all the best practices of writing stateless .NET components to run in COM+ and MTS.

Reason 4: Saves you testing time

Fourth benefit of an O/R mapping tool is that it reduces your testing effort dramatically. If you developed all the persistence code by hand, you would also be responsible for testing it yourself. And, as you know, testing is as much effort as development in any project.

On the other hand, if you generated code from an O/R mapping tool, it is coming from code templates that are very likely thoroughly tested by the software vendor itself (more so than you because it is their primary focus). And, on top of it, most likely hundreds or perhaps thousands of other customers are using this tool and have tested the code generated from this O/R mapping tool. As a result, many of the bugs that you might not find in your own testing have already been found and fixed in the generated code of an O/R mapping tool.

Reason 5: Simplifies your .NET development

If you have to write all the persistence code yourself, you're bogged down into the details of ADO.NET, COM+, MTS, stateless .NET components, and more. And, you end up spending a lot of time in details that you really don't need to. On the other hand, if you generate code from an O/R mapping tool, you get well design objects and you only need to deal with their public interface.

Below is an example of code you'll write if you used an O/R mapping tool.

try {

Employees objInfo = new Employees();

EmployeesFactory objFactory = new EmployeesFactory();

objInfo.EmployeeID = EmployeeID;

objFactory.Load(objInfo);

// code here to use the "objInfo" object } catch(Exception ex) {

// code here to handle the exception

return; }

As you can see, the generated code is very simple to use than actually writing the .NET components yourself.

Many people have never heard of O/R mapping tools and many more have heard of them but are afraid to use them. I hope I have made a strong enough case here for you to give a serious consideration to O/R mapping for your project.

Iqbal Khan is the Director of Sales & Marketing at AlachiSoft (http://www.alachisoft.com/), a leading provider of O/R Mapping tool called TierDeveloper. You can reach him at http://www.alachisoft.com/.

tidy up service Lincolnshire ...
In The News:

Uber Parking launches in 15 U.S. cities after the SpotHero deal, offering upfront prices, Uber One credits, and a future role for robotaxis in garages.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents now and for the future.
Microsoft Outlook flaw CVE-2026-124194 lets a malicious .msg file expose NTLMv2 authentication data, and Microsoft confirms hackers already exploited it.
Former Secret Service cyberfraud investigator Jason Brown warns AI voice cloning scams could trick families into losing thousands of dollars this holiday season.
A single data broker opt-out may not be enough. Spokeo, Whitepages and BeenVerified can still expose your address and family details to scammers.
Apple Photos now embeds an invisible SynthID watermark in images edited with Apple Intelligence tools like Clean Up, Extend and Reframe in iOS 27.2.
Fortra researchers say fake vacation rental sites use live customer support chats to trick travelers into handing over credit card details this holiday.
Ecolab CEO Christophe Beck says AI data centers could drink as much water as Americans by 2030 unless direct chip cooling and water recycling catch on.
Ring's Drone Cam flies room to room with AI navigation, 2K video and a $249.99 price, but it still awaits FCC authorization before it can ship in the U.S.
Virginia's GPS speed limiter program is already active for reckless driving offenders, but early users report glitches that apply wrong speed limits.
VPN split tunneling lets your banking app skip the encrypted tunnel while other apps stay protected, and the Allow LAN setting can fix printer issues.
A fake E-ZPass email cites a real federal regulation to demand toll payments, but the law it references has nothing to do with collecting tolls.
A credit freeze, fraud alert and identity monitoring each protect different parts of your financial life after a data breach. Here's how to choose.
OpenAI's new classifier flags 48% fewer images for review while detecting similar levels of CSAM, and ChatGPT now suspends users for 24 hours.
USF researchers built an AI mosquito trap with over 98% accuracy as Florida battles its largest dengue outbreak in decades with 524 local cases.
Fake OpenAI event pages promise free ChatGPT Pro subscriptions, then trick employees into handing over Microsoft and Google account credentials.
Ford's new privacy promise pledges not to sell driving data to insurers or brokers, but disabling connected car data sharing could cost you key features.
Google says Videostrong deliberately installed backdoor malware in over 1.3 million Android TV boxes, turning them into a botnet for criminals.
Foundation Future Robotics co-founder Mike LeBlanc says the MK 2 humanoid is ready to engage enemies with machine guns in Ukraine's combat zone.
EAIGLE says its AI camera technology cuts truck check-ins from 10 minutes to under 30 seconds, potentially reducing fuel waste across supply chains.
The Fox News AI Newsletter covers the latest artificial intelligence technology advancements, including the challenges and opportunities AI presents.
After the military, some veterans are left wondering what's next? Nonprofit organization Vets to Drones is helping them take on a new path by becoming certified drone pilots.
Natasha Lopez says a Flock camera system helped a Georgia deputy track her family, and after she spoke out, a fake Facebook page targeted her children.
Data broker opt-outs may not keep your personal information private for long. Five common myths leave retirees especially vulnerable to scams.
What's Nvidia's future after the resignation of CEO Jensen Huang amid scandals? Weigh in here!

Does your Company have Documentum?

Are you lost in the mess of documents that get... Read More

C++ Tutorial 1, Introduction to C++

Introduction to C++Why Learn C++?C++ may at first seem like... Read More

Microsoft Great Plains: Interest Calculation Example ? Stored Procedure for Crystal Report

This is intermediate level SQL scripting article for DB Administrator,... Read More

10 Steps To Secure And Manage Your Passwords

Passwords protect your most sensitive personal, financial and business information.... Read More

How a Bug Challenges to a Software Professional

It is really interesting that a bug can create problem... Read More

Linux vs Windows Operating Systems

With so many Microsoft Windows related viruses, errors, and other... Read More

Microsoft Great Plains Implementation for Large Corporation ? Overview for VP IT

Microsoft Business Solutions Great Plains was historically designed to serve... Read More

Need of Document Management System (DMS)

Document Management or Enterprise Information Management is perhaps one of... Read More

Introduction To ISDN, Part II

In the previous ISDN article, we looked at how and... Read More

What You Should Know About Installing Screensavers

Do you remember that frustrating feeling when you find an... Read More

Beware of The Pirated Software E-Mail Scams!

You have gotten those E_Mails buy software at deep discounts.... Read More

Start Developing Your Own Software

Learning how to program software seems like a daunting task... Read More

Navision Customization: C/SIDE, C/ODBC, C/FRONT, XBRL ? Development Options

Microsoft bought Navision, Denmark based software development company, along with... Read More

Programming Environments And The Software Production Process

Introduction: The creating of a computer program involves a number... Read More

Recent Studies Show that 9 out of 10 PCs Are Infected with Spyware

Spyware and malware are large problems for Internet users today... Read More

Industry Experts Answer the One Million-dollar Question - Why Genie Backup Manager?

Many reasons made GBM a unanimous choice for experts, one... Read More

Great Plains Bill of Materials Setup & Customization for Process Manufacturing ? Overview

Microsoft Great Plains has full-featured Manufacturing suite of modules: Capacity... Read More

Implementing Microsoft CRM: setup and configuration ? notes for IT specialist

Microsoft Business Solutions CRM is web-based CRM application, deploying all... Read More

Microsoft Great Plains GL: General Ledger ? Overview For Consultant

Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More

Microsoft Great Plains Project Accounting ? Overview For IT Director/Controller

Microsoft Business Solutions is now in process of creating so... Read More

Great Plains Dynamics/eEnterprise Upgrade ? Things to Consider and FAQ

If you have Great Plains Dynamics/eEnterprise (version 6.0 or earlier)... Read More

Lotus Domino/Notes - Microsoft Great Plains Tandem as ERP with Documents Workflow - Overview for IT

Lotus Domino/Notes ? Microsoft Great Plains tandem as ERP with... Read More

Think Of This

Think of this, first we had the HAM Radio, then... Read More

Spyware Statistics -- Whats New in May 2005?

Although statistics often is blamed for various deadly sins --... Read More

Keeping Track

One of the things we can be as certain of... Read More

whole house cleaning Deerfield ...