What do Data Access Layer and Data Object Layer mean and related?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm confused about Data Access Layer and Data Object Layer. How are they
related? Which layer will be affected when the underlying database structure
is changed? Which layer will be affect when additonal information (more
columns and/or from more tables) from the database is needed?
 
DAL means (to me) a layer that talks to a specific RDBMS (or any DataStore),
and returns certain type objects (not rdbms specific) to the business layer.

I think of a DAL returning:
DataSets (strong or weak, but usually strong)
IDataReaders
void (just run something, but return nothing)
int ( counts, number of rows affected, etc)


If you have a function like this

public IDataReader GetEmployees()
{

return something.ExecuteReader();
}

Then the code inside that method can be specific. ( it can return sql
server, oracle, access, excel, text file, etc).

THEN, when you're biz layer used the IDataReader, it can put the data into
objects.

.........

Because you return an IDataReader, today, it can be Sql Server, tomorrow,
Oracle.


See my full example at:
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!140.entry
 
Peter said:
I'm confused about Data Access Layer and Data Object Layer. How are they
related? Which layer will be affected when the underlying database
structure
is changed? Which layer will be affect when additonal information (more
columns and/or from more tables) from the database is needed?

IMHO, they both means the same thing in Oops. One is more of a MS or .Net
terminology DAL, and the other one DOL is more of Java terminology.

In either case, if there is database change due to more tables added,
columns add or things removed etc, etc, then it's going to affect the
logical layer above it such as the Business Layer and possibly the UI layer.

If the underlying database changes from MS SQL Server to Oracle as an
example, then the DAL or DOL is going to be affected, along with the
Business Object Layer at a minimum.

And in either case, the terminology for both names mean using data as
objects.
 
Back
Top