|
|
|
|
|
|
|
Read How-To-Select Guide in HTML Format |
|
|
.NET Developer Series
2006 - 1st Edition  How-To-Select an Object-Relational Mapping Tool for .NET
Covers Tools for Storing .NET Objects in Relational Databases
By Jason Mauss
Scenarios discussed in this Guide:
Decision Points discussed in this Guide:
http://www.howtoselectguides.com/dotnet/ormapping/
Executive Editor - .NET Developer Series Mike Gunderloy | http://www.larkware.com
Author Jason Mauss | http://www.devcampus.com
Copy Editor Melanie Spiller | http://blogs.officezealot.com/spiller/
Design & Layout Palo Creative | http://www.palocreative.com
Publisher Xtras, Inc. | http://www.xtras.com
Xtras, Inc., Copyright © 2005.
Published twice monthly. All rights reserved by Xtras, Inc. No part of this publication
may be reproduced without written permission from the Publisher.
How-To-Select Guides and How-To-Select Guides logo are trademarks of Xtras, Inc.
How-To-Select Guides is a publication of Xtras, Inc.
Printed version is printed in the USA.
Xtras, Inc. would like to thank SourceGear (www.sourcegear.com/vault/)
for graciously donating licenses to use Vault to the How-To-Select Guides. We use SourceGear Vault for version control of Guide content.
All products and company names mentioned in this document may be trademarks or
registered trademarks of their respective owners.
Introduction
Hello and welcome to the sixth in Xtras' series of How-To-Select™
Guides: How-To-Select an Object-Relational Mapping Tool for .NET.
In this particular Guide, we've evaluated products designed to help you manage that mapping of relational data
into objects and vice versa. As with the other Guides in the .NET Developer Guide Series, we've written this Guide
for developers using C#, VB.NET, or any other .NET language. We've included a discussion of what obfuscation does
and why you might want to use it, and offered guidance to help you choose the most appropriate obfuscation product
for your own needs.
The Best Product for your Needs
We bring you the info you need to make informed choices when choosing .NET components and tools for your project.
Each How-To-Select Guide goes in-depth into a different product category. We offer expert selection guidance and
profile every product we can find in the relevent category, limited only by the vendor's willingness to participate.
Plus we'll revise each Guide biannually to keep abreast of changes.
We Inform, We Don't Decide (for you)
Rarely is there one product that meets everyone's unique needs but that doesn't stop others from selecting a single
"best" product as "editor's choice," but not here. Our How-To-Select Guides instead focus on the product
categories to help you quickly become a category expert and ensure our Guides are useful long after written.
We'll help you sort out use cases for various product types, cover vendor support and licensing policies, and make
sure you understand what each product profiled can (and can't) do for your project. We profile both free and open
source software alongside commercial offerings so we don't articially limit your options.
Our Goals
We set forth several goals for our How-To-Select Guides. We wanted
them to be:
- Clear & Concise - Quick to read and easy to comprehend.
- Accurate & Unbiased - Completely Defensible among leading
experts with as little bias as humanly possible.
- Exhaustive, Thorough, & Complete - Covering all options
include commercial, shareware, freeware, open source, and even
coding techniques; all decision points and aspects of potential
concern; and including all currently available products in the
category.
The Perfect Guide Includes You!
We know our How-To-Select Guides can save you time and help you
avoid costly mistakes but we need your help to make them even better:
- Subscribe - Subscriptions are free, so sign up on our website to
receive each Guide as it's released.
- Participate Online - Ask questions and make suggestions onlines at our forums located at
http://forums.howtoselectguides.com.
- Email Feedback - Send your questions, comments, or suggestions to
feedback@howtoselectguides.com
- Tell Others - If you know .NET developers, send them a link to
http://www.howtoselectguides.com and suggest they subscribe too.
- Mention in Newsgroups - When you answer questions in developer
newsgroups and forums about components and tools, mention and include
a link to our Guides.
- Blog about a Guide - If you blog and are inspired by our Guides,
mention and include a link to that Guide.
- Ask Questions - If our guides don't answer a question you have,
ask it in the forum so one of our authors and your fellow .NET
developers can answer the question for you.
- Answer Questions - Answer questions asked in our forum by of
other .NET developers, which also helps others with the same question.
- Make Suggestions - If you notice anything we can improve
about our Guides, post a suggestion in our forums.
- Offer to Write - If you are a category expert, or want to become
one, and you are a good writer willing to meet deadlines, offer to write
one of our future Guides.
- Encourage Vendor Participation - Tell vendors being included
in relevant Guides is a prerequisite for considering purchase of their
products.
- Support our Sponsors - Please consider supporting the companies
that sponsored and/or advertised in these Guides, such as TallComponents
and Xtras.Net in this Guide edition.
Thanks for reading about our new How-To-Select Guides, and we hope this and future Guides will both save you time
and help you make the right selection!
Oh, and don't forget to subscribe!
-The How-To-Select Guides Team
A Brief Discussion on Object-Relational Mappers
"Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
- Robert Heinlein, Time Enough For Love
If there's ever been one thing programmers have been good at since the dawn of computing, it's been figuring out how to make their jobs easier.
Once certain patterns emerge, reusable code and components are soon to follow. In the case of code generation and O/R Mappers, sometimes the
reusable code is used to generate more code.
As the role software plays in business becomes more important, the industrial-strength database platforms that used to live only within data centers
have made their way out onto smaller, more personally manageable servers, and in some cases, on to desktop computers. Today the majority of all applications
built use relational databases as their data storage mechanism. Thus, with the evolution of application development came the evolution of database
drivers and the flurry of acronyms we see today, like ODBC, OLEDB, JDBC, DAO, RDO, and ADO. Although each of these database interaction libraries provides
everything needed for applications to communicate with the database, they do little or nothing to help translate and persist the objects used by
applications into SQL statements and data that can be stored by the relational databases. This work had to be done manually--meaning code had to be
written by the programmer's hands every time.
For many years, developers repeatedly wrote the same data access layer code--methods called PersistChanges() or UpdateOrder(), which
took actions such as building a SQL command to be sent to the database for processing, or updating a column value and having the database connectivity
library handle the details of relaying that information to the database. There was very little variance among the actions taken by these types of methods
that prompted programmers to consider building a general-purpose solution, something that could--with a little bit of information about the objects
and data structure involved--automatically handle the tedium involved with CRUD (Create, Read, Update, Delete) operations. In the case of code
generation, the idea is the same but, rather than a general purpose component, all of the code typically be written by hand is automatically
generated based on database objects. It's just different sides of the same coin, you might say.
O/R Mappers and code generation started off with simple ideas and performed simple CRUD tasks easily. However, as these technologies have gained broader
use, complexity has crept in. Most O/R Mappers on the market today have a special syntax to support specifying object criteria, such as a date range or
ID value. Additionally, many O/R Mappers deal with a host of other concerns such as caching, concurrency, and validation, all of which are issues found
in data access layer code.
Most database applications that use more than a handful of tables can benefit from O/R Mapping and code generation. The best way to determine if an
O/R Mapper or code generation tool will help reduce your development costs is by taking a product for a spin and kicking the tires a bit. Although this
guide will definitely help point you in the right direction, you should make an effort to evaluate products that interest you before settling on one
in particular, which brings us to the topic of "how do I choose an O/R Mapper?"
What To Look For
Which O/R Mapper is best for you depends on your needs and preferences. Although there is a common level of functionality among almost every O/R Mapper,
some provide more advanced features or can do code generation that the others do not. Some come with tools to help manage external configuration/mapping files, which
may be important to you if you don't like editing files by hand. If price is an issue, you might take a closer look at the free components covered in
this Guide. You may consider vendor support an important aspect of your purchase. Microsoft, the vendor of .NET itself, currently has an O/R Mapping framework
named "ObjectSpaces" in development that, despite its delays, is aiming to provide developers with an O/R Mapping framework that will likely ship with a set of
components packaged with Windows Vista upon its release. A little further in this Guide you will find a list of decision points that aim to provide you
with a list of things to consider when evaluating an O/R Mapper for .NET.
Scenarios
There are a couple of different ways that you might want to incorporate an O/R Mapper or code generator into your software.
Although it's impossible to explore every possibility, this section of the Guide offers some general guidance to common scenarios.
Data Access Layer Components
Data Access Layer Components could be said to be the main target for O/R Mappers. Multi-DBMS support is important here, as your
application might need to support more than one database as the storage mechanism. Support for transactions, null values, caching,
stored procedures, SQL Logging, data-binding, and an OO-Query syntax are all considerations when using an O/R Mapper for a data access layer component.
Generating CRUD Code
CRUD (Create, Read, Update, Delete) code can be time consuming to write by hand. This process is also prone to errors, the likeliness of which increases with the more entities you have
in your database. Using scripts or templates, code generators can help you automatically generate all of the code required to perform CRUD operations
against your database in an object-oriented fashion. By repeating this process after any changes are made to your database schema, you can use a code
generator to greatly reduce the amount of time required to maintain the synchronization between your object model and your data model.
Decision Points
With the number of O/R Mapping components on the market already, just the work it takes to find all the available choices can take an entire day. That's
before you take the time to actually evaluate each product. Below is a list of decision points that you might want to keep in mind as you look at what
each product has to offer.
Naturally, not all of these factors apply to every application.
Try Before You Buy
The first thing to keep in mind is that no matter how much information we pack into this Guide, there's no substitute for trying the software
in your own environment and on your own application. No one knows your own requirements, or the quirks of your own tools and components, better than you do. Fortunately, just
about every vendor in the .NET tools and components business provides a trial version of their software for free evaluation. We
recommend that you use this Guide to locate the O/R Mapping components that seem like a good fit for your application, and then download copies to
evaluate them in your own environment. With O/R Mapping components, you'll find that evaluation copies normally display a nag dialog when certain features
are accessed or are limited editions that do not contain some of the more advanced features that come when you purchase a licensed copy.
This is not enough to interfere with evaluation, but generally precludes you from using an evaluation
copy in a commercial application. Of course, you should follow the licensing requirements scrupulously in any case.
Trying before buying with O/R Mapping components is most important so that you can get a feel for the feature set of the component, how easy the
API is to work with, and how well supported the component is with help files, documentation, source code examples, and
design-time support. Some O/R Mapper vendors are happy to provide clients with free e-mail support during their evaluation period, while others
may refer you to a knowledge base or forum for peer support. Some vendors also have How-To listings on their Web sites so that you can review code samples
showing how to use their product in your application.
Version Support
As of mid-2005, you might be working with .NET 1.0, .NET 1.1, a beta version of .NET 2.0, the .NET Compact Framework, or the
Mono implementation of the .NET Common Language Runtime (a cross-platform open source implementation available for Windows
and Linux). Although some O/R Mapper components are compatible in any of these environments, others have limitations such as
using libraries not included with the .NET Compact Framework or not yet being compatible with new features in .NET 2.0. You'll need
to verify that your vendor can match all of your target environments, or that they have a plan for doing so before your planned ship date.
Source Code
Obviously, open source vendors allow you to access the source code behind their products. Surprisingly, so do some of the vendors that do not
give away their product for free. Although some vendors charge extra or require special agreements to send you the source code, some will freely
provide it with the product. This may be important to you if you require the ability to fix bugs or add features without relying on the vendor or if you'd like
to be able to point the vendor to the problematic source code when you report it in order to get your support request resolved more quickly.
Mapping Configuration Tools
Some of the O/R Mapper components we reviewed made use of external XML mapping files that can become very lengthy depending on the number of entities
you have in your system. Managing these files is simplified greatly if the vendor provides a utility for configuring them.
Caching Support
For applications accessing data that does not change frequently or only needs read-only access, caching can play an important role. Different methods
of caching can be employed among O/R Mappers like a disk-based cache or in-memory. Additionally, some O/R Mappers can cache the object-relational
mapping information in order to remove the need for accessing the mapping file repeatedly. As one of the most important requirements for implementing
an O/R Mapping component is that there be no loss of performance, caching can make a big difference in whether your performance requirements are
met or not.
Object-Oriented Query Language
The goal of some O/R Mappers is to remove all traces of SQL from your data access code. In place of SQL, some products support a proprietary syntax
for specifying what is effectively your WHERE clause criteria. Other languages, like OPath as well as expression builders, and even raw SQL, are supported
in some products. What works best for you and which method of query expression you're most comfortable with might help narrow down your choices of O/R
Mappers to consider. Other considerations to make in this area are whether or not you anticipate needing support for DBMS-proprietary keywords in your
SQL statements, such as the TO_DATE() function in Oracle.
Object Model Support
Some O/R Mappers are said to be "non-intrusive" or to support POCO (Plain old CLR Objects) because they allow you to take your existing
object model (or the objects generated by a code generator) and, with a little configuration work, map them to the existing database structure. If
you have an existing object library and are looking to port it over to using an O/R Mapper or code generator, this might be a feature you'll want to
look out for.
Features
The following list of features is provided by category and then by specific feature.
General Features
These are features that apply broadly across many types of software.
- Managed Code -
The product is 100% managed code, as opposed to unmanaged code or a managed code wrapper around unmanaged code.
- Integrated Help -
The product provides a help file integrated directly with the Visual Studio .NET help file.
- External Help -
The product provides an external help file.
- Documentation -
The product provides documentation beyond a help file, such as a manual or code samples.
- Peer Support -
There are peer support options, such as newsgroups or discussion boards, available for the product.
- Vendor support -
The vendor provides direct support options for the product, either as part of the purchase price or as a separate support contract.
- .NET Framework 1.0 Support -
The product includes a version that works with the .NET Framework 1.0.
- .NET Framework 1.1 Support -
The product includes a version that works with the .NET Framework 1.1.
- .NET Framework 2.0 Support -
The product includes a version that works with the .NET Framework 2.0.
- Compact Framework Support -
The product includes a version that works with the .NET Compact Framework.
Object-Relational Features
- OO-Query Support -
The product supports a parameterized or free-form text format for specifying object criteria.
- External Mappings -
The product supports using an XML or other file format to store the object-database mappings.
- Internal/Attribute Mapping -
The product supports using code attributes or internal mapping instructions.
- Multiple DBMS Support -
The product supports more than one Database Management System.
- Databinding Support -
The product supports data binding to object fields.
- Stored Procedures -
The product supports calling Stored Procedures for CRUD operations.
- Mapping Configuration Tool -
The product provides a tool to manage the mapping configuration file(s).
- Generics Support -
The product supports generic types in .NET 2.0.
- SQL Logging/Spooling -
The product supports spooling any SQL statements executed against the database to a log file.
- Lazy Loading -
The product supports lazy loading of data into an object model/hierarchy.
- Code Generation -
The product supports generating the code--classes and data access--necessary for translating your objects into database records and vice versa.
- Server-side Paging -
The product supports getting only the data it needs from the server, rather than retrieving the entire data set from the server and then
filtering the view of the data on the client computer.
- Caching -
The product supports the caching of data locally using the disk or in-memory.
Vendors/Software Authors in this Guide
 Sekos Technology, Ltd. http://www.sekos.com Sekos Technology Ltd., 301-1641 Lonsdale Ave, North Vancouver, BC, V7M 2J5, Canada. Canada and Ireland
 Solutions Design http://www.sd.nl Solutions Design, Zeilstraat 99 2586 RB, Den Haag, The Netherlands. The Netherlands
Products Profiled in this Guide

Version 2.2, Starts at $229 Download it here
Licensing: Proprietary
AgileStudio provides a Visual Studio .NET add-in that allows you to set up connections to your database, define the objects you want to work with, and then
creates typed datasets and Windows Forms controls based on your choices. AgileStudio requires using the .NET InstallUtil utility to install
the AgilePages DataStore Manager Windows Service, which handles the interaction between the Visual Studio .NET add-in and your database, either SQL
Server or XML files. Then, using the Visual Studio .NET add-in, you can define new objects and their members, and map these to your data store. Once
your data store is configured, AgileStudio adds some .NET components (AgilePagesDataSetManager and AgilePagesConnection) to your form to help
manage the interaction with the database, and automatically generates the code required to persist changes made with the application. Support for
AgileStudio is provided through an online Knowledge Base at the vendor's Web site or through e-mail.

Version 2.2, Free Download it here
Licensing: LGPL
The ATOMS Framework Project is an open source O/R Mapper project for Visual Studio .NET that provides object persistence using several database
providers including Firebird, Informix, MaxDB, Microsoft SQL Server, MySQL, Oracle, and PostgreSQL. To use the ATOMS Framework, you can
register the component provided by the vendor in the GAC on the your development computer or add a reference to it in your project. Also available
from the vendor are some sample projects and NUnit tests to show you how to use the ATOMS Framework. Support for the ATOMS Framework is provided
through the public forums at the SourceForge project page.

Version 1.2.0, Free Download it here
Licensing: LGPL
BBA DataObjects is an object-to-relational mapping library for .NET that maps SQL Server tables to objects. Top features include
lazy loading, paged loading, and cryptography. BBA DataObject works by having you create classes that inherit from classes in the BBA DataObjects
library, which handle persisting the object to the database automatically. Support for BBA DataObjects is provided through public forums at the
SourceForge project home page (which looks fairly quiet) and through e-mailing the SourceForge project owner.

Version 0.9.9.1, Free? Download it here
Licensing: Proprietary
BizBlox is a code generation tool that generates its code from SQL scripts exported from SQL Server Enterprise Manager, Query Analyzer, or
scripts you may have written by hand. This generated code implements the BizBlox ORM API to automatically persist the objects to the database. BizBlox
supports code synchornization for the code it generates, so that changes to the data schema (scripts) can be made and then reflected in the generated code
upon the generation of the code.
One of the requirements of BizBlox is that you use the uniqueidentifier data in your primary keys since BizBlox implements the GUID data type
for the primary key value in its tables. From within the Visual Studio .NET IDE, you can use the BizBlox ORM API with your own objects by adding
a reference to the BizBlox ORM components to your project. The BizBlox architecture makes use of the transfer object design pattern, which places
importance on fast distributed-object communication for data access objects. Support for BizBlox is provided through an online Knowledge Base at the
vendor's Web site.

Version 1.1.0.0, Free Download it here
Licensing: Apache License 2.0
Codus is a code-generation tool for object-relational mapping that provides a wizard-like tool to guide you through the process of defining a
database connection, choosing the tables or views you'd like to generate code to interact with, choosing a code generation template, and then
generating the code itself. Additionally, Codus gives you the ability to generate NUnit tests, NAnt build files, VS.NET solution files, Web
Services, stored procedures, and Zanebug tests (Zanebug is a unit testing product by Adapdev). Currently, Codus supports Microsoft SQL Server,
Microsoft Access, and Oracle with plans to support MySql in the near future. Support for Codus is provided via online forums or by e-mail.

Version 1.1, Starts at $99 Download it here
Licensing: Proprietary
DADO Object Mapper is an O/R Mapper that also can work in conjunction with DADO's Application Server and Broker System all bunded
together to provide a framework for multi-tier distributed object-oriented enterprise applications. DADO Mapping Studio is the front-end
O/R Mapper that provides a tool for managing your O/R mapping projects, as shown in the screenshot. Using this tool you can
import objects from several different database systems including SQL Server, Oracle, MySQL, DB2, and Microsoft Access. Mapping is handled using an
XML file that you can manage from the Mapping Studio application. Support for DADO Object Mapper is handled via e-mail or by more direct means if
you purchase DADO's greater support package. Source code for the framework can also be requested by e-mailing the vendor.

Version 1.1, 150 euros Download it here
Licensing: Proprietary
DataBlock is a code generation tool that allows you to generate database platform neutral code in either C# or Visual Basic .NET from the data model and
schema information found within your database. DataBlock supports Microsoft SQL Server, Microsoft Access, and MySql. All mapping and configuration
settings are output via code attributes and are compiled into the .NET assembly. These mappings are also controllable through the GUI code
generation tool. Customer Support for DataBlock is handled via e-mail and phone. Customers may also receive the source code to DataBlock, which
enables you to make changes to the way the mapping and code generation is performed by the tool.

Version 1.1.1845.40237, Starts free, $70 for Standard Edition, $120 for Professional Edition. Download it here
Licensing: Community, Standard, Professional
Latticesoft Data Mapper is a .NET object-based persistence library for relational databases that supports SQL Server, Oracle, and OLEDB-accessible
databases using external XML configuration and mapping files. Objects can also be mapped to stored procedures or static SQL statements.
To use the Data Mapper, you install the Data Mapper persistence framework on your computer and reference the Data Mapper assembly in your
projects. Data Mapper also comes with a utility called SPGen that can auto-generate CRUD stored procedures for each table and view in SQL Server,
Oracle, and DB2 databases. Support for Data Mapper is provided via an online request form.

Version 3.5, starts at $299, volume discounts available Download it here
Licensing: Proprietary
DataObjects.NET is an object persistence framework that, in addition to providing O/R Mapping features, also provides business object services similar
to .NET Enterprise Services, such as transaction management, security (ACLs), and automatic handling of Remoting. DataObjects.NET supports several
database systems such as SQL Server (including version 2005), Oracle, Microsoft Access, MSDE 2000, Firebird, and MaxDB. DataObjects.NET also supports
all object-oriented features like inheritance (including interfaces), and allows you to query against the whole inheritance hierarchy of a persistent
type or interface. Support for DataObjects.NET is provided via online forums or by e-mail.

Version 9.004, Download it here
Licensing: Proprietary
EdgeXTend is a code generation tool that generates C# data access layer code for .NET applications. A code generation tool is provided that allows
you to define your classes and their members for your object model. At run-time, the generated code makes use of Persistence's O/R Mapping, caching, and
synchronization (if desired). Caching instructions can be stored in a separate XML file, and can be made to work in a clustered environment if the
need to scale your application arises. Support for EdgeXTend includes many options such as an online Knowledge Base, e-mail support, online
documentation, support programs and services, and Live!Debug sessions where you can allow a support agent to take control of your computer to help.

Version 1.3.1, Free Download it here
Licensing: LGPL
Evolve .NET Data Access Objects consists of three components. First, a data access layer for accessing a relational database over an abstract layer.
Second are Persistence Containers, which are an O/R Mapping layer used to handle CRUD operations. Lastly, .NET Data Access Objects provides a
Visual Studio .NET add-in to assist in helping you define the mapping information used by the Persistence Containers. This mapping information
is stored in XML files. Support for Evolve .NET Data Access Objects is provided via public forums at the SourceForge project home page and by
e-mailing the SourceForge project owner.

Version 1.5, $199 with source code, $149 without. Download it here
Licensing: Proprietary
eXpress Persistent Objects for .NET, or XPO is an O/R Mapping framework designed to fully shield the developer from the database. To use XPO, you
develop objects that inherit from XPO's persistent objects, and XPO generates the database for them automatically. XPO also automatically handles
the relationships between classes and object inheritance. Not everything is out of your hands, however. If you require more precise control
over the way the O/R Mapping is performed, you can make use of XPO's built-in code attributes to provide more explicit mapping instructions to XPO.
You can specify retrieval, sorting, and filtering criteria using straightforward object syntax provided by the framework. XPO presently supports
Microsoft Access, Microsoft SQL Server, MySQL, Oracle, PostgreSql, Firebird, and Advantage database systems. XPO comes with full source code available
if you decide to purchase it. Support for XPO is provided via an online knowledge base, forums, and newsgroups.

Version 2.2.10, Starts at € 299 Download it here
Licensing: Proprietary
Genome is an O/R Mapping tool that provides automated persistence for .NET classes. OQL is supported as the language with which to specify
object criteria. Another useful feature of Genome is its ability to generate DDL scripts for any given business layer-to-database mapping.
Genome's mapping information is stored in XML files that can be edited by hand. Genome also supports features like result paging, partial object
loading, and greedy loading hints in order to help with performance. Support for Genome is available via newsgroups at
news://news.techtalk.at/techtalk.public.genome.support and also through incident report requests and by e-mail. Genome also offers extra services
like architectural support/reviews, developer coaching, and code reviews.

Version 1.2.5, Free Download it here
Licensing: LGPL
Gentle.NET is a free, database independent object persistence framework. It features automatic SQL generation and object construction, a SQL
factory for creating custom queries, DataView construction helpers, and more. Gentle.NET supports providers for Oracle, PostgreSQL, MySql,
Firebird, SQL Server, MSDE, Access, SQLite, and Sybase. Using Gentle.NET requires adding references to a few different Gentle.NET assemblies
and then providing configuration settings for database connection strings, database providers, etc. From there, Gentle.NET automatically
handles persisting the objects that you have placed certain attributes on, such as the TableName attribute for classes, and the TableColumn
attribute for members. Support for Gentle.NET is provided at the SourceForge project public forums and at the Gentle.NET Community page found at
http://www.mertner.com/confluence/display/Community/Home.

Version 1.0.1654.34510, Free Download it here
Licensing: Open Source
Grove is an O/R Mapping component library for .NET requiring that each object needing persistence contain an attribute that lists
the table name from the data source such as [DataTable("Orders")]. These attributes also let you specify information such as join types for
multi-table objects and primary and foreign key information for class members. Grove supports basic transactions through methods like BeginTransaction,
Commit, and Rollback, and supports SQL Server, OLEDB, and ODBC Data Sources. Methods taken to get support for Grove are not clear from the vendor's
Web site, although e-mail addresses for the Grove team are provided.

Version 1.2.1, Free Download it here
Licensing: Apache License 2.0
iBATIS DataMapper is a Java/.NET framework meant to help design and implement persistence layers for Java/.NET applications. iBATIS couples objects with
stored procedures or SQL statements using an XML mapping file. iBATIS Data Mapper supports providers for Access, SQL Server, Oracle, MySql, PostgreSQL, DB2,
and generic ODBC and OLEDB providers. Using the XML mapping file, the iBATIS framework allows you to query for the objects you want, and returns them
to you using the IList interface. Support for iBatis Data Mapper is provided by FAQ, a Wiki, mailing lists, and a bug submission tool, all found on the vendor's Web site.

Version 2.0, Starts at $17 Download it here
Licensing: Proprietary
Itec Data Layer comes in the form of an application called MyCodeGenerator that is a code editor and a code generator. You
can create your own projects and templates within MyCodeGenerator to tweak the structure used in generating the code. Additionally,
the code generated can make use of the Data Access Application Block and the Exception Management Block that are part of Microsoft's Enterprise
Library. MyCodeGenerator supports code generation for either C# or Visual Basic .NET and allows you to specify a default namespace name for the generated code.
MyCodeGenerator also has the ability to create and use Stored procedures for your project and can generate typed datasets using the XSD.exe utility.
Support for MyCodeGenerator is via e-mail.

Version 1.0.2004.2, € 229 Download it here
Licensing: Proprietary
LLBLGenPro is both an O/R Mapper and a code generation tool for .NET that generates a complete data-access tier and business object tier for
either C# or Visual Basic .NET based on an existing database schema. LLBLGenPro makes use of the provider model for database access architecture and supports
SQL Server, Oracle, Access, MySQL, Firebird, the IBM DB2 UDB.NET provider. LLBLGenPro's Code Generation and O/R Mapper work in conjunction with
each other in that once you have generated your project's code, you then reference the LLBLGenPro ORM support library in the client project and
have ORM support for the code generated by the tool. Support for LLBLGenPro is provided via forums on the vendor's Web site and via e-mail (directly
or through a Web contact form). Also, many sample projects are available for download on the vendor's Web site.

Version 1.1.3, Free Download it here
Licensing: Free
MyGeneration is a free code-generation tool that executes templates to convert database schema objects into object models, stored procedures,
markup languages, and ASP.NET pages. These templates can be written in a variety of languages including Visual Basic .NET, C#, VBScript, and JScript. Each
language has the ability to mix literal content and executable or interpreted code using the syntax introduced by classic ASP (<% %> tags).
One of the unique features of MyGeneration is that it works just as well for COM code as it does for .NET. The two scripting languages
provide a pathway to scripting against COM objects via the CreateObject() method and the two .NET languages allow coding with the .NET Framework.
MyGeneration supports Microsoft SQL Server, Microsoft Access, Oracle, IBM DB2, MySQL, Postgre SQL, FireBird, Interbase, SQLite, and VistaDB.
Support for MyGeneration is provided via online forums at the vendor's Web site.

Version 1.1, Free to 1.999,-€ Download it here
Licensing: Proprietary
NDO (.NET Data Objects) is an O/R Mapping development tool that allows you to dress your objects with certain attributes and have them persisted
to a database such as SQL Server, Oracle, MySql, Access, or Firebird--the databases which NDO supports. NDO also provides a mapping tool called The
Enhancer to help you manage the XML file used to store the information about your mapping configuration (as shown in the screenshot). The Enhancer is
also capable of generating SQL DDL scripts you can use to create database objects. For classes you want persisted by NDO, you add an attribute
of [NDOPersistent] to your class. Support for NDO is provided by e-mail only.

Version 1.3.2, Free Download it here
Licensing: LGPL
The NEO (.NET Entity Objects) Framework is an O/R Mapping component and custom code-generation library that dynamically generates the SQL necessary to perform CRUD operations
for your objects at run-time based on mapping information stored in an XML file. NEO is based on the ADO.NET DataSet object and can persist objects to
an XML file as well as a relational database system. As you update your schema (mapping) file, NEO automatically creates the base classes and creates
individual files for each entity class. Support for NEO is provided by a Wiki hosted at the vendor's Web site, and there is also public access to an
issue-tracking system for the product. Mailing lists are also available for both users and developers.

Version 0.9, Free Download it here
Licensing: LGPL
NHibernate is a .NET based port of the Java Hibernate object persistence library for relational databases. NHibernate handles
persisting your .NET objects to and from a relational database using an XML configuration file for the mapping information, including
the names of your types, the providers for the database to be used, and the database connection information. Once you've created the
tables to persist your objects to, and created your objects to persist, you can set up your configuration file and start using the
NHibernate API to get and persist all of the objects in assemblies NHibernate is aware of. NHibernate supports
Access, DB2, Firebird, MySql, PostgeSQL, SQL Server 2000, and SQLite. Support for NHibernate is provided through public forums at the
SourceForge project home and a public developer mailing list.

Version 2.1 and 2005, $585 Download it here
Licensing: Proprietary
The Nolics.NET productivity tool consists of an O/R Mapper and several domain-specific languages. Nolics.net supports standard data bindings for Windows
Forms applications. For ASP.NET applications, in addition to the standard data bindings, Nolics.net supports two-way data bindings with automatic
support for control enabling/disabling (the controls are automatically enabled if the object bound to the controls becomes modifiable). Nolics.NET
also supports inheritance, identity, parent-to-child relations, and importing existing legacy databases. Support is provided for Nolics.NET through
online FAQs, e-mail, online demos, and online documentation.

Version 1.0.8, Free Download it here
Licensing: LGPL
The NPersist Framework is a free open source .NET O/R Mapping persistence framework for version 1.1 (or later) of the .NET Framework. Although it is
written in C#, it supports persisting objects written in any .NET language. Mapping information for NPersist is stored in an XML file that can be
generated by using the MatsSoft ObjectMapper 2005 application available at http://www.objectmapper.com/Home/Default.aspx. Support for NPersist is
provided through public message boards at the GotDotNet Workspace project home for NPersist at http://workspaces.gotdotnet.com/npersist and
forums and bug listings at the NPersist home page. Online documentation is also available as well as an NPersist newsgroup at news://magpie.sytes.net.

Version 0.1.0, Free Download it here
Licensing: BSD License
ObjectBroker is an O/R Mapping framework for the .NET platform. Its main features consist of transparent persistance and
transaction management. Mapping configuration settings are stored in an XML file. The transaction management features of ObjectBroker are
based on COM+ Enterprise Services. Support for ObjectBroker is provided by the public forums at the products SourceForge home page and
via e-mail.

Version 2.2, Starts at $49.95 Download it here
Licensing: Proprietary
Objectz.NET is an O/R Mapping Library for .NET that lets you map the properties and fields of your .NET application classes directly
to your database tables, columns and views. The Objectz.NET Mapping Studio application is the user interface that provides an easy way to graphically map
classes to the database. The Objectz.NET Mapping Studio also allows you to define one or several database connections to use and which .NET assemblies
to include in your project. You can then pick individual classes to map to database objects. Classes can be mapped to both tables or views from
your data source, and individual class members are mapped to columns in the chosen tables. Source code is available for an additional cost.
Support for Objectz.NET is provided via online forums at the vendor's Web site.

Version 0.8.2419.0556, Free Download it here
Licensing: LGPL
OJB.NET enables you to persist data between your .NET business objects and your relational database. OJB.NET also enables you to reverse-engineer
your database (similar to Visio's database diagrams), to automatically generate .NET classes, and to get and persist your objects at runtime.
OJB.NET allows lazy loading of objects and also automatically creates the mapping configuration between your objects and database tables.
Support for OJB.NET is provided by the public forum at the SourceForge project forum.

Version 1.0.0.864, Free for non-commercial development Download it here
Licensing: GPL
The Object Persistence Framework for .NET (OPF.NET) is an O/R Mapping class library that can manage object retrieval from and persistence to
relational database systems and other persistent storage mechanisms, such as XML files. OPF.NET works by having your objects inherit from various
classes like the Persistent, Collection, CollectionSqlDataManager, and PersistentSqlDataManager classes in order to perform standard CRUD-type
operations in your objects. OPF.NET fully supports transactions for all database systems that support transactions. Currently OPF.NET offers
storage classes for Microsoft SQL Server, ADO, OLEDB, and ODBC. OPF.NET has also made recent performance enhancements to speed up data access
by implementing the ADO.NET DataReader internally. OPF.NET also offers an OPF.NET Studio product which is a business object generator based on
OPF.NET. It allows you to automatically create business objects and create test cases for NUnit. Support for OPF.NET is provided via online forums,
code snippets, and online documentation.

Version 3.0.2, Starts at $199.95, volume discounts available Download it here
Licensing: Proprietary
Opf3 is an object persistence framework for .NET 2.0 that provides a large set of sample/tutorial projects for you to see how the framework works.
Opf3 uses code attributes and reflection to handle the mapping of Object fields to database table columns. The vendor's Web site has a PowerPoint tutorial
that shows how to make use of the framework for creating and persisting objects using the Opf3 framework. The samples we downloaded
require Visual Studio 2005 and can not be opened by Visual Studio 2003. Database support is strong as the Opf3 framework supports Microsoft SQL Server,
Oracle, VistaDB, Postgre SQL, Microsoft Access, and Pervasive SQL. OPath is the object query language used by the Opf3 framework and supports raw SQL
for sorting and grouping purposes. Support for Opf3 is provided via e-mail and annual priority e-mail support is available for purchase from the
vendor's Web site.

Version 1.1, Starts at $119 Download it here
Licensing: Per server, per site
The ARBT ORM Framework consists of abstract objects you can inherit from in your code. Your objects can inherit
the functionality needed to automatically retrieve and persist data from Microsoft SQL Server, Oracle, and any other data source accessible
via ADO.NET. The ORM Framework also allows you to store and retrieve data via XML, and bypass a database completely. Mapping configurations for
the product can be managed using either database views or XML files containing the description of database objects and classes in your code.
The code provided for the abstract objects is 100% managed code written in C#. Support for the ORM Framework is handled via e-mail.

Version 1.7.2.32067, Free Download it here
Licensing: LGPL
ORM.NET is a code generation tool capable of outputting either Visual Basic .NET or C# code. ORM.NET uses a fairly simple wizard application (shown in the screen
shot) to take you through connecting to the database, choosing for which tables you'd like to generate code, and then customizing some settings (such as
the name of your namespace and the type of method signatures on your public accessor methods) and then you can set off the process of ORM.NET
generating a set of classes that you can compile into a library to use to persist all of your objects. ORM.NET comes with a complete documentation file
that includes API information, a quick start guide, and information on sample applications. Support for ORM.NET is provided via e-mail, phone, or at
the public forums on the SourceForce project site.

Version 2.6.5.1, Free Download it here
Licensing: GNU LESSER GENERAL PUBLIC LICENSE
Pragmatier.Persistence is a GotDotNet Workspaces project that is the result of the company Pragmatier going out of business. Pragmatier open-sourced
their core component, so the Visual Basic .NET source code is freely available to all. It has been updated to support v1.1 of the .NET Framework and supports
ODBC data sources. Unfortunately, no documentation or support accompanies the source code, so getting up to speed with the code might take longer
than with other open source offerings.

Version 1.0.0.6, Free Download it here
Licensing: Shared Source
Retina.NET is a GotDotNet workspaces project for an open source O/R Mapping library. Using Retina.NET is very straightforward. Objects that want to make
use of Retina.NET inherit from the Retina.Core.Entity class. Make sure your object provides a parameterless constructor and mark the primary
key member of the class with an attribute. After that, you're all set. Retina.NET ensures that the database schema objects (including constraints)
maintain the rules you have laid out for your objects. Retina.NET also has support for lazy loading of child objects through the use of proxy objects.
Retina.NET comes with a Quick Start document (an MS word file) that lists many examples of how to use Retina.NET, code samples included. Support
for Retina.NET can be found on the Retina.NET Workspace message board.

Version 0.7, Free Download it here
Licensing: BSD License
Sooda is an acronym for Simple Object-Oriented Data Access and is a code generation tool that supports any .NET language that has a CodeDOM
provider. With Sooda, you can auto-generate all of the code needed for an object-oriented data access layer and reduce the amount of CRUD code
to a minimum. In addition to v1.1 of the .NET Framework, Sooda also supports Mono. Nant 0.85 is supported as an alternative to using Visual
Studio 2003 for compiling the code produced by Sooda. It is not clear on the vendor's Web site how to get support for Sooda. but it appears
that e-mail to the vendor gets you a prompt reply.

Version 3.4.4.86, $995 Download it here
Licensing: Per developer
Versant Open Access for the .NET Framework is an O/R Mapping persistence framework that offers object persistence through
changes made to the IL produced by the compiler and thus works with any IL-compatible language. Object querying can be done either using
OQL or SQL directly and supports SQL Server, Oracle, and DB2 databases. Versant Open Access also provides a mapping designer that can be used
to map your database tables to objects or, going in the other direction, to create objects based on an existing database schema.
Support for Versant Open Access is provided via community forums, or you can initiate an ad hoc support request by visiting the Versant eShop.
E-mail and phone-based support is also available for critical issues.

Version 4.0, $50 Download it here
Licensing: Proprietary
Wilson ORMapper for .NET is an O/R Mapping library that transparently persists your business objects according to the rules defined
in an XML mapping file. To use Wilson ORMapper from Visual Studio .NET, you add a project reference to the WilsonORMapper.dll file.
After you have written the code for your classes and created your mapping file for those classes, you create an instance
of the ObjectSpace class from the Wilson.ORMapper namespace, and pass the path of the mapping file, a connection string, and the
type of database provider you want to use to the ObjectSpace constructor. From there, persisting your object is as easy as calling
methods like PersistChanges() to save an object or GetObjectSet() to retrieve a series of objects. Wilson OR Mapper for .NET supports
Microsoft SQL Server, Oracle, Microsoft Access, and ANSI compliant database systems. Support for Wilson ORMapper is provided via forums
on the vendor's Web site and you can also e-mail the vendor with questions.
General Criteria
What things should you consider when purchasing any type of third party development tool or component? Or when deciding
between purchasing such a component and building it in-house? Here are some factors you might like to think about:
- Can you download an evaluation or demo copy prior to purchase?
- What are the limitations to the evaluation or demo copy?
-
What are the company's tech support policies? How is tech support offered (phone, e-mail, newsgroup, discussion board)?
During what hours? What's the average response time? Is an answer guaranteed? What does support cost? How long do you
get free support? Can you purchase a support contract and what will it cost if you can?
- What are the company's return policies?
-
What form is documentation provided in? Text file? PDF file? Help file? HTML Help file? Integrated to Visual Studio help?
Printed manual?
-
What architecture is the product? Pure managed code, pre-wrapped ActiveX, wrappable ActiveX, non-managed code designed to
be called directly from managed code?
-
What other products does this vendor offer that you might need?
-
Can you develop the functionality you need in a cost effective time-frame? Do you want to support the functionality
after you first develop it?
-
If you build yourself, how many other developers will be using it or will it just be you? If more than just yourself,
do you have the time to write good documentation?
-
Does the product support relevant standards where applicable, or does it use propriety implementations?
-
If open source, is the project active? If not, you might end up supporting and/or enhancing it yourself.
-
If commercial, how large is the vendor? How long have they been in business? How focused is their product line?
How long have they supported this product? Have they ever dropped support of other products? Do they offer source code?
Note: Be careful with very large vendors that are not focused in the area of your interest. Large vendors have
a bad habit of becoming interested in developer tools yet quickly drop support when they realize how hard
it is to make money selling components and tools to developers. Exceptions are when the developer tools
are their core competency or support their strategic direction. Conversely, don't discount small vendors
if they have been in business for a while and have shown a proven ability to focus and provide quality products.
Feature TablesClick here to view the Feature Tables.
Informed Opinions
We asked a variety of well-known leading-edge developers with significant credentials
their opinion regarding the most important criteria for selecting an object-relational mapping tool
for .NET. Their "Informed Opinions" follow:
The single most important trap to watch out for when choosing an object-relational mapping tool is "architecture by product." Architecture by product describes a set of symptoms I've seen in many projects, where entire teams spend months agonizing over product comparison tables, debating the importance and rankings of various features. Once the product was chosen, the decision was set in stone and the project's architecture (when there was one) bent itself around the product.
Object-relational mapping is considered an important supporting framework for the Domain Model pattern (a pattern that many have employed successfully), and you really need to understand where object-relational mapping fits into your architecture before you choose a product.
Although architecture by product is a generic trap, the Achilles heel of object-relational mapping is reporting.
I have yet to see an application where some kind of reporting was not required. Reporting does not necessarily begin and end with reports printed in Word or PDF format; the basis of reporting is joining data of differing kinds into a single view-primarily read-only. For some reason, once developers begin using an object-relational mapping tool, all of a sudden they want to use it for everything, reporting included.
The data used in reporting has no connection whatsoever to objects. First of all, it's just data-there's not a single bit of behavior in sight. Secondly, we usually don't need all of the data from the entities involved, just a bit from each of them. The DataTable in .NET suits these needs just fine, not to mention the fact that third-party reporting vendors work well with it. Even though many object-relational mapping tools may enable you to perform complex queries that return objects, in the case of reporting, you just don't need it. That's one feature to take off of your product comparison table.
Udi Dahan is a Microsoft Architect MVP, a recognized .NET expert, and manager of the C4ISR Systems Development Group at KorenTec. Udi is known as a primary authority on Service-Oriented Architecture in Israel and consults on the architecture and design of large scale, mission-critical systems developed all over the country. His experience spans technologies related to command and control systems, real-time applications, and high-availability Internet services.
The most important thing is to find an object-relational mapper and use it. It is very hard to imagine going back to the old tedious persistence code because all good mappers automatically load and persist your business objects, allowing you to focus on your primary task and making your code more maintainable. Many developers don't use mappers because they see the differences among the various mappers as an indication that all are lacking. Yes, there are differences, but many good mappers are more than able to handle the most common (if not all) of your persistence scenarios efficiently.
The differences tend to boil down to style and advanced features; in most cases, you should choose the mapper that best fits your philosophy. Some mappers are the non-intrusive Plain Old CLR Objects (POCO) style, others rely on code generation, some are more intrusive, and others modify Intermediate Language (IL) at run-time. Which is the best? There is no right answer to that question because it really depends on your style and the corresponding features that you may or may not need. It's a tradeoff because the simpler POCO mappers are easy to use and very flexible and the more intrusive mappers offer advanced features.
The most important task is finding the best fit for your style. Do you prefer external XML mappings or code attributes? Are you comfortable with dynamic SQL or do you also require support for stored procedures? Do you want to map fields or properties, or both? Do you want to avoid reflection? Would you also like DAL features or are you happy sometimes working with ADO.NET? Do you want your query language to be similar to SQL or XPATH, or to be more of an OO abstraction? How do you want to handle null values?
You may end up choosing an object-relational mapper that is free and open-source. If that fits your style, that's great, but keep in mind that if it's not your style, it's likely to end up costing you time and energy to get comfortable with it. Most good mappers are affordable and worth it if it fits your style.
Save yourself and your clients a lot of time by getting an object-relational mapper-there's just no good excuse to not use one. Find the one that best fits your style, narrowing the choices down from vendor examples, documentation, and forums, then download and try the demos.
Paul Wilson is an independent software architect in the Atlanta area. He is a Microsoft MVP, an ASPInsider, and far too certified (MSCD, MCAD, MCDBA, MCSE). He is also the developer of the WilsonORMapper, a very popular (and cheap) object-relational mapper for .NET.
Francesco Aliverti-Piuri
Although I am neither a big .NET expert nor a big object-relational mapping expert, I am happy to contribute to Mike Gunderloy's and Mike Schinkel's work with some general advice.
Be sure that your development team has clear ideas about the existing or desired database and OO architectures before selecting an object-relational mapping tool for your .NET applications. Do not expect that you will also buy an architecture suitable for your IT world when buying the object-relational mapping tool, unless you start from scratch. Your team's clear ideas should cover major decision items, like which language to use and how to map RDBMS concepts and constructs to OO concepts and constructs, especially when there is no simple correspondence.
Avoid being too .NET-oriented, unless your whole IT is based on .NET. Make sure that interoperability with, and openness toward, "other planets" have deep roots in your object-relational mapping tool candidates. Other planets include Business Process Management, standards relevant to your IT and vertical industry or business sector, and Java.
Do not focus excessively on microfeatures that allow customization of your object-relational mapping approach. Fine tuning and local optimizations are best kept for a late stage in the development cycle, when the bulk of your software performs reasonably and uniformly well. Otherwise, you might enter a maintenance nightmare if most aspects of your mapping are treated differently for each entity, relationship, or class.
If your object-relational mapping requirements are not trivial in quantitative terms (number of entities, relationships, constraints, procedures, classes, and methods), evaluate carefully the ability of the candidate tools to let you automate repetitive tasks or you might end up clicking your way repeatedly through the same tool wizards. Wizards are great for simple projects, but can lead to costly, repetitive, and error-prone work on large projects, especially if you plan to apply object-relational mapping several times during the lifecycles of your projects.
Test the object-relational mapping candidates on appropriate standard sample database schemas. If your IT department uses SQL Server, forget about pubs and Northwind, and test the object-relational mapping tool on AdventureWorks. See how much metadata the tool can extract and manipulate. The more metadata that can be extracted, the better the tool; beyond tables, views, and relationships, the tool should be capable of extracting information about constraints and stored procedures. If your IT department has standardized on Oracle, suitable sample schemas are HR, OE, and QS.
For metadata extraction, refer to this article from Kathleen Dollard's "Code Generation in Microsoft .NET."
Two articles on Somusar's Web site (here and here) explore the aforementioned sample schemas.
Be sure to also evaluate the consulting service associated with the tool. Simple, flexible tools with an excellent consulting service are most likely to provide your IT department with the appropriate object-relational mapping solution, unlike feature-rich, all-in-one products lacking on-site consulting.
Francesco Aliverti-Piuri is the socio gerente (managing partner) at Somusar in Italy. Their motto is "We Generate Your Software."
Fabrice Marguerie
After a period of lag behind Java, the offering of object-relational mapping for .NET is very rich. You can choose from open source or commercial, and from light to full-blown. You really don't have any excuse not to consider using an object-relational mapping tool, especially since you have this guide to help you ;-)
Some tools offer a really interesting approach: they support both code generation and generic object-relational mapping. This gives a real advantage because you can get strongly-typed code and validation at compile-time without losing functionality. As a simple example, compare the two following lines of code and consider what happens in both cases when you modify the mapping information and accidentally (or deliberately) remove the mapping for the Cat class.
1. Cat cat = (Cat) session.Load(typeof(Cat), "Bob");
2. Cat cat = CatDao.GetCat("Bob");
Chances are high that the second line produces a compilation error and the first one won't choke until run-time. Look at the following lines and ask yourself which one you prefer and why:
1. IList cats = session.List(typeof(Cat));
2. CatCollection cats = CatDao.List();
3. IList<Cat> cats = context.List<Cat>();
One more thing you could consider is whether the tool offers support for .NET 2.0 and the generics. This indicates that the editor keeps his product up-to-date and allows you to benefit from the interesting features that come with .NET 2.0.
Fabrice Marguerie is a .NET architect and a Microsoft MVP. He has published an article entitled "Choosing an Object-Relational Mapping Tool" that presents the criteria to consider when selecting an object-relational mapping product. Fabrice runs the SharpToolbox site, a reference directory of available .NET tools and libraries, which has a category dedicated to object-relational mapping. Fabrice also writes a blog on .NET and software in general.
Andres Aguiar
Object-relational mapping serves several purposes. One of them is to simplify data access by reimplementing the data access APIs built on .NET. Instead of accessing data using DataSets and DataAdapters, mappers create a whole new API.
You can improve DataSets and DataAdapters by decoupling them from the database schema and generating the right code to support paging, joins, and dynamic filtering and ordering. In this way, users of the data access layer do not need to learn a new data access API, reducing the overall cost of adopting these tools. There are several ways to learn how to use DataSets (training courses, books, online articles), but it's not as easy to train people in the object-relational mapping tool of your choice.
This is why, at DeKlarit, we decided to greatly improve the DataAdapters/DataSet approach, making it highly suitable for enterprise-scale application development.
Andres Aguiar is the software architect for DeKlarit, a model-driven tool that is integrated into Visual Studio .NET. He's a frequent presenter at events such as TechEd, MDC, DevDays, and .NET user group meetings.
Frans Bouma
You need to make a connection between business logic and persistent storage. How you do that depends on how you see your data. To test your way of thinking, imagine that a customer gets the gold status when he spends at least $25,000 in one month. Where is that logic placed? Does it get read in a Customer object to test the rule or is it in a CustomerManager that executes rules and consumes customer objects or DataSets? These are different views of data, which result in different ways of solving the DataAccess problem.
The table approach uses no theory, just a set of tables not based on any abstract model, and they're created right there in DDL. You use tables and expect to work with them in memory as well, so a plain DataSet/DataTable approach with stored procedures or Visual Studio .NET-generated SQL statements is appealing. | | | |