REFERENCE LINK:http://helpingdotnet.blogspot.in/2011/10/connected-and-disconnected-architecture.html
Connected and Disconnected architecture in C#
Connected Architecture of ADO.NET
The architecture of ADO.net, in which connection must be opened to access the data retrieved from database is called as connected architecture. Connected architecture was built on the classes connection, command, datareader and transaction.
Connected architecture is when you constantly make trips to the database for any CRUD (Create, Read, Update and Delete) operation you wish to do. This creates more traffic to the database but is normally much faster as you should be doing smaller transactions.
Disconnected Architecture in ADO.NET
The architecture of ADO.net in which data retrieved from database can be accessed even when connection to database was closed is called as disconnected architecture. Disconnected architecture of ADO.net was built on classes connection, dataadapter, commandbuilder and dataset and dataview.
Disconnected architecture is a method of retrieving a record set from the database and storing it giving you the ability to do many CRUD (Create, Read, Update and Delete) operations on the data in memory, then it can be re-synchronized with the database when reconnecting. A method of using disconnected architecture is using a Dataset.
DataReader is Connected Architecture since it keeps the connection open until all rows are fetched one by one
DataSet is DisConnected Architecture since all the records are brought at once and there is no need to keep the connection alive
Difference between Connected and disconnected architecture
Connected | Disconnected |
It is connection oriented. | It is dis_connection oriented. |
Datareader | DataSet |
Connected methods gives faster performance | Disconnected get low in speed and performance. |
connected can hold the data of single table | disconnected can hold multiple tables of data |
connected you need to use a read only forward only data reader | disconnected you cannot |
Data Reader can't persist the data | Data Set can persist the data |
It is Read only, we can't update the data. | We can update data |
No comments:
Post a Comment
Convey your thoughts to authors.