data-access-layer

What are the disadvantages of Typed DataSets

I come from a world that favors building your own rather than rely on libraries and frameworks built by others. After escaping this world I have found the joy, and ease, of using such tools as Typed DataSets within Visual Studio. So besides the loss of flexibility what else do you lose? Are there performance factors (disregarding the pro...

What is the purpose of a Data Access Layer?

I started a project a long time ago and created a Data Access Layer project in my solution but have never developed anything in it. What is the purpose of a data access layer? Are there any good sources that I could learn more about the Data Access Layer? ...

Whose Data Access Layer do you use for .NET?

We have grown our own DAL library, but are researching using a third party DAL - to relieve the maintenance overhead. I know that Microsoft and some others have written simple DALs - although Microsoft's doesn't seem to play well with Oracle databases. Any other suggestions? Or are we stuck with what we have? ...

What is the best way to improve performance of NHibernate?

I have an application that uses NHibernate as its ORM and sometimes it experiences performance issues due to how the data is being accessed by it. What kind of things can be done to improve the performance of NHibernate? (Please limit to one recommendation per answer) ...

Poll: ASP.Net Data Access Methodologies

With .Net 3.5 SP1 adding Entity Data Model as an option for data access we are now faced with several out of the box options; EDM, LINQ-to-SQL, Typed Datasets, pure ADO.Net. We also have several open source options; Subsonic, NHibernate, LLBLGen. So the question for the poll: What is your single favorite Data Access Methodology for AS...

Static layers in a java web application

I am building a small website for fun/learning using a fairly standard Web/Service/Data Access layered design. To save me from constantly having to create instances of my service layer/data access layer classes, I have made the methods in them all static. I shouldn't get concurrency issues as they use local variables etc and do not shar...

IsolationLevel.RepeatableRead to prevent duplicates

I'm working on an application that is supposed to create products (like shipping insurance policies) when PayPal Instant Payment Notifications are received. Unfortunately, PayPal sometimes sends duplicate notifications. Furthermore, there is another third-party that is performing web-service updates simultaneously when they get updates...

What's the difference between a "Data Service Layer" and a "Data Access Layer"?

I remember reading that one abstracts the low level calls into a data agnostic framework (eg. ExecuteCommand methods etc), and the other usually contains business specific methods (eg. UpdateCustomer). Is this correct? Which is which? ...

How should the Data Access Layer be structured?

I initially designed my system following the s# architecture example outlined in this codeproject article (Unfortunately, I am not using NHibernate). The basic idea is that for each domain object that would need to communicate with the persistence layer you would have a corresponding Data Access Object in a different library. Each Data...

Do you like writing your own Data Access Layer and Business Object Layer?

You find alot of hype around frameworks like The Entity Framework, and other frameworks like it. I wrote a data access layer and business object model layer of my own for a recent project and I seem to like it more than what I have read about the Entity Framework. Is it "better" to conform to a framework rather than writing one yoursel...

LINQ - which layer should LINQ typically fall into, DAL ?

just wanted to gather different ideas and perspectives as to which layer should (and why) LINQ fall into? ...

Business Object DAL design

When designing business objects I have tried several different methods of writing the data access layer. Some have worked out better than others but I have always felt there must be a "better" way. I would really just like to see the different ways people have handled the DAL in different situations and their opinon of how the techniq...

XML as data source : best practice for reading

I'm working on a small project where for the first time I want to use XML as the one and only data source...a file based store suits the need of the project. When writing the DAL should I have all the get methods static? to aviod and "reading while file open" errors? Should I use CacheDependency on the file? Thx ...

JAVA Swing client, Data Access to Remote Database; Ibatis

I've got a Java client that needs to access a remote database. It is the goal to hide database credentials from the user and not hardcode any credentials within the code. Therefore, the database access will probably have to be on the server side. I'm restricted to use Ibatis as a data abstraction framework. Apart from that I have JBoss ...

What is the correct LINQtoSQL-ish way to do a table truncate?

I have a project with a formidable data access layer using LinqtoSQL for just about anything touching our databases. I needed to build a helper class that bridges some common crud operations from CLSA objects to LinqToSql ones. Everything has been operating swimmingly until I needed to do a truncate on a table and all I had were “delete”...

Passing data between business layer and data access layer - bad code?

I'm using the following code within the JCProperty class to retrieve data from a DAL: Dim x As JCProperty x = JCPropertyDB.GetProperty(PropertyID) If Not x Is Nothing Then Me.PropertyID = x.PropertyID Me.AddressLine1 = x.AddressLine1 Me.AddressLine2 = x.AddressLine2 Me.A...

What are the best practices in creating a data access layer for an object that has a reference to another object?

(sorry for my English) For example, in my DAL,I have an AuthorDB object, that has a Name and a BookDB object, that has a Title and an IdAuthor. Now, if I want to show all the books with their corresponding author's name, I have to get a collection of all the Books, and for each of them, with the IdAuthor attribute, find the Author's n...

How to use Data Access Objects for serialized & relational database data access

Hi all, I am developing a C++ domain model class library which should provide some facilities or a framework (i.e. interface classes etc) for writing/reading class instance data to/from both a binary file and a RDBMS. The basis for this library is an application that uses a RDBMS, and there are several methods which instantiate a class ...

Difference between Data Access Layer and Model in MVC

I have implemented what I thought was a pretty decent representation of MVC in several web applications but since having joined crackoverflow, I'm finding that perhaps my initial definitions were a bit simplistic and thus I'd really like some clarification on the differences between the Data Access Layer and the Model or Domain Layer of ...

Best Data Access Layer for .NET

Which is the best data access layer for .net projects. I am using SQL Server 2005 with C#. ...