1 / 11

Overview of Database Access in .Net

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

zytka
Download Presentation

Overview of Database Access in .Net

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Overview of Database Access in .Net Josh Bowen CIS 764-FS2008

  2. 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

  3. Timeline • 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

  4. 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

  5. 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

  6. 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

  7. 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, UPDATEand ADD • Dataset: Holds the data, Can contain multiple tables and relations between tables

  8. 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

  9. 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

  10. 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

  11. 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

More Related