Net Josh Bowen CIS 764FS2008 Introduction To best understand a technology it is often useful to look at what came before Within net three main classes are used for database access A new technology called LINQ has been introduced with the latest ID: 140796
Download Presentation The PPT/PDF document "Overview of Database Access in" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Overview of Database Access in .Net
Josh BowenCIS 764-FS2008Slide2
Introduction
To best understand a technology it is often useful to look at what came beforeWithin .net three main classes are used for database access
A new technology called LINQ has been introduced with the latest
.Net
frameworkSlide3
Timeline
ODBC
DAO
OLE
DB
ADO
RDO
JDBCADO.net v1.0ADO.net v2.0ADO.netv3.0LINQ1992199219951996199619972002200520062007
This is not an exhaustive list of database access technologiesThere are as many DB access methods as there are stars in the sky (well almost)Each of these technologies influenced the creation of .Net database access technologySlide4
Low Level Access
ODBC – Created to provide a common method for accessing databases, implemented many times by many different companiesDAO,OLE DB,RDO,ADO – Created to simplify access to databases, often used ODBC, many tied to specific products such as Access or Visual BasicSlide5
JDBC
Database access in Java4 Major ClassesDriver – Specific to database type
Connection – Information about the DB to access
Statement – The SQL to execute
Results – Data retrieved from databaseOne option was a connection to ODBCSlide6
ADO
The Microsoft technology which most influenced .netRelied on 2 major classes
Connection: Information about how to connect to DB, executed queries against connection class
Recordset
: Held information retrieved from DBs
Built upon OLE DB
ActiveX Data Objects – Based on COMSlide7
ADO.net
Part of the .Net framework from the beginning
Similar to ADO, but not simply a
.Net
version of ADOBased on three classesConnection: DB type specific, Holds information necessary to communicate with DB
Adapter: Holds the SQL commands for SELECT, DELETE, UPDATE
and ADDDataset: Holds the data, Can contain multiple tables and relations between tablesSlide8
ADO.net cont.
To make changes to data change the data in the data set, and use the adapter to propagate changes to databaseThe dataset can be used to store information from any type of data source, only the connection and adapter are specific to database type
ADO.net can be used to query other data sources like XML filesSlide9
LINQ
Introduced as part of the .Net framework 3.5Completely new way to access data
Select statements are made from within the language, not as strings passed to a query class
Can be used to query not only databases but also collections and arrays which implement the correct interfacesSlide10
LINQ cont.
Language Integrated Query – The queries are actually compiled parts of the program, complete with intellisense
Currently can be used with SQL server, other database types need to be accessed using ADO.net components along with LINQSlide11
Conclusion
The history of database access within Microsoft Windows is of decreasing complexityADO and JDBC both influenced the design of data access in
.net
ADO.net provides a simple yet robust method of accessing data
LINQ represents a major shift in the way databases are accessed