+ All Categories
Home > Documents > Overview of Database Access in .Net

Overview of Database Access in .Net

Date post: 23-Feb-2016
Category:
Upload: zytka
View: 26 times
Download: 0 times
Share this document with a friend
Description:
Overview of Database Access in .Net. Josh Bowen CIS 764-FS2008. 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 - PowerPoint PPT Presentation
Popular Tags:
11
Overview of Database Access in .Net Josh Bowen CIS 764-FS2008
Transcript

Overview of Database Access in .Net

Overview of Database Access in .NetJosh BowenCIS 764-FS2008

1IntroductionTo best understand a technology it is often useful to look at what came beforeWithin .net three main classes are used for database accessA new technology called LINQ has been introduced with the latest .Net framework

2TimelineODBC

DAO

OLE DBADO

RDO

JDBC

ADO.net v1.0ADO.net v2.0ADO.netv3.0LINQ1992

1992

1995

1996

1996

1997

2002200520062007This is not an exhaustive list of database access technologies

There 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 technology

3Low Level AccessODBC 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 Basic

4JDBCDatabase access in Java4 Major ClassesDriver Specific to database typeConnection Information about the DB to accessStatement The SQL to executeResults Data retrieved from databaseOne option was a connection to ODBC

5ADOThe Microsoft technology which most influenced .netRelied on 2 major classesConnection: Information about how to connect to DB, executed queries against connection classRecordset: Held information retrieved from DBsBuilt upon OLE DBActiveX Data Objects Based on COM

6ADO.netPart of the .Net framework from the beginningSimilar to ADO, but not simply a .Net version of ADOBased on three classesConnection: DB type specific, Holds information necessary to communicate with DBAdapter: Holds the SQL commands for SELECT, DELETE, UPDATE and ADDDataset: Holds the data, Can contain multiple tables and relations between tables

7ADO.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 typeADO.net can be used to query other data sources like XML files

8LINQIntroduced as part of the .Net framework 3.5Completely new way to access dataSelect statements are made from within the language, not as strings passed to a query classCan be used to query not only databases but also collections and arrays which implement the correct interfaces

9LINQ cont.Language Integrated Query The queries are actually compiled parts of the program, complete with intellisenseCurrently can be used with SQL server, other database types need to be accessed using ADO.net components along with LINQ

10ConclusionThe history of database access within Microsoft Windows is of decreasing complexityADO and JDBC both influenced the design of data access in .netADO.net provides a simple yet robust method of accessing dataLINQ represents a major shift in the way databases are accessed

11


Recommended