ADO.NET
Prepared By
S.rangarajan
Introduction to data access
• Remote applications may have different
format of data
• Stand alone application has same format
• ADO.net used to connect remote applications
• Ado.net Activex DataObjects
History of Data Access
• Before access to database was performed by
native libraries
• Eg.OCI (Oracle Call Interface) for Oracle
• Advantage was fast access no extra layer of
software was needed
• DisAdvantage was programmer had to learn
different languages
ODBC
• 1990 Microsoft and other companies decided and
prepared ODBC
• Open Database Connectivity
• Used to access any and every RDBMS
• ODBC uses specific RDBMS driver
• Database driver is a program that will translate
data between front end and backend
• Front end: language
• Back end : database
Contd
• Drivers are laoded and managed by the ODBC
Driver Manager.
• Uses connection pooling: resuability of
connection.
• No need to create and destroy connection
each time.
• It can be updated easily.
DAO
• Data Access Objects
• ODBC was used with low level languages C++
• As VB grew DAO came into existence
• DAO connects with Jet Microsoft database
• DAO connects fastest with Microsoft Access
RDO
• DAO was very slow when used with ODBC
data source.
• Remote Dataobjects invented by Microsoft
• To work with other then microsoft databse
• Thin wrapper over ODBC api
OLE DB
• Having similar resemblance to ODBC
• Implements set of COM interfaces
• Allows access to data in the format of
rows/columns
• Application making use of OLE DB is called its
CONSUMER
• OLE DB performs various fucntions
• Connection pooling,transaction enlisting,data
persistence,client side data manipulation
Contd
• OLE DB also referred as universal data access
• Data may be stored in many places in
email,excel,web pages.
• All data should be accessed by a single
universal technology.
• OLE DB providers are increasing for the
RDBMS and the non RDBMS
• The version provided by microsoft supports
many models
ADO
• Activex Data Objects
• It is an OLE DB consumer
• Thin layer allowing user to use high level
languages VB.net and other scripting
languages.
• ADO is to OLE DB what RDO was to ODBC
Introduction to ADO.net
• Manipulation of data
• Robust
• Hierarchical
• Offline support
• Multi language support
• Garbage collection
• JIT
• OOP design
• Dynamic Cache
ADO.net Architecture
• 2 main parts
• Data Provider(Connected Objects)(online)
• Data set ( Disconnected Objects)(offline)
Data Provider
• Data manipulation.
• Read only access.
• Executing commands and retrieving results.
• Light weight component
• Increases performances
Data Provider :4 core objects
1.Connection
2. Command
3. Data Reader
4. DataAdapter
Data Set
• Data Set represents complete set of data
• including related tables constraints
• and relationship among tables.
Data Set:2 components
• 1 Data Table Collection: Row and column
• 2 Data RelationCollection:relation between
row and column

Ado.net

  • 1.
  • 2.
    Introduction to dataaccess • Remote applications may have different format of data • Stand alone application has same format • ADO.net used to connect remote applications • Ado.net Activex DataObjects
  • 3.
    History of DataAccess • Before access to database was performed by native libraries • Eg.OCI (Oracle Call Interface) for Oracle • Advantage was fast access no extra layer of software was needed • DisAdvantage was programmer had to learn different languages
  • 4.
    ODBC • 1990 Microsoftand other companies decided and prepared ODBC • Open Database Connectivity • Used to access any and every RDBMS • ODBC uses specific RDBMS driver • Database driver is a program that will translate data between front end and backend • Front end: language • Back end : database
  • 5.
    Contd • Drivers arelaoded and managed by the ODBC Driver Manager. • Uses connection pooling: resuability of connection. • No need to create and destroy connection each time. • It can be updated easily.
  • 6.
    DAO • Data AccessObjects • ODBC was used with low level languages C++ • As VB grew DAO came into existence • DAO connects with Jet Microsoft database • DAO connects fastest with Microsoft Access
  • 7.
    RDO • DAO wasvery slow when used with ODBC data source. • Remote Dataobjects invented by Microsoft • To work with other then microsoft databse • Thin wrapper over ODBC api
  • 8.
    OLE DB • Havingsimilar resemblance to ODBC • Implements set of COM interfaces • Allows access to data in the format of rows/columns • Application making use of OLE DB is called its CONSUMER • OLE DB performs various fucntions • Connection pooling,transaction enlisting,data persistence,client side data manipulation
  • 9.
    Contd • OLE DBalso referred as universal data access • Data may be stored in many places in email,excel,web pages. • All data should be accessed by a single universal technology. • OLE DB providers are increasing for the RDBMS and the non RDBMS • The version provided by microsoft supports many models
  • 10.
    ADO • Activex DataObjects • It is an OLE DB consumer • Thin layer allowing user to use high level languages VB.net and other scripting languages. • ADO is to OLE DB what RDO was to ODBC
  • 11.
    Introduction to ADO.net •Manipulation of data • Robust • Hierarchical • Offline support • Multi language support • Garbage collection • JIT • OOP design • Dynamic Cache
  • 13.
    ADO.net Architecture • 2main parts • Data Provider(Connected Objects)(online) • Data set ( Disconnected Objects)(offline)
  • 14.
    Data Provider • Datamanipulation. • Read only access. • Executing commands and retrieving results. • Light weight component • Increases performances
  • 15.
    Data Provider :4core objects 1.Connection 2. Command 3. Data Reader 4. DataAdapter
  • 16.
    Data Set • DataSet represents complete set of data • including related tables constraints • and relationship among tables.
  • 17.
    Data Set:2 components •1 Data Table Collection: Row and column • 2 Data RelationCollection:relation between row and column