Pages

Saturday, February 19, 2011

19/02 ADO.NET :


Date 19-2-11 Saturday
ADO.NET
Data Source Communication: - Data source is a storage device under which we can store data. Every storage device like: File, Database or Indexing sever can be called as data sources
                
                - Programming language can not communicate with a data source directly because each data source adopts a different protocol for communication.

                - To facilitate the process of communication Microsoft has provide a solution in the form of Drivers and Providers, which acts as a mediator b/w a  language and Data Source.



Drivers: - Initially these are designed for targeting the databases, Drivers are of two types:
 1.       JET drivers
2.       ODBC drivers
Jet Drivers: - (Joint Engine Technology) these driver are designed for targeting Local Databases.
ODBC Drivers (Open Data-Base Connectivity) : -  These drivers are designed for targeting remote databases
Like: Oracle, SQL server, Sybase, Ingress etc.


Drawbacks of Drivers: -

1.       These are initially designed for targeting the database only.
2.       Derivers Reside on client machine, so each and every machine on which the application is present the Drivers has to be config explicitly.
OLEDB Providers: - (Object Linking and Embedding Database) these are designed to resolve the problems with drivers targeting Data Source communication and moreover providers reside on server but not on client.
Note – Both drivers and providers suffers from a common drawback i.e. they are OS dependent because they were developed using Native code Languages.

Classical Visual Basic language was not able to use Drivers and Providers directly because drivers and provide have native code support. So Visual Basic Language used few intermediate components for communication with Drivers and Providers as following.


Here DAO’s means: Data Access Objects
RDO’s: Remote Data Objects
ADO’s: Active Data Objects

Int Que. What is difference B/W ADO’s and ADO.Net?



ADO.NET

ADO.NET: - It is a collection of managed Providers that can be used for communication with data Sources. When .NET was introduced to communicate with Data Sources they have designed ADO.net, which is an extension to older ADO. I.e. collection of unmanaged providers.
- ADO.net provides various classes that can be used for data source communication under the following namespace.
-        System.Data
-        System.Data.Oledb
-        System.Data.SqlClient
-        System.Data.OracleClient
-        System.Data.Odbc

1.       System.Data à Set of types used for holding and manage data on the client machine classes under this are sets DataSets, DataTable, DataColumn, DataView, DataRelation etc.

2.       System.Data.Oledb à collection of type used for communicate with any data source Like: Files, Databases, indexing servers etc.

3.       System.Data.SqlClient à collection of types used for communication only with Sql server databases


4.       System.Data.OracleClient à collection of types used for communication only with oracle  databases

5.       System.Data.Odbc à collection of types used for communication with traditional odbc drivers, which will in turn communicate with data sources.
All the above 4 namespace contain same set of classes as following: Connection, Command, DataReader, DataAdopter, CommandBuilder, Parameter etc.
Note – Each class was referred by prefixing with the namespace before class name to discriminate b/w each other as following:

-        OledbConnection
-        OledbCommand
-        SqlConnection
-        SqlCommand
-        OracleConnection
-        OracleCommand
-        OdbcConnection
-        OdbcCommand

1 comments:

fdfsdf said...

Dotnet Programmer : Article's | Project's | Interview Question & Answer

http://allittechnologies.blogspot.in/

Post a Comment