Designing a Data Access Layer for ASP.Net Applications
In ASP.Net you should use the ADO.Net data access model for designing a Data Access Layer. ADO.Net consists of features required for managing database, user interactive multitier web applications and web services. For designing the best Data Access Layer you must have knowledge of various Data Access Controls, Data Bound Controls, Database providers and Database access drivers. You must know where to store the database connections strings, how to use connection pooling, avoid connection pool leakage using managed code by using proper connection open and close. Implement paging to display the large record sets rather than displaying all records at once. All this methodology can be implemented in a best way to design and develop enterprise level web architecture solutions.
ASP.Net Data Access Architecture
ASP.Net data access architecture guides the application architects and developers to build the applications by adopting the most appropriate data access approach and provides performance tips.
Best ASP.Net Data Access includes the following elements:
- ActiveX Data Object [ADO.Net]
- Connection pooling
- Error handling and exceptions
- Manage Data Access using Data Objects
- Strongly typed Data object
- Manage Null Data Fields
- Handling Binary Large Object data types [BLOBs]
- Data Paging
ASP.Net Data Access Components
ADO.Net is the main set of classes in the .Net framework that includes the supported features for accessing, managing, modifying and deleting database items. For performance solutions ASP.Net ADO.Net framework provides SQL provider that consists of SQL components to work with SQL Database and supports the best Data Access Model as a combination of ASP.Net 2.0 web applications with SQL Server 2005.
ADO.Net Framework classes provide 2 models:
- Connected Data Access Model
- Disconnected Data Access Model
Connected Data Access Model includes components such as ADO.Net Database Connection, Command and DataReader that work to access the Database when the database connection state is open.
Disconnected Data Access Model includes components such as ADO.Net DataAdapter, DataTable, DataView and DataSet that work whether the connection state is closed. They represent the in-memory stored structure and data of database.
Continue to the next tutorial: ADO.Net Data Access Model for ASP.Net-Part 1 to learn about the connected type data access objects.