Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DAL is physical mapping and BLL logical?

Reply
Thread Tools

DAL is physical mapping and BLL logical?

 
 
=?Utf-8?B?TWF0dE0=?=
Guest
Posts: n/a
 
      12-07-2006
Looking at a tutorial for Asp.Net 2.0 using Northwind, the DAL was built by
dragging the tables on to an XSN to create a dataTable object for each table
in the database. The BLL was then mapped for each entity but since the data
was simple it mapped to a physical table (ex. customer). But what do you do
if your tables don't match up the physical and logical?

For example, you could have a table for people, a table for job codes, and a
table for payroll schedules. These tables are each separte but they are
linked logically. You could create an "employee" object that would contain
information from all 3 physical tables if you used a traditional OOP
approach.

What I'm not sure is where would you implement a logical object. Does it
belong at the DAL level? That would mean that perhaps the physical mapping to
each table is incorrect. Or does it belong in the BLL? That would mean your
BLL would be similar to an object but I think it would also confuse auto data
binding to controls (I think). Or maybe there's another option I'm missing.

I think a logical class or object like "employee" is what makes most sense.
But I'm not sure where such a definition belongs and whether or not some of
the object data source binding in 2.0 will work with objects that do not map
directly to physical tables.
 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      12-07-2006
http://sholliday.spaces.live.com/blog/

See May/2006 and June/2006 entries.

I think you'll see a better option if you don't have a direct "database
table to business entity" situation.

The "serialize" method ... gives you the control over how you get the data
from the database to your business entity.



"MattM" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Looking at a tutorial for Asp.Net 2.0 using Northwind, the DAL was built

by
> dragging the tables on to an XSN to create a dataTable object for each

table
> in the database. The BLL was then mapped for each entity but since the

data
> was simple it mapped to a physical table (ex. customer). But what do you

do
> if your tables don't match up the physical and logical?
>
> For example, you could have a table for people, a table for job codes, and

a
> table for payroll schedules. These tables are each separte but they are
> linked logically. You could create an "employee" object that would contain
> information from all 3 physical tables if you used a traditional OOP
> approach.
>
> What I'm not sure is where would you implement a logical object. Does it
> belong at the DAL level? That would mean that perhaps the physical mapping

to
> each table is incorrect. Or does it belong in the BLL? That would mean

your
> BLL would be similar to an object but I think it would also confuse auto

data
> binding to controls (I think). Or maybe there's another option I'm

missing.
>
> I think a logical class or object like "employee" is what makes most

sense.
> But I'm not sure where such a definition belongs and whether or not some

of
> the object data source binding in 2.0 will work with objects that do not

map
> directly to physical tables.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Uploading an image into the db using DAL and BLL kbutterly ASP .Net 0 01-18-2007 07:52 PM
Re: DAL and BLL as separate projects? sloan ASP .Net 1 12-05-2006 09:54 PM
Re: DAL and BLL as separate projects? sloan ASP .Net 0 12-05-2006 09:26 PM
BLL and DAL. Roy ASP .Net 10 06-16-2006 08:01 PM
DAL, BLL, does it make sense in a reporting only scenario ? craigkenisston@hotmail.com ASP .Net 4 06-15-2006 03:24 AM



Advertisments