03 en Distributed DBMS
03 en Distributed DBMS
DISTRIBUTED DATABASES
INDEXES
Indeksai būna:
PRIMARY index is intended as a primary means to uniquely identify any row in the
table, so unlike UNIQUE it should not be used on any columns which allow NULL values
UNIQUE refers to an index where all rows of the index must be unique
INDEX refers to a normal non-unique index. Non-distinct values for the index are
allowed, so the index may contain rows with identical values in all columns of the index
FULLTEXT indexes are only useful for full text searches done with the MATCH() /
AGAINST() clause, unlike the above three - which are typically implemented internally
using b-trees
...
CORRECT WAY TO ADD INDEXES
Centralized database
All data is stored in one place (server)
All DMBS functions are executed in this server
Parallel database
All data is stored in different servers, located in the same LAN
Each server has its own DBMS
Distributed database
All data is stored in different servers, located in different locations, internet
Each server has its own DBMS
THE NEED OF PARALLEL, DISTRIBUTED DB
Homogeny DB
In each of the servers the same DBMS is
working
Those DBMS can exchange the data directly
Heterogenic DB
In each of the servers different DBMS is
working
It might be even different type DB (relational,
file, etc.)
For communication between DMBS special
interface is needed
QUERY EXECUTION
Direct
Executed in one server
Indirect
Executed in different server,
transferred by the first one
Netiesioginė
Tiesioginė
REPLICATION AND FRAGMENTATION
No replicas
Full replication
Partial replication
Replication is useful in situations where data selection is more common than data
update
Replication can by done synchronically (on the same time) or asynchonically (the
data is update from time to time)
CORRECTNESS OF THE FRAGMENTATION
Completeness
All records belong to one of the fragments
Uniqueness
Intersection of two fragments is an empty set
Each record should belong to one fragment only
Returning
It should be possible to get all data from all the fragments
It should be able to get data from specific fragment (knowing or not knowing where, in
which fragment it is stored)
HORIZONTAL FRAGMENTATION
Data is divided into fragments by rows
TYPES OF HORIZONTAL FRAGMENTATION
Round-robin
Consequential distribution
In order to find a record all DB fragments have to be overviewed
Hash value
Similar to Round-robin, but is simpler to use for complex fields
Range
Suitable for search by range
VERTICAL FRAGMENTATION
Data is divided into fragments by fields
MIXED FRAGMENTATION
QUESTIONS?
NOW, BY E-MAIL, …