Questions tagged [data-access-layer]

Data access layer is a layer of a computer program which provides simplified access to data stored in persistent storage of some kind, such as an entity-relational database.

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 of some kind, such as an entity-relational database.

For example, the DAL might return a reference to an object (in terms of object-oriented programming) complete with its attributes instead of a row of fields from a database table. This allows the client (or user) modules to be created with a higher level of abstraction. This kind of model could be implemented by creating a class of data access methods that directly reference a corresponding set of database stored procedures. Another implementation could potentially retrieve or write records to or from a file system. The DAL hides this complexity of the underlying data store from the external world.

For example, instead of using commands such as insert, delete, and update to access a specific table in a database, a class and a few stored procedures could be created in the database. The procedures would be called from a method inside the class, which would return an object containing the requested values. Or, the insert, delete and update commands could be executed within simple functions like registeruser or loginuser stored within the data access layer.

Also, business logic methods from an application can be mapped to the Data Access Layer. So, for example, instead of making a query into a database to fetch all users from several tables the application can call a single method from a DAL which abstracts those database calls.

1287 questions
0
votes
1 answer

converting a MySQL query to use in web2py DAL

n a test (non-web2py) program, I'm using a MySQL query that invokes SELECT SUBSTRING_INDEX. What is the easiest way to convert this to the proper usage within web2py's DAL specifications? The query is as…
Larry G. Wapnitsky
  • 1,216
  • 2
  • 16
  • 35
0
votes
1 answer

How to share a data access layer (Services and Domain Classes) between multiple Grails apps

I would like to share the data access portion of my grails app (Grails domain classes and services) with another grails app. One is a standard client facing web app, the other (not yet written) will be for periodic background tasks such as reminder…
Peter
  • 29,498
  • 21
  • 89
  • 122
0
votes
1 answer

So many criteria

I'm working on an internet website that provides some services to internet users. So we have a administration system, where my cooperators from the business team can get the information they want, e.g. how many new users registered in the last 3…
Cheng Chen
  • 42,509
  • 16
  • 113
  • 174
0
votes
1 answer

In WCF 3-layer design - what exactly does the DAL include?

I am designing a WCF service that has several functions: 1. ProductDTO GetProduct ( Guid productId ) 2. void SetProduct ( ProductDTO product ) 3. List GetAllProducts() 4. void SetAllProductValues…
John Miner
  • 893
  • 1
  • 15
  • 32
0
votes
1 answer

override the connection in table adapters - UpdateCommandConnection Method

I need to override the connection in my new table adapters, as they are currently using the connection strings used during development. (VS2008). For instance, using an existing table adapter Orders as an example, the connection string gets…
Fetchez la vache
  • 4,940
  • 4
  • 36
  • 55
0
votes
1 answer

Different UI's sharing same BLL and DAL

We've written a system using a tiered UI, BLL, DAL architecture. We now need to write a website which utilises the same database and will use up to 50% of the existing system BLL and DAL. I don't want to create a separate solution and 'copy and…
cusimar9
  • 5,185
  • 4
  • 24
  • 30
0
votes
4 answers

Code First Database Initializer is never called after upgrading to MVC 4

I have a strange problem this morning. I followed this turotial : http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application ... ... on how to implement code first in…
iPeo
  • 399
  • 2
  • 7
  • 16
0
votes
3 answers

Static Data Access Methods

I know that creating a custom data access layer is not a very good idea unless you: 1) Know exactly what you're doing, and/or 2) Have a very specific need. However, I am maintaining some legacy code that uses a custom data access layer where each…
Jim
  • 149
  • 2
  • 11
-1
votes
1 answer

Automatic data access layer generation

Hibernate and eclipselink are the most popular DAL frameworks for Java. From what I understand they map object that the programmer created to database relations and stored procedures that are created automatically. What are the pros and cons of…
Artium
  • 5,147
  • 8
  • 39
  • 60
-1
votes
2 answers

devexpress xpo vs BLL-DAL approach for report pages

We have just started a web project. Sql tables of the project is expected to be large tables with millions of records. And web application will usually report the data to the users. That means web application will do "SELECT" mostly than "INSERT" or…
Fer
  • 1,962
  • 7
  • 29
  • 58
-1
votes
3 answers

C# code not working as expected. Keep getting a bool variable as false

I am trying to build this online food ordering app. while testing a HttpPost method in a controller using Postman, I am expecting a bool value of true, but keep getting the message that corresponds to it being false. this is my WebService…
jmelero08
  • 7
  • 1
-1
votes
1 answer

Who specifies which (if any) data access layer pattern(s) are used in JPA?

I know some data access layer patterns like: Table data gateway Row data gateway Active record Data mapper ... JPA is a specification that describes management of relational data in javaee applications -…
Jacko
  • 29
  • 4
-1
votes
2 answers

Circular dependency between MODEL and DAL

I have a classlibrary which contains all the Database Manipulation Logic. The other Project in my ProjectSolution is my WPF Core app. I have created my Student Model there. In my Mainwindow.xaml.cs i instantiate my DataAccess Class. Here i have the…
-1
votes
1 answer

Any way to update my separate DAL Models Using Entity Framework for .NET Core

When i am updating my DBContext with below command.. Scaffold-DbContext "Server=MySERVER;Database=SSTEST;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir DBContext/DBModels Then DBContext create in ASP.NET Core Web…
-1
votes
1 answer

AWS e RDS Data Access Layer for Business Partner

I need some special use case, and I cannot image how resolve this. I need to enable access to my database (or a backup) to an external partner. I could backup the database and leave him to access, but I would keep some table private, for my…
NicolaPez
  • 567
  • 1
  • 4
  • 27