Showing posts with label Distributed Database. Show all posts
Showing posts with label Distributed Database. Show all posts

Thursday, May 4, 2017

What is homogeneous distributed DBMS

What is homogeneous distributed DBMS? Homogeneous distributed database example, why homogeneous distributed DBMS


Homogeneous Distributed DBMS


Distributed database is logically interrelated databases that are spread over multiple sites (servers usually at different geographic locations). Distributed DBMS is the software that handles or controls distributed databases efficiently.
In distributed database, each site has the following properties;

  • It runs on local DBMS software.
  • The database stored locally has a schema (structure).
  • A degree of autonomy on the data those are stored locally and partial autonomy on other sites etc.

A distributed DBMS is a homogeneous DBMS if one or few or all of the following are true;

  • All sites use same/identical DBMS software. 
    • For example, all sites in that distributed database network may use Oracle as the DBMS.
  • Databases that are stored locally at each server will have same structure. 
    • For example, a student table with the schema STUDENT(Regno, Name, Phone) will be stored at all sites with the same schema.
  • If the DBMS software, the schema, and the application software that uses the data are same at all sites, then every site know about other sites well (at least partially)

****************










What is heterogeneous distributed DBMS

What is heterogeneous distributed DBMS? Heterogeneous distributed database example, why heterogeneous distributed DBMS


Heterogeneous Distributed DBMS


Distributed database is logically interrelated databases that are spread over multiple sites (servers usually at different geographic locations). Distributed DBMS is the software that handles or controls distributed databases efficiently.
In distributed database, each site has the following properties;

  • It runs on local DBMS software.
  • The database stored locally has a schema (structure).
  • A degree of autonomy on the data those are stored locally and partial autonomy on other sites etc.

A distributed DBMS is a heterogeneous DBMS if one or few or all of the following are true;


  • The sites at different location may use different DBMS software and application software. 
    • For example, site at Chennai may use Oracle while the site at New York may use SQL Server.
  • Databases that are stored locally at each server may have different structure. 
    • For example, a student table with the schema STUDENT(Regno, Name, Phone, Gender) will be stored at one site with the said schema and at the other with the schema STUDENT(Regno, Phone).
  • If either the DBMS software, or the schema, or the application software that uses the data is different at different sites, then it is hard for each site to know about other sites. But each site has full control over the local data.

***************



 






Friday, March 31, 2017

Primary horizontal fragmentation solved exercise

Primary horizontal fragmentation solved exercise, how to find simple predicates and min-term predicates, primary horizontal fragmentation of a relation in distributed database


Question:
Consider the following relation schema and the set of applications that are frequently accessing the relation;
DEPARTMENT (DeptNo, DeptName, School, Phone)
Application 1: Find the department details of SITE school.
Application 2: Find the phone of ‘Digital communication’ department.
Fragment the given table horizontally according to the requirement and check for correctness of the fragments.

Solution:
Simple predicates:
From the applications, we can identify the simple predicates. The first application access the department table using the school name. Hence, the simple predicate is School = ‘SITE’. The second application access the data on the condition DeptName = ‘Digital communication’. Hence, our set of simple predicates Pr can be written as follows;
Pr = { p1: School = ‘SITE’, p2: DeptName = ‘Digital communication’ }

Min-term predicates:
Min-term predicates can be derived from set of simple predicates by ANDing and NEGATing all the simple predicates as follows;
m1 = { School = ‘SITE’ DeptName = ‘Digital communication’ }
m2 = { School = ‘SITE’ ¬(DeptName = ‘Digital communication’) }
m3 = { ¬( School = ‘SITE’) DeptName = ‘Digital communication’ }
m4 = { ¬(School = ‘SITE’) ¬(DeptName = ‘Digital communication’) }

We have negated each simple predicate so as not to miss any records from the tables. For example, when we mention school = ‘SITE’ it implicitly means that there are other schools other that SITE. And the condition school = ‘SITE’ includes SITE school and the negations of this i.e., school <> ‘SITE’ will include all the other schools.
Primary Horizontal Fragmentation:
The table DEPARTMENT can be horizontally fragmented using the Primary Horizontal Fragmentation technique using these min-term predicates m1, m2, m3 and m4. For example, the fragment 1 stores the data as per the min-term predicate m1 using the following query;
SELECT * FROM Department WHERE School = ‘SITE’ AND DeptName = ‘Digital communication’;
At the end of fragmentation, we have 4 fragments of Department table viz. DEPT1, DEPT2, DEPT3, and DEPT4.

Correctness of Fragmentation:

After fragmenting a table, the very next step is to check whether the fragments are correct or not. This could be verified using the following correctness properties;
Completeness – Each record of table DEPARTMENT should be found in any one of the fragments DEPT1, DEPT2, DEPT3, and DEPT4. As our simple predicates are complete and minimal, we can say that the fragments are complete.
Reconstruction – We must be able to reconstruct DEPARTMENT from the fragments DEPT1, DEPT2, DEPT3, and DEPT4. The following relational algebra operation on fragments will get us DEPARTMENT;
DEPARTMENT = DEPT1 U DEPT2 U DEPT3 U DEPT4
Dis-jointness – The result of the intersect operation between fragments should give me a empty set as result;
DEPT1 DEPT2 DEPT3 DEPT4 =
All these three properties are verified. Hence, our primary horizontal fragmentation is correct.

**************









Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery