ADBMS unit 4: distributed database design (DDD) Flashcards
Explain what are distributed database in short
A distributed System is a collection of autonomous computer systems that are physically separated but are connected by a centralized computer network that is equipped with distributed system software.
whare are distributed databases used
These are used in numerous applications, such as online gaming, web applications, and cloud computing.
Design issues intro
However, creating a distributed system is not simple, and there are a number of design considerations to take into account. The following are some of the major design issues of distributed systems.
explain design issues in distributed databases
scalability
reliability
availability
consistency
latency
load balancing
security
architectural design patterns
communication issues
data management
explain challenges in scalability
handling increases load: as no. of users or requests increases, the system must scale accordingly without performance degradation
explain geographic distribution
ensuring performance across geographically dispersed locations
strategies to achieve scalability
horizontal scaling
vertical scaling
sharding
explain horizontal scaling
explain vertical scaling
explain sharding
explain reliability
what is fault tolerance in reliability
explain redundancy and replication
explain availability
explain consistency
explain latency
explain load balancing
explain security
explain architectural design patterns
explain communication issues
explain data management
what is fragmentation
breaking a global relation R into smaller relations called framgents R1, R2, ….. Rn such that these smaller relations contain enough information to reconstruct the global relation R
types of fragmentation
- horizontal
primary
derived - vertical
- hybrid
explain horizontal fragmentation
breaking a global relation R horizontally ( with respect to data stored ) into two or more sub-relations without disturbing the structure of the relation is called Horizontal fragmentation.
Schema(R) = Schema(R1) = Schema(R2) = Schema(Rn)
example of Horizontal fragmentation
Student table / relation
with columns
reg_no
name
gender
address
contact
campus
divide this table using campus property
if there are three types of values in campus column then we can divide this table into three horizontally fragments
what do we divide in horizontal frag. rows or column
in horizontal fragmentation we divide columns only not rows
what operation we called it when we perform horizontal fragmentation
horizontal fragmentation is just a SELECTION operation performed on the global relation R with appropriate selection conditions P
what are correctness rules of fragmentation
when we divide global relation R into numerous fragments, to check whether this fragments are correct or not we have some rules which are known as correctness rules
explain completeness, first rule of correctness of fragmentation
breaking of relation R into sub-relations R1, R2, … Rn is said to be complete if and only if each data item (record) present in R can also be found in some Ri
what is rule for horizontal to completness
for horizontal and vertical fragmentation
R1, R2, … , Rn belongs to R
explain completeness in simple words
when we add all fragments, we should get original table
explain reconstruction
if a global relation R is broken into fragments R1, R2, … Rn. then there should be a way to reconstruct R from these fragments without loosing data.
For horizontal fragmentation, how does reconstruction works
R1 union R2 union Rn = R
for vertical fragmentation what operation we perform to get original table back
R1 inner_join R2 inner_join R3 inner_join Rn = R
in horizontal fragmentation what operation we perform to get original table / relation back
union operation
for vertical fragmentation which operation we perform to get original table / relation back
natural join
explain disjointness rule of correctness of fragmentation
if a global relation R is broken into fragments R1, R2 and Rn, a record (row) that is found in one fragment must not present in any other fragments.
That is,
R1 ∩ R2 ∩ … R3 = NULL
===
Fragmented record must not found into other fragments
No records must be common in more than one fragment
what are two types of horizontal gragmentation
primary
secondary
explain primary horizontal fragmentation.
1. What is it?
2. What do we require?
3. How to find the simple conditions?
- It is about fragmenting single table horizontally with set of simple conditions
- The procedure to find the simple conditions that are required to fragments the table.
- Simple predicates
Min-term predicates
what do we require to achieve primary horizontal fragmentation
how to find simple conditions, for primary horizontal fragmentation
simple predicates
min-term predicates
before that we need to know, application or set of applications that are going to access these fragments differently
what are simple predicates
Given a relation R with set of n attributes, a simple predicate P is a condition of the form as follows:
attribute i comparison-operator value
here,
1. attribute is any attribute of the relation R
2. comparison operator can be one of =, <, >, >=, <=, !=
3. value is the permitted value for the domain of that attribute
Example:
REG_NO = 119
GENDER = ‘M’
GRADE = 5
explain set of simple predicates
a relation usually fragmented using multiple simple predicates collectively
Example:
Employee(Emp_id, Ename, Department, Office)
p = {office=’chennai’, department=’design’}
what are some desirable properties of simple predicates
the set of simple predicates should be complete and minimal
Complete: not missing any data and equal probability of access by every application
Minimal: If all the predicates of a set P are relevant, then P is minimal. That is, there should be at least one application that accesses fragments f1 and f2 differently
what are min-term predicates
Time: 18:45
https://www.youtube.com/watch?v=W0BSpV4bM74&t=29s
can we use simple predicates for fragmentation directly
no
what is min-term predicate
formal definition of min-term predicate
What is Derived horizontal framgentation
The process of creating horizontal fragments of a table in question based on the already created horizontal fragments of another relation (for example, base table) is called Derived Horizontal Fragmentation
PK = owner relation
FP = member relation
what is semi-join
semi-join is a join operation that results in a structure and records of one table that match with the records of the other table
resource: derived horizontal fragmentation
https://www.youtube.com/watch?v=CF9gXrOXAxI&t=250s
resources
https://www.ques10.com/p/17566/explain-design-issue-of-distributed-database-1/
data allocation
https://www.ques10.com/p/17566/explain-design-issue-of-distributed-database-1/