Choosing Data Access Technologies and an Object Model Instructor : Dimara Kusuma Hakim, ST.
Data Access System Components Middleware Data Access Component SQL Server DB2 Oracle Middleware Data Access Component SQL Server Oracle DB2 Middleware Data Access Component Client-side Components Server-side Components Data Access Technologies Desktop Computer Database Server
Data access libraries that support client-side OLE DB ODBC ADO ADO.NET
Data Access Technologies <ul><li>Architecture of Data Access Technologies </li></ul>VBSQL.OCX Database Application ADO OLEDB DB-Library SQLNCLI Client Network Library .NET Framework Data Provider for SQL Server Storage Engine Relational Engine TSQL Endpoint Server Network Library DB Server
Considerations for Using Earlier Technologies to Access Data <0II0ll> Legacy technology Considerations DBLibrary ODBC Generic, industry-standard; still the only option for some data sources OLE DB Available for relational and non-relational data sources SQLXML Functionality to be replaced by HTTP endpoints and new XML support in SQL Server 2005
Guidelines for Accessing Data When Using Databinding Consider the following guidelines for accessing data by using Databinding : Implement concurrency violation detection code Use connection pooling Filter data properly Acquire late, release early Explicitly close connections
Connection SqlConnection cn = new SqlConnection(“Data Source=MIA- SQLSQLINST1;InitialCatalog=AdventureWorks;Integrated Security=True”); cn.Open(); Server Client Execution Session Execution Environment Session ID Connection Pool SqlCommand cmd1 = new SqlCommand(“SELECT ...”, cn); SqlCommand cmd2 = new SqlCommand(“UPDATE ...”, cn); SqlDataReader rdr1 = cmd1.ExecuteReader(); SqlDataReader rdr2 = cmd2.ExecuteReader(); cn.Close(); Server Client
Demonstration: Connecting SQL Server to Other Data Stores In this demonstration, your instructor will explain the various ways to connect SQL Server to other data stores