Reputation: 8178
what are advantages & disadvantages of connected & disconnected Architecture (database) over one another in asp.net ?
Upvotes: 5
Views: 40967
Reputation: 405
connected data needs connection to be created to access hence slower while disconnected is in memory data that's faster access.
to access connected data you use ADO.NET whereas for disconnected you do not use.
disconnected-data can be accessed from multiple tables in a dataset. connected- .NET runtime creates an instance of the datatable to hold data.
in disconnected data you can create a window to the datatable in the form of a dataview used to sort and filter data. which cannot be done in connected data access
connected you need to use a read only forward only data reader, disconnected you cannot.
disconnected data in a dataset can be serialized/deserialized.
Upvotes: 1
Reputation: 21
before understanding about this implementation you have to understand how database system is implemented in .NET frame work. in .NET ,the ADO.NET is responsible for data handling and in ADO.NET there is dataset, data adapter and database.
dataset is a temporary placement in the client's memory for holding the data sent from the database. data adapter is an intermediate party that sends and receives data back and forth ,I meant it sends data from dataset and then database server sends the result from the database to the dataset and this process is done through data adapter.
usually data adapter uses a connection to connect with the database in order start the transaction and in Disconnected data architecture ,this connection is closed as soon as the data is passed from/to database . the biggest advantage is the security because when the connection is always opened anyone can access to the database because it's always opened. in connected one, the user has to authenticate again and again and open the connection again and again whenever the transaction is started so this reduces the performance and increases work load specially when there is a lot of transactions but it secures the database from unauthorized parties.
Upvotes: 2
Reputation: 121
In disconnected architecture a DataSet is used for retrieving data from the database. Then no need for maintaining the connection also. All the operations can be performed with the data once retrieved. It won't cause traffic problems while working with the data.
In connected architecture a DataReader is used for retrieving data from the database. Here a connection is always maintained. Update, Delete, Read and Select operations can be performed as the data is accessed in the database, so that a connection must be be maintained. This can cause traffic problems.
Upvotes: 12
Reputation: 28064
With regards to ASP.NET, a "disconnected" architecture usually refers to one in which data is downloaded to the ASP.NET app's memory in infrequent bulk requests and stored in the cache for later processing. This avoids frequent trips to the database, thus eliminating one of the major I/O obstacles. In a site where data is frequently queried but not updated, this can be a significant performance improvement, if your server has the memory to support the caching of the data.
There is of course the possibility that you're referencing the use of something like Google Gears, but I haven't heard of that being used much in the ASP.NET world. Anything's possible, I suppose.
Upvotes: 3
Reputation: 115793
asp.net is a server side technology designed for a server to process requests for pages. The very nature of ASP.NET requires a connected model.
Could you clarify what you mean by "disconnected"?
Upvotes: -3