This is G o o g l e's cache of http://software4us.com/news/news2.html as retrieved on 7 May 2006 10:15:58 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:asxbMS3-ib4J:software4us.com/news/news2.html+&hl=en&gl=ca&ct=clnk&cd=1


Google is neither affiliated with the authors of this page nor responsible for its content.

Software Freeware Directory - Free Software Downloads

Good Morning Windows
Users...

Now if you have been
paying the slightest bit of
 

Good Morning Windows Users... This Is Your Freeware Wake-Up Call
Now if you have been paying the slightest bit of attention, you already know that there are some "issues" with Microsoft Windows. There are issues with the likes of viruses, trojans, spyware, adware and keyloggers...all thrown at you by the bad guys.

More Information
Top 10 Must Have Features in O/R Mapping Tools

In this article, I will try to educate you about the various important features that a good O/R mapping tool would provide you and how it can be beneficial to you. I am not discussing any particular O/R mapping tool but rather all tools in general.
More Information



Your E-mail
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
feature Domains Yahoo
feature Yahoo Web Hosting
feature Google Affiliate
feature Anti Spam Appliance

 SOFTWARE DEVELOPERS NEWS AND ARTICLES  

Top 10 Must Have Features in O/R Mapping Tools

O/R mapping tools are becoming more popular each day and people are realizing the productivity gain they provide to developers. Yet, many people don't know enough about O/R mapping to consider using these tools and many others are weary of using any code generators (including O/R mapping tools).

In this article, I will try to educate you about the various important features that a good O/R mapping tool would provide you and how it can be beneficial to you. I am not discussing any particular O/R mapping tool but rather all tools in general.

What is O/R mapping?

If you're developing an object oriented application that requires a relational database, you'll need to develop persistence objects that are modeled against your database design and know how to interact with different tables in the database. You can either develop these objects by hand or use an O/R mapping tool to map and generate them quickly. Hopefully, after reading this article, you'll be convinced that developing by-hand is a bad idea in most situations.

An O/R mapping tool connects to your database and reads its schema, then lets you map persistence objects to database tables and views, specify single-row transactional 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 in the database. It then generates fully working persistence objects code for you. Below is a simple example of some persistence objects. Please note that in this persistence design pattern as explained in Domain Objects Persistence Pattern for .NET, the persistence objects are broken up into "Domain Objects" and "Factory Objects". You can read more about this design pattern if you wish.

/* Note one-to-many self relationship thru “reports_to” */

CREATE TABLE t_employees (
employee_id int IDENTITY (1, 1) NOT NULL,
name nvarchar (40) NOT NULL,
birth_date datetime NULL,
photo image NULL,
reports_to int NULL,
)


// Domain object class for t_employees table


public
class Employee

{
Int32 _employeeId;
String _name;
DateTime _birthDate;
Byte[] _photo;
Int32 _reportsTo;
ArrayList _subordinates;
Employee _supervisor;
Int32 EmployeeId {

get { return _employeeId;} set
{ _employeeId = value; }
} String Name {
get { return _name; } set
{ _name = value; }
}
DateTime BirthDate {

get { return
_birthDate; } set { _birthDate = value; }
}
Byte[] Photo {

get { return
_photo; } set { _photo = value; }
}
Int32 ReportsTo {

get { return
_reportsTo; } set { _reportsTo = value; }
}

ArrayList
Subordinates {
get { return _subordinates; } set { _subordinates = value; }
}
Employee Supervisor {

get { return _employee; } set
{ _employee = value; }
}
}

// Persistence object for Employee class
public
interface IEmployeeFactory
{
void Load(Employee object, int nDepth);
void Insert(Employee object);
void Update(Employee object);
void Delete(Employee object);

// Query methods

ArrayList FindSomeEmployees();

// Relationship methods

void LoadSupervisor
( Employee emp);
void LoadSubordinates
(Employee emp, int nDepth);

}
Below is an example of how a client application will use this code: public class NorthwindApp
{
static void Main (string[] args) {
Employee emp = new Employee();
EmployeeFactory empFactory = new EmployeeFactory();

// Let's load a employee from Northwind database.
emp.EmployeeId = 10045;
empFactory.load(emp);

// empList is a collection of Employee objects
ArrayList empList = empFactory.
FindSomeEmployees();
// subList is a collection of Employee's subordinates objects
ArrayList subList = empFactory.LoadSubordinates(emp, 1);

// supervisor is Employee's supervisor object
Employee supervisor = empFactory.LoadSupervisor(emp);
}
}


RECOMMENDED BY USERS FREEWARE

feature Mozilla Firefox
feature avast! Home Edition
feature Ad-Aware
feature WinSock XP Fix
feature Spybot - Search & Destroy
feature Avant Browser
feature PhotoFiltre
feature AntiVir PE
feature SpywareBlaster
feature ZipGenius


 

Google

Security and Privacy
Business/Organize
Home and Hobby Software
Science Software
Utilities/Drivers
Internet Tools
Web Development/Programming
Multimedia
Graphics and Design
Educational Software
Screen Savers
Games and Freeware
Themes

 


 

Copyright © 2002-2005. All Rights Reserved.
eXTReMe Tracker