190 likes | 212 Views
Distributed database lecture 2. By: Tufail Khan. Homogenous and heterogeneous environments. Homogeneous: 1. Data are distributed across all the nodes . 2. The same DBMS is used at each location. Heterogeneous: 1. Data are distributed across all the nodes.
E N D
Distributed databaselecture 2 By: Tufail Khan
Homogenous and heterogeneous environments • Homogeneous: • 1. Data are distributed across all the nodes. • 2. The same DBMS is used at each location. • Heterogeneous: • 1. Data are distributed across all the nodes. • 2.Different DBMS’s may be used at each node.
Objectives and trade-offs • Objectives: • 1. Location transparency: A major objective of distributed database is to provide ease of access to data • for users at many different locations. • To meet this objective, the distributed database system must provide location transparency.
Contd… • Location transparency means that a user using data for querying or updating data, • need not know the location of that data. • Any request to retrieve or update data from any site, • is automatically forwarded by the system to the site, • or sites related to the processing request.
Contd… • Ideally the user is unaware of the distribution of data, • and all data in the network appear as one single logical database stored at one site. • In this ideal case, a single query can join data from tables in multiple sites, • as if the data were all in one site.
Contd… • Local autonomy:a second objective of distributed databases is local autonomy, • Which is the capability to administer a local database, • and to operate independently when connections to other nodes have failed. • With local autonomy, each site has the capability to administer security • and recover when local failure occurs,
Contd… • And to provide full access to local data to local users • when any central site cannot operate. • In this case, data are locally owned and maintained, • even though they are accessible from remote sites. • It means no reliance on central site.
Trade-offs • A situation in which you accept something bad in order to have something good. • A significant trade-off in designing a distributed database environment is, • whether to use synchronous or asynchronous distributed technology. • with a synchronous distributed database technology, • all data across the network are continuously kept up-to-date.
Contd… • So that a user at any site can access data anywhere on the network, • at any time and get the same answer. • With synchronous technology if any copy of a data item is updated anywhere on the network, • the same update is immediately applied to all other copies or aborted.
Contd… • Synchronous technology ensures data integrity, • and minimizes the complexity of knowing where the most recent copy of data are located. • Synchronous technology can result in unsatisfactorily slow response time, • since the distributed DBMS is spending considerable time, • checking that an update is accurately and completely propagated across the network.
Asynchronous distributed database • With asynchronous technology, there is usually some delay in propagating updates, • across the remote databases. • So some degree of at least, temporary inconsistency is tolerated. • But here, response time will be faster.
Advantages of distributed databases • As compared to centralized databases, • there are numerous advantages of a distributed database. • Following are the most important. • Increase reliability and availability: • when a centralized system fails, • the database is unavailable to all users.
Contd… • A distributed system will continue to function at some reduced level, • even when a component fails. • The reliability and availability will depend on how the data are distributed.
Contd… • Modular growth: suppose that an organization expands to a new location, • or adds a new work group. • It is often easier and more economical to add a local computer and its associated data • to the distributed network than to expand a large central computer.
Contd… • Also there is less chance of disruption to existing users, • than is the case when a central computer system is modified or expanded. • Lower communication cost:with a distributed system, data can be located closer to their point of use. • This can reduce communication cost compared to a central system.
Contd… • Faster response: depending on how data are distributed, • most requests for data by users at a particular site, • can be satisfied by data stored at that site. • This speeds up query processing, • since communication and central computer delays are minimized.
Disadvantages • Software cost and complexity: More complex softwares (especially DBMS) is required • for a distributed database environment. • Processing overhead: The various sites must exchange messages, • and perform additional calculations to ensure proper coordination among data at the different sites.
Contd… • Slow response: If the data are not distributed properly according to their usage, • response to requests for data can be extremely slow.