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

25 May 2016

Distributed Database Management System Data Model

Data Model

  • A set of tools/ constructs used to model a database
  • Record/Semantic

Legacy Data Models

  • Hierarchical
  • Network
  • Relational

Relational Data Model

  • Two major Strengths
  • Three Components
  • Relational databases based on relational Data Model
  • A relation R defined over domains D1, D2, …., Dn is a set of n-tuples, <d1, d2, …, dn> such that <d1 clip_image002[4] D1……, dnclip_image002[5]Dn

Schemes in RDB

  • EMP(eNo, eName, eTitle, eSal, pNo, eResp, pDur)
  • PROJ(pNo, pName, bud)
  • Each of the attribute in these two relations has a domain, like…
  • Domains need not to be distinct

Keys

Primary Key

  • Minimum nonempty subset of a relation whose values uniquely identify each tuple in relation
  • The superset of the key is super key, like…
  • We also have candidate, alternate, secondary, foreign

Table

  • Relation represented in a two dimensional form

EMP

image

PROJ

image

image

  • After defining a relation’s scheme, it is populated
  • Tuples are rows and attributes are cols
  • Attributes get values from same domain
  • Can have NULL value, but….

Normalization

  • Step-by-step reversible process to produce anomalies free smarter tables
  • Anomalies Types….
  • Major step is decomposition
  • Universal Relation approach
  • Three Normal Forms
  • BCNF
  • Lossless decomposition
  • Dependency preservation

Dependency Structure

  • Norm. based on dependencies
  • Up to BCNF on FDs
  • MVD and P-JD

Dependencies

  • A relation R defined on attributes A(A1, A2, …., An), if Xclip_image002[8]A, Yclip_image002[9]A, if for each value of X
  • There is a unique value in Y, then X functionally determines Y, Xclip_image002[12] Y
  • If X clip_image002[16] Y and there is a Z clip_image004X and Z clip_image002[17]Y, then X partially determines Y or Y is partially dependent on X
  • A relation R defined on attributes A(A1, A2, …., An), if X clip_image002[20]A, Y clip_image002[21]A, Z clip_image002[22]A, if for each value of X
  • There is unique value of (Y,Z) pair and Z depends only on X then X multi determines Z, X clip_image002[26]Z

P-J Dependency

  • A relation R defined on attributes A(A1, A2, …., An), if X clip_image002[29]A, Y clip_image002[30]A, Z clip_image002[31]A, if R is equal to join of X, Y and Z then (X, Y, Z) constitute project-join dependency for R
  • 1NF, attributes have only atomic values
  • 2NF, there are no partial dependencies
  • 3NF, for each X clip_image002[35]Y where Y is not in X, either X is a superkey of R or Y is prime attribute

Distributed Database Management System (Fragmentation Transparency)

Responsibility of Transparency

  • Transparency is desirable but there is a compromise between level of Transparency and difficulty/cost
  • The language/Compiler: to provide uniform method of manipulating data. Avoid connectivity details.
  • Operating System: already provides in form of Device Drivers
  • Can also provide network Trns. However not all provide complete.
  • Third layer is DBMS. Uses features of Operating System in particular for network transparency.
  • Practically, we get combination of all three.

image

Layers of Transparency

Reliability in DDBS

  • Reliability through Distributed Transactions: Avoids simple point of failure
  • Concurrency Issues: Transaction involving multiple records
  • Failure Recovery: Involving multiple sites

Performance Improvement

  • Through Data Localization
  1. Each site handles a portion of data, so contention of CPU or I/O is relatively less
  2. Reduces remote access delays; no matter how fast networks are latency delays are there and may be unacceptable in certain case
  • Inter-query and Intra-query parallelism

Complicating Factors

  • In case of Replication:
  1. Choose the appropriate copy
  2. Update impact reflected on all replicas
  • Failure Recovery
  • Complexity
  • Cost: hardware and also the duplication of manpower
  • Distribution of Control may cause problems if not used cautiously

The Problem Areas

  • Database Design
  • Query Processing
  • Concurrency Control
  • OS Support
  • Heterogeneity
  • Relationship among them

image

Distributed database Management Systems (Resembling Setups)

Resembling Setups

  • Distributed Files: A collection of files stored on different computers of a network; not a DDBS
  • DDBS is logically related, common structure among files, and accessed via same interface
  • Multiprocessor System: multiple processors that share some form of memory

image

Shared Everything Tight Coupling

image

Shared Everything Loose Coupling

image

Shared Nothing

  • DDBS is also different from a centralized system having C/S system involving network

image

 

Reasons for DDBS

  • Local units want control over data.
  • Consolidate data for integrated decisions
  • Reduce telecommunication costs.
  • Reduce the risk of telecommunication failures.

image

Promises of DDBSs

Transparency

image

image

  • Data Independence
  • Two types, Logical Data Independence and Physical Data Independence
  • A transparent system hides the implementation details from its users

Network Transparency

  • User should not only be free from network management activities rather it should be unaware of even existence of the network
  • Location Transparency and Naming Transparency

Distributed database Management Systems (Distributed DB and DBMS)

Distributed DB and DBMS

Distributed Database: A collection of logically interrelated databases that are spread physically across multiple locations connected by a data communications link.

Main Characteristics

  • Data at multiple sites
  • DM at each site ind.
  • Local requirements
  • Global perspective

Where to apply

  • Major two reasons that make an application a candidate to be DDBS application
  • Large Number of Users
  • Operation spread large geographical area

Example Applications

  • Banking
  • Air Ticketing
  • Business at multiple locations

Distributed DBMS: A software system that permits the management of DDB and makes the distrib. transparent to the users

Decentralized Database: A collection of independent databases on non-networked computers.

Distributed Database Management Systems

Little bit of History

  • Traditional File Processing System: the very first form of business data processing
  • Each program contains data description that it manipulates
  • Redundancy of data
  • Problems in maintenance

image

File Processing Systems

Library

Exam

Registration

Reg_Number

Reg_Number

Reg_Number

Name

Name

Name

Father Name

Address

Father Name

Books Issued

Class

Phone

Fine

Semester

Address

 

Grade

Class

Duplication of Data

Vulnerable to Inconsistency

Database Approach: (Also called centralized database) Database is a shared collection of logically related data

Database Approach

image

  • Takes care of all major drawbacks of File System Environment plus more

Distributed Computing System

  • A number of autonomous processing elements that are connected through a computer network and that cooperate in performing their assigned tasks
  • Distributed System Software enables computers to coordinate and share
  • The thing being distributed?
  1. Processing logic
  2. Functions
  3. Data
  4. Control; All are relevant and important here

Classifications of DCS

  • Degree of Coupling
  1. How closely systems are connected
  2. May be the measured as ratio of messages interchanged to the local processing
  3. Could be Weak (over the network) or Strong (if components are shared)
  • Interconnection structure
  1. Could be point to point or a common interconnection channel
  • Interdependence of Components
  • Synchronization
  • Factors are not totally independent
Why DCS?
  • Suits some of the Organizational Structures; more reliable and responsive
  • Nature of some applications
  • Technological Push

DCS’s Alerts

  • Information Islands and Lack of Standards
  • Difficulties in Large Application Design
  • Too Many Options Available