Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Name : Umar Ali

Roll Number : 522

Class # : BS (CS) – 6th Semester

Assignment # : 03

Submitted to : Sir Tariq

Subject : “CS-512 Distributed


Database”
Q1. Network:
A network consists of two or more computers that are linked in order to
share resources (such as printers and CDs), exchange files, or allow
electronic communications. The computers on a network may be linked
through cables, telephone lines, radio waves, satellites, or infrared light
beams.
Networks can be categorized depending on size, complexity, level of
security, or geographical range. We will discuss some of the most popular
topologies based on geographical spread.

Types of network:
 PAN-
PAN is the acronym for Personal Area Network. PAN is the
interconnection between devices within the range of a person’s private
space, typically within a range of 10 metres. If you have transferred
images or songs from your laptop to mobile or from mobile to your friend’s
mobile using Bluetooth, you have set up and used a personal area
network.
A person can connect her laptop, smart phone, personal digital assistant
and portable printer in a network at home. This network could be fully Wi-
Fi or a combination of wired and wireless.

 LAN-
LAN or Local Area Network is a wired network spread over a single site
like an office, building or manufacturing unit. LAN is set up to when team
members need to share software and hardware resources with each other
but not with the outside world. Typical software resources include official
documents, user manuals, employee handbook, etc. Hardware resources
that can be easily shared over the network include printer, fax machines,
modems, memory space, etc. This decreases infrastructure costs for the
organization drastically.

A LAN may be set up using wired or wireless connections. A LAN that is


completely wireless is called Wireless LAN or WLAN.
 MAN-
MAN is the acronym for Metropolitan Area Network. It is a network spread
over a city, college campus or a small region. MAN is larger than a LAN
and typically spread over several kilometres. Objective of MAN is to share
hardware and software resources, thereby decreasing infrastructure costs.
MAN can be built by connecting several LANs.

The most common example of MAN is cable TV network.


 WAN-
WAN or Wide Area Network is spread over a country or many countries.
WAN is typically a network of many LANs, MANs and WANs. Network is
set up using wired or wireless connections, depending on availability and
reliability.

The most common example of WAN is the Internet.


Q2.
(a) MDBS Architecture:

Distributed dbms Architecture:


Models using a Global Conceptual Schema (GCS):
The GCS is defined by integrating either the external schemas of local
autonomous databases or parts of their local conceptual schemas.If the
heterogeneity exists in the system, then two implementation alternatives
exists unilingual and multilingual.
Models without a Global Conceptual Schema (GCS):
The existence of a global conceptual schema in a multidatabase
system is a controversial issue. There are researchers who even define a
multidatabase management system as one that manages “several
databases without the global schema”.
Distributed DBMS Architecture models using a GCS:

Mdbs Architecture - models using a GCS:


• A unilingual multi-DBMS requires the users to utilize possibly
different data models and languages when both a local database
and the global database are accessed.

• Any application that accesses data from multiple databases must


do so by means of an external view that is defined on the global
conceptual schema.

• One application may have a local external schema (LES) defined


on the local conceptual schema as well as a global external
schema (GES) defined on the global conceptual schema.
• An alternative is multilingual architecture, where the basic
philosophy is to permit each user to access the global database by
means of an external schema, defined using the language of the
user’s local DBMS.
• The multilingual approach obviously makes querying the databases
easier from the user’s perspective. However, it is more complicated
because we must deal with translation of queries at run time.

• The architecture identifies two layers: the local system layer and
the multidatabase layer on top of it.

• The local system layer consists of a number of DBMSs, which


present to the multidatabase layer the part of their local database
they are willing to share with users of the other databases. This
shared data is presented either as the actual local conceptual
schema or as a local external schema definition.

• The multidatabase layer consist of a number of external views,


which are constructed where each view may be defined on one
local conceptual schema or on multiple conceptual schemas. Thus
the responsibility of providing access to multiple databases is
delegated to the mapping between the external schemas and the
local conceptual schemas.
b) Peer to Peer Architecture:
 no always-on server
 arbitrary end systems directly communicate
 peers are intermittently connected and change IP addresses
 example: BitTorrent
Pros and cons:
 scalable
 difficult to manage
 not secure
Peer-To-Peer Distributed Systems:

In the common client-server architecture, multiple clients will


communicate with a central server. A peer-to-peer (P2P) architecture
consists of a decentralized network of peers - nodes that are both clients
and servers. P2P networks distribute the workload between peers, and all
peers contribute and consume resources within the network without the
need for a centralized server. However, not all peers are necessarily equal.
Super peers may have more resources and can contribute more than they
consume. Edge peers do not contribute any resources, they only consume
from the network. In its purest form, P2P architecture is completely
decentralized. However, in application, sometimes there is a central
tracking server layered on top of the P2P network to help peers find each
other and manage the network. Here’s a simple example of small P2P
network.

Applications:
P2P architecture works best when there are lots of active peers in an
active network, so new peers joining the network can easily find other
peers to connect to. If a large number of peers drop out of the network,
there are still enough remaining peers to pick up the slack. If there are only
a few peers, there are less resources available overall. For example, in a
P2P file-sharing application, the more popular a file is, which means that
lots of peers are sharing the file, the faster it can be downloaded. P2P
works best if the workload is split into small chunks that can be
reassembled later. This way, a large number of peers can work
simultaneously on one task and each peer has less work to do. In the case
of P2P file-sharing, a file can be broken down so that a peer can download
many chunks of the file from different peers at the same time.

Some uses of P2P architecture:


● Filesharing
● Instant messaging
● Voice Communica on
● Collabora on
High Performance Computing Some examples of P2P
architecture:
● Napster - it was shut down in 2001 since they used a centralized
tracking server
● BitTorrent - popular P2P file-sharing protocol, usually associated with
piracy
● Skype - it used to use proprietary hybrid P2P protocol, now uses
client-server model after Microsoft’s acquisition
● Bitcoin - P2P cryptocurrency without a central monetary authority

You might also like