Link to home
Start Free TrialLog in
Avatar of Idarac
Idarac

asked on

Convert data access layers SQL Server

My new project involves data access layers needing to be converted into SQL Server tables.

Can someone explain a data access layer and how I would convert into SQL Server tables?
Avatar of PortletPaul
PortletPaul
Flag of Australia image

"data access layer" is a generic term
A data access layer (DAL) in computer software, is a layer of a computer program which provides simplified access to data stored in persistent storage
http://en.wikipedia.org/wiki/Data_access_layer

In general these allow other 'layers' of an application to use 'persistent storage' using methods that remain consistent. The DAL itself then deals with details that are specific to the type of persistent storage, e.g. a DAL may be designed to allow support for multiple RDBMS vendors such as Oracle and SQL Server. This "abstraction" of data storage specifics also helps separate business logic from the data model allowing changes in a data model that won't directly impact the business logic.

e.g.
Building a Multi-Tier Web Application in the .NET 3.5 Framework Using LINQ to SQL
http://www.codeproject.com/Articles/22069/Building-a-Multi-Tier-Web-Application-in-the-NET-3
Tutorial 1: Creating a Data Access Layer
http://msdn.microsoft.com/en-us/library/aa581778.aspx


>>and how I would convert into SQL Server tables?
from what?
using what? (java?, perl? .net? php? ... )

i.e. more information/background would be useful.
Avatar of Idarac
Idarac

ASKER

All I have been told is to convert 10 data access layers into SQL Server tables.

Does that make any sense to you?
yes & no

I understand the concept (the yes)

but cannot advise further without knowing more about the existing DALs (the no)

e.g.
is it java?
is it .net?

is the existing data persistence using a relational dbms?
(e.g. it could be XML right now)

For example, I regularly deal with apps that support both Oracle and MS SQL Server
here, the DALs basically involve finding mssql equivalents to items built using Oracle

it might be as simple as changing
NVL(x,0)

to
ISNULL(x,0)

or it may be re-writing entire complex stored procedures/triggers

the aim is to provide "exactly the same" functionality from each change of dbms platform both in terms of inputs and outputs

does this help?
Avatar of Idarac

ASKER

I just heard it will VB.Net
and the existing DALs use what for the dbms?
bit surprising that vb.net DALs need conversion to sql server

anyway,  vb.net isn't one of my life experiences, so I can't give you much insight on that front.
Avatar of Idarac

ASKER

I don't know if it is using a relational dbms assuming maybe Access or Oracle.

I think I am getting it. I am still learning .Net but I think I see where DAL can be useful.

Putting all your logic into a separate area where the rest of the app can access it. So that all data access is inside the DAL. For example business logic should not contain any data access and should call on the DAL for any data retrieval.

See if this look s right....

If the business layer wants to Know the address of a certain client it would make a call to the DAL GetClientAddress("Joe Blow"). If there are any data changes then we would modify the method GetClientAddress in the DAL (if changes were required) without having to touch the rest of the app.
Without the DAL the Business logic would have to do something like "Select Address from Clients where Name = 'Joe Blow'. Then if there are data changes we would have to search the entire Business logic to see where changes would have to be made.

So given my project I am going to assume that either the app has 10 DAL setup for the the app OR there are 10 methods or areas of change in the DAL that have to be addressed. Or maybe he has 10 apps that need the DAL changed.
ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Idarac

ASKER

Thank U for your help