You are on page 1of 12

Introduction to computer networks

Computer Network- : A computer network is a collection of interconnected computers and other


devices to share data and other resources (hardware and software resources). A network can
consist of a computer, a fax machine, a printer, a camera, a cell phone, etc. Two computers or
devices are said to be interconnected if they are capable of sharing and exchanging information
with each other by following a protocol (set of rules).

Advantages of Computer Networks


(a) Resource Sharing: The primary use of a network is to share among users programs/
applications, data and peripheral devices connected to the network, irrespective of their physical
location. For example, sharing database, audio and video files, antivirus software, application
software, printers and scanners, etc.

(b) Improved Communication: A computer network enables fast, reliable and secure
communication between users. While working on a network, any change made by one on his
computer can easily be seen by other..

(c) Reduced Communication Cost: Sharing resources also reduces communication cost.
Using public networks, we can send a large quantity of data at a low cost. Internet and mobile
networks are playing a very important role in sending and receiving text, image, audio and video
data at a low cost.

(d) Reliability of Data: Reliability means backing up of data, i.e., data can be copied and
stored on multiple computers. In a network system, all computers are connected to each other.
Thus, the information or message which is shared by each device is stored on their respective
workstations (computers). If, due to some reason (hardware crash, etc.), the data gets corrupted
and, thus, becomes unavailable on one computer, a copy of the same data can be accessed from
another workstation for future use.

(e) Central Storage of Data: Files can be stored on a central node (the file server) that can be
shared and made available to each and every user in an organization. With centralized rocessing,
data is stored and retrieved from a single central location. Thus, there is no duplication of data and
almost no data redundancy.

Terms used in Networking

1. Nodes (Workstations): computers that are attached to a network and are seeking to share
resources.

2. Server:- A computer that facilitates the sharing of data, software and hardware resources on the
network.

3.Network Interface Unit (NIU) (MAC Address):- A network interface unit is an interpreter that
helps in establishing communication between the server and the client.

4.IP Address:- Every machine on a TCP bar/IP Network has a unique identifying number called
an IP Address.

5.Domain Name: It is a way to identify and locate the computers connected to the internet.
It must be unique
TYPES OF NETWORKS
A computer network may be small or big depending upon the number of computers and other
network devices linked together. Thus, networks vary in size, complexity and geographical spread.
On the basis of geographical spread, networks may be classified as:
1. PAN
2. LAN
3. MAN
4. WAN

Personal Area Network (PAN)


The network that belongs to a single person or user is known as PAN. These are small networks
used to establish communication between a computer and other handheld devices in the range of
up to 10 metres using wired USB connectivity or wireless systems like Bluetooth or Infrared.
PANs are used to connect computers, laptops, mobiles and other IT-enabled devices to transfer
files including emails, digital photos, audio and video, etc. The Bluetooth technology implements
PAN. It may include wireless computer keyboard and mouse, Bluetooth-enabled headphones,
wireless printers and TV remotes.

Local Area Network (LAN)

LAN is a privately owned computer network covering a small geographical area (small physical
area), like a home, office or a building such as a school. It can cover an area spread over a few
metres to a radius of a few kilometres. LAN is owned, controlled and managed by a single person
or organization. A LAN can be set up using wired media (UTP cables, coaxial cables, etc.) or
wireless media (Infrared, Radio waves).If a LAN is set up using unguided media, it is known as
WLAN (wireless LAN). The key purpose of a LAN is to share resources. LAN users can share
data, programs, printer, disk, modem, etc.

Metropolitan Area Network (MAN)

MAN is larger than a LAN and can cover a city and its surrounding areas. A MAN usually
interconnects a number of LANs and individual computers. It also shares the computing resources
among users. All types of communication media (guided and unguided) are used to set up a MAN.
A MAN is typically owned and operated by government body or a large corporation. A good
example of MAN is the interconnected offices of a Multinational Corporation (MNC) or cable
television networks available in the whole city.

Wide Area Network (WAN)

It interconnects all the computers across the world. A WAN is a telecommunication network. This
type of network spreads over a large geographical area across countries and continents. WANs are
generally used to interconnect several other types of networks such as LANs, MANs, etc. it helps
fast and efficient exchange of information at high speed and low cost. It uses satellite systems,
telephone lines, etc. A WAN can cover an area with a radius spanning hundreds of kilometres. A
network of ATMs, banks, government offices, international organizations’ offices, etc., spread
over a country, continent or covering many continents are examples of WAN. All types of
communication media (guided and unguided) are used to set up a WAN. The best known example
of a WAN is the internet. The internet is the largest WAN spanning the entire planet.
Differences between LAN, MAN, and WAN
Basis LAN MAN WAN
local area network. metropolitan area wide area network.
network.
Geographic Operates in small areas Operates in large Operates in larger areas
Span such as the same building areas such as a city. such as country or
or campus. continent.
Transmission
speed High speed Moderate speed Low speed
Network Modem ,Switch, Router, Gateway Router, Gateway
devices used Repeater,
Optical fibre,
Technology Radio wave,
used Ethernet, Wi-Fi Microwave Microwave, Satellite

NETWORK DEVICES

Modem: ‘MOdulator DEMolulator’.is an electronic device that enables a computer to transmit


data over telephone lines. It is a device used to convert digital signals into analog signals and vice
versa. There are two types of modems internal modem and external modem.

Hub: It is multi-port and unintelligent network device which simply transfers data from one
port of the network to another. A hub is a hardware device used to connect several computers
together or network device through wires. When the packet reaches one port, it is copied to all
other ports of the hub without changing the destination address in the frame. It can both send as
well as receive information but only one task at a time.

Switch: A switch is a networking device used in LAN. Like a hub, a network switch is used to
connect multiple computers or communicating devices. When data arrives, the switch extracts the
destination address from the data packet and looks it up in a table to see where to send the packet.
Thus it sends signals to only selected devices instead of sending to all. It can forward multiple
packets at the same time.

Repeater: Data are carried in the form of signals over the cable. These signals can travel a
specified distance usually about 100 m. Signals lose their strength beyond this limit and become
weak. In such conditions, original signals need to be regenerated. A repeater is an analog device
that works with signals on the cables to which it is connected. The weakened signal appearing on
the cable is regenerated and put back on the cable by a repeater.

Gateway: A gateway is a device that connects dissimilar networks. In internet, several networks
are communicating with each other and each network has a different configuration. In order to
make reliable communication, there must be a device that helps in communicating.
Gateway is a device which establishes an intelligent connection between a local area network and
external networks with completely different structures.
Router: A router is a network device that can receive the data, analyse it and transmit it to other
networks. A router connects a local area network to the internet. Network device that connects
multiple networks irrespective of their protocol. It can handle different protocols. It forwards data
packets from one connected network to another depending upon their IP address.

Bridge It is a device which is used to connect two local area network or two LAN . the important
things is both the LAN to be connected should follow same protocol. Bridge work with MAC
(Media Access Control) address. It allows to cross only that data which has a valid MAC address
of other side of bridge

An Internet service provider (ISP)-- is any organisation that provides services for accessing the
Internet.

Difference between router and bridge-

1) Bridge cannot handle multiple protocols whereas router can

2) Bridge work with MAC address whereas router works with IP address

NETWORK TOPOLOGIES

Topology is a way of connecting several devices with each other on a network.

Types of Topologies :- five types

Mesh Topology, Star Topology, Bus Topology ,Ring


Topology, Tree Topology

Bus Topology
Each communicating device connects to a transmission
medium, known as bus. Data sent from a node are passed
on to the bus and hence are transmitted to the length of
the bus in both directions. That means data can be
received by any of the nodes connected to the bus. In this
topology, a single backbone wire called bus is shared
among the nodes, which makes it cheaper and easy to
maintain. Both ring and bus topologies are considered to
be less secure and less reliable.

Ring Topology
In ring topology, each node is connected to two other devices, one each
on either side. The nodes connected with each other thus form a ring.
The link in a ring topology is unidirectional. Thus, data can be
transmitted in one direction only clockwise or counterclockwise.

Star topology
In star topology, each communicating device is connected to a central node,
which is a networking device like a hub or a switch.it is considered very
effective, efficient and fast as each device is directly connected with the
central device. Although disturbance in one device will not affect the rest of
the network, any failure in the central networking device may lead to the failure of
complete network.

Tree or Hybrid Topology


It is a hierarchical topology, in which there are multiple branches
and each branch can have one or more basic topologies like star,
ring and bus. Such topologies are usually realised in WANs where
multiple LANs are connected. Those LANs may be in the form of
ring, bus or star. In this type of network, data transmitted from
source first reaches the centralised device and from there the data
passes through every branch where each branch can have link for
more nodes

Mesh Topology
Each device is connected with every other device in the
network . Such a network can handle large amounts of traffic
since multiple nodes can transmit data simultaneously. Also,
such networks are more reliable in the sense that even if a node
gets down, it does not cause any break in the transmission of
data between other nodes. This topology is also more secure
as compared to other topologies because each cable between
two nodes carries different data. Wiring is complex and cabling
cost is high in creating such networks, and there are many
redundant or unutilised connections.

URL-

Also known as a web address, a URL (Uniform Resource Locator) is a form of URI and a
standardized naming convention for addressing documents accessible over the Internet. A location
on net server is called website. Each website has unique address called URL.

Different parts of URL

http://accounts.google.com/abc/file.asp

type://address/path

1) http:// or https://

The "http" stands for Hypertext Transfer Protocol. It let's the browser to know which protocol it is
going to use to access the information specified in the domain. An "https" protocol is short for
"Hypertext Transfer Protocol Secure" and indicates that information transmitted over HTTP is
encrypted and secure. After the http or https is the colon ( : ) and two forward slashes ( // ) that
separate the protocol from the remainder of the URL.

2) www

"www" stands for World Wide Web and is used to distinguish the content. This portion of the
URL is not required and many times can be left out.

3)accounts.google.com
is the domain name for the website. The last portion of the domain is known as the domain suffix.
It is used to identify the type or location of the website. For example, ".com" is short for
commercial, ".org" is short for an organization etc.

4)/abc/

Is the directory where the web page is located on the server

5) file.asp

File.asp is the actual web page on the domain you're viewing. The trailing .asp is the file extension
of the web page that indicates the file is an active server page file.

WWW-

World wide web also known as web. It is an information system where documents and other web
resources are identified by Uniform Resource Locators. It is wide network of internet servers that
supports many protocols. It is example of an information protocol or information service that can
be used to send and receive information over the internet using client server software design. It
supports multimedia information, hyper text information and graphic user interface. A service that
uses client/server design requires two pieces of software to work- client software which is a web
browser – to request information and server software to – answer request and provide their
information.

The resources of the WWW are transferred via the Hypertext Transfer Protocol (HTTP) and may
be accessed by users by a software application called a web browser and are published by a
software application called a web server.

Applications of internet-

The three most important are e-mail, web browsing, and peer-to-peer services . some Applications
of internet are -
• Sending and receiving email.
• Searching and browsing information archives.
• Copying files between computers.
• Conducting financial transactions.
• Navigating (in your car, smart scooter, smart bike, or other)
• Playing interactive games.
• Video and music streaming.
• Chat or voice communication (direct messaging, video conferencing)

VoIP- (voice over Internet Protocol)


Voice over Internet Protocol or VoIP, allows us to have voice call (telephone service) over the
Internet, i.e., the voice transmission over a computer network rather than through the regular
telephone network. It is also known as Internet Telephony or Broadband Telephony. But to avail
the phone service over the Internet, we need to have an Internet connection with reasonably
good speed.

It is the transmission of voice and multimedia content over Internet Protocol (IP) networks.. Skype
is a proprietary VoIP system using its own protocol based on peer-to-peer (P2P) networking. Many
apps for smartphones now use VoIP to make calls, some examples are Whatsapp, FaceBook
Video and Voice Chat and Skype. These are all examples of a hosted VoIP service.

Advantages of VoIP
• Cost savings - with VoIP, you pay only for your internet connection. Calls between
individuals with VoIP equipment - even international calls - are free.
• Rich features - VoIP offers a wide range of features: from call forwarding, blocking, caller
ID and voicemail, to remote management, automatic call distribution and interactive voice
recognition.
• Collaboration - VoIP integrates easily with other systems and helps staff collaborate
through voice, video, web conferencing or instant messaging, usually from a single user interface.

Disadvantages -
• Audio quality - depending on your broadband, hardware and services, quality and
reliability of VoIP connections may not be as good as the standard phone connections. Common
issues that can happen during calls are delays, noise and echo.
• Bandwidth dependency - VoIP depends on your internet connection. insufficient bandwidth
will likely cause quality issues with the service.
• Security - security is a major consideration with VoIP. Possible threats include identity and
service theft, phishing, viruses and malware, spamming over internet telephony, call tempering and
denial of service attacks.

Email

Electronic mail is a method of exchanging messages between people using electronic devices.
email systems are based on a store-and-forward model. Email servers accept, forward, deliver, and
store messages. Neither the users nor their computers are required to be online simultaneously;
they need to connect, typically to a mail server or a webmail interface to send or receive messages
or download it.

Chat-
Online chat may refer to any kind of communication over the Internet that offers a real-time
transmission of text messages from sender to receiver. Chat messages are short in order to enable
other participants to respond quickly. Thereby, a feeling similar to a spoken conversation is
created, which distinguishes chatting from other text-based online communication forms such as
email. Online chat may address point-to-point communications as well as multicast
communications from one sender to many receivers and voice and video chat.

Website
A website is a collection of several web pages which are related to each other through hyperlinks.
It is a collection of various web pages, images, videos, audios that are hosted on one or several
web servers. The first page of a website is known as home page where all the links related to other
documents are displayed. The web pages of a website are written using HTML and the information
is transferred over the internet through HTTP protocol. The HTML documents consist of several
hyperlinks that are accessed through HTTP protocol. cbse.nic.in, google.com, amazon.in, etc

Web Page
A web page is an electronic document/page designed using HTML. It displays information in
textual or graphical form. Traversal from one web page to another web page is possible through
hyperlinks. A web page can be classified into two types:
Static web page: A web page which displays same kind of information whenever a user visits it
is known as a static web page. A static web page generally has .htm or .html as extension.
Dynamic web page: An interactive web page is a dynamic web page. A dynamic web page uses
scripting languages to display changing content on the web page. Such a page generally has .php,
.asp, or .jsp as extension.

Web Browser

A browser is a software application that helps us to view the web page(s). In other words, it helps
us to view the data or information that is retrieved from various web servers on the Internet. Some
of the commonly used web browsers are Google Chrome, Internet Explorer, Mozilla Firefox,
Opera, Apple Safari, Microsoft Edge etc. A web browser essentially displays the HTML
documents which may include text, images, audio, video and hyperlinks that help to navigate from
one web page to another. Mosaic was the first web browser developed by the National Centre for
Supercomputing Application (NCSA).

Web Server
A web server is a server that stores web pages and when a web client is sending any request to a
server, a server responds to the request and displays the requested web pages. A web server is a
program that runs on a computer connected to the internet. Web server waits for a request, finds
the documents and generates information, if required, and sends back to the browser that requested
for it. A single web server may support multiple websites, or a single website may be hosted on
several linked or mirrored web servers. Some popular web servers are: Apache web server,
Netscape enterprise web server, Microsoft internet information server, etc. A web server stores
web documents and responds to the requests made by web browsers.

Web Hosting

Web hosting is a service which is provided by companies to its clients to allow them to construct
their own websites which are accessible to the internet users via World Wide Web. Such
companies are known as web host. These companies provide space on a web server they own for
use by their clients as well as provide internet connectivity. The websites which are constructed
display information for their organization in the form of web pages. The host may also provide an
interface or control panel for managing the web server so as to add news and events related to their
organization or for uploading some information which may be valuable for the internet users. A
client can also use control panel for installing scripts as well as other modules and service
applications like email. webhostingsitesindia.co.in is one of the top domain name registration and
web hosting companies in India. It is the only hosting company which provides support in regional
languages. Web hosting is a service that is provided by the company to users to create web-based
applications.
A web server whether it is a local server or a cloud server when connected to the Internet is
assigned a unique numeric address on the Internet called IP address. This IP address needs to be
mapped to a textual name called domain name of the website. This is because it is not convenient
for users to remember a numeric IP address. Thus, for accessing a website, the user enters the
domain through a browser (URL). The domain name has to be registered (purchased) with an
authorised agency.

Add-Ons and Plug-ins


Add-ons and plug-ins are the tools that help to extend and modify the functionality of the browser.
Both the tools boost the performance of the browser, but are different from each other. A plug-in is
a software that is installed on the host computer and can be used by the browser for multiple task
and can even be used by other applications as well. A plug-in is a complete program eg, Flash and
Java are plug-ins. A Flash player is required to play a video in the browser.
An add-on is not a complete program and is used to add only a particular functionality to the
browser. An add-on is also referred to as extension in some browsers. Adding the functionality of a
sound and graphics card is an example of an add-on.
To add an extension, click the Options button on the top right corner of the browser and select the
Addons option. Click the Extensions then Manage your Extensions will appear. There will be a list
of enabled, disabled and recommended extensions. Make the desired selections and close the add-
ons window. Similarly, to add plug-ins, click Plug-ins options on the left side of the browser
window. Make the desired selections to enable or disable the required plug-ins.

Browser Settings
Every web browser has got certain settings that define the manner in which the browser will
behave. These settings may be with respect to privacy, search engine preferences, download
options, auto signature, autofill and autocomplete feature, theme and much more. Each browser
application allows us to change or customize its settings in a user friendly manner. Mozilla Firefox
is an open source web browser which is available free of cost and can be easily downloaded
from the Internet.
Open Mozilla Firefox, and on the top right corner of the browser window, click the Menu button.
From the drop down button, select Options. The preferences and Options window will be
displayed in the browser. On the left side, there are multiple Panels to choose from: General,
Home, Search, Privacy and Security and Sync.
General Panel: Some of the options that the panel contains are as follows:
• setting the default browser
• language and appearance of text
• downloading files and applications
• firefox update settings
• browsing and network settings
Home Panel: This panel contains options to set the home page of the browser, browser window
and tab settings.
Search Panel: This panel contains options to edit the settings of the search engine used by Firefox.
Privacy and Security Panel: This panel contains options to secure the browser and data. It has
• enhanced tracking protection
• forms and passwords
• history and address bar
• cookies and site data
• permission to view pop ups windows and install addons

Sync Panel: This panel contains options to set up and manage a Firefox account which is needed
to access all services given by Mozilla. Make the desired settings and close the browser settings
window. The changes made in the browser settings will be applied.
***********

Question on group by

Emp table.

E_ID, NAME ,| HIRE_DATE , JOB_ID, SALARY , MANAGER_ID, DEPT_ID


Jobid, manager id, dept id fields have common values

1. Write a query to list the number of jobs available in the employees table.
SELECT COUNT(DISTINCT job_id)
FROM employees;

2. Write a query to get the total salaries payable to employees


SELECT SUM(salary)
FROM employees;

3. Write a query to get the minimum salary from employees table


SELECT Min(salary)
FROM employees

4. Write a query to get the maximum salary of an employee working as a Programmer


SELECT MAX(salary)
FROM employees
WHERE job_id = 'IT_PROG';
5. Write a query to get the average salary and number of employees working the department
90
SELECT AVG(salary),count(*)
FROM employees
WHERE department_id = 90;

6. Write a query to get the highest, lowest, sum, and average salary of all employees
SELECT MAX(salary), MIN(salary), SUM(salary), AVG(salary)
FROM employees;

7. Write a query to get the number of employees with the same job
SELECT job_id, COUNT(*)
FROM employees
GROUP BY job_id;

8. Write a query to get the difference between the highest and lowest salaries
SELECT MAX(salary) - MIN(salary) DIFFERENCE
FROM employees;

9 . Write a query to get the department ID and the total salary payable in each department

SELECT department_id, SUM(salary)


FROM employees
GROUP BY department_id;

10. Write a query to get the average salary for each job ID excluding programmer

SELECT job_id, AVG(salary)


FROM employees
WHERE job_id <> 'IT_PROG'
GROUP BY job_id;

11. Write a query to get the total salary, maximum, minimum, average salary of employees (job ID
wise), for department ID 90 only

SELECT job_id, SUM(salary), AVG(salary), MAX(salary), MIN(salary)


FROM employees
WHERE department_id = '90'
GROUP BY job_id;

12. Write a query to get the job ID and maximum salary of the employees where maximum salary
is greater than or equal to $4000

SELECT job_id, MAX(salary)


FROM employees
GROUP BY job_id
HAVING MAX(salary) >=4000;

13. Write a query to get the average salary for all departments employing more than 10 employees

SELECT department_id, AVG(salary), COUNT(*)


FROM employees
GROUP BY department_id
HAVING COUNT(*) > 10

You might also like