Download presentation
Presentation is loading. Please wait.
Published byVictoria Fleming Modified over 9 years ago
2
Overview of Database Access in.Net Josh Bowen CIS 764-FS2008
3
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.Net framework
4
Timeline ODBCDAOOLE DB ADORDOJDBCADO.net v1.0 ADO.net v2.0 ADO.net v3.0 LINQ 1992 19951996 19972002200520062007 This 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
5
Low Level Access ODBC – Created to provide a common method for accessing databases, implemented many times by many different companies DAO,OLE DB,RDO,ADO – Created to simplify access to databases, often used ODBC, many tied to specific products such as Access or Visual Basic
6
JDBC Database access in Java 4 Major Classes – Driver – Specific to database type – Connection – Information about the DB to access – Statement – The SQL to execute – Results – Data retrieved from database One option was a connection to ODBC
7
ADO The Microsoft technology which most influenced.net Relied 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 COM
8
ADO.net Part of the.Net framework from the beginning Similar to ADO, but not simply a.Net version of ADO Based on three classes – Connection: DB type specific, Holds information necessary to communicate with DB – Adapter: Holds the SQL commands for SELECT, DELETE, UPDATE and ADD – Dataset: Holds the data, Can contain multiple tables and relations between tables
9
ADO.net cont. To make changes to data change the data in the data set, and use the adapter to propagate changes to database The 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 files
10
LINQ Introduced as part of the.Net framework 3.5 Completely 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 interfaces
11
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 LINQ
12
Conclusion The history of database access within Microsoft Windows is of decreasing complexity ADO 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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.