Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Database and Replication. Distributed Database A logically interrelated collection of shared data and a description of this data physically.

Similar presentations


Presentation on theme: "Distributed Database and Replication. Distributed Database A logically interrelated collection of shared data and a description of this data physically."— Presentation transcript:

1 Distributed Database and Replication

2 Distributed Database A logically interrelated collection of shared data and a description of this data physically distributed over a computer network. Homogeneous –All sites use the same DBMS product. Heterogeneous –Sites may run different DBMS products.

3 Data Allocation Fragmented allocation: –Partition the database into disjoint fragments, with each fragment assigned to one site where they are used most frequently. Horizontal fragment Vertical fragment Complete replication –Maintain a complete copy of the database at each site. Selective replication –Mixed of fragmentation and replication

4 Extending ANSI-SPARC Model to Distributed DBMS Global External view at each site Global Conceptual schema Fragmentation and Allocation schemas Local schemas

5 Advantages and Disadvantages of Distributed Database Advantages: –Improved availability –Improved reliability Replication Disadvantages –Complexity Distributed query processing, concurrency control, recovery –Security –Integrity control more difficult

6 Synchronous versus Asynchronous Replication Synchronous replication: –Replicated data is updated immediately. Asynchronous replication: –Replicated data is updated after the source database has been modified. –Data ownership: which site has the privilege to update the data.

7 Master/Slave Ownership Asynchronous replicated data is owned by one site, the master site, and can be updated only by that site. Publish-and-subscribe Applications –Decision support system analysis –Distribution and dissemination of centralized information –Consolidation of remote information Replicated copy can be update locally and then brought together in one location. –Mobile computing

8 Database Snapshots It is a complete or selective part of a database that is consistent with the database at a specific point in time. –Create Snapshot –Refresh Snapshot Complete refresh Differential refresh

9 Replication in ADO.Net Data Set.NET Applications Data Reader Command Object Connection Object Database Adapter

10 DataReader Object It is read-only and forward-only cursor.

11 DataSet Object A DataSet object can hold several tables and relationships between tables. A DataSet is a set of disconnedted data. Data is extracted from the database and stored in the DataSet object. Updates to the DataSet must copy back to the database to make the changes permanent. Example:Example


Download ppt "Distributed Database and Replication. Distributed Database A logically interrelated collection of shared data and a description of this data physically."

Similar presentations


Ads by Google