0% found this document useful (0 votes)
16 views10 pages

BRIEF OF SQL AND NETWORKS

Uploaded by

vk5406298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views10 pages

BRIEF OF SQL AND NETWORKS

Uploaded by

vk5406298
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

UNIT-2 [25 Marks] 1M 2M 3M 4M 5M Total

Database Query using SQL 6 4 6 4 5 25 M

What is Database?
A database is an organized collection of interrelated data stored together to serve applications. It work like a
container which may contains various database objects.
Most of the databases store data in the form of Relations (also called Tables). Such Databases are known as
Relational Database: A Software used to store and manage Relational database is called RDBMS (Relational
Database Management System).
Example of RDBMS software: Oracle, MySQL, MS SQL Server, SyBase and Ingress etc.
Advantages of using Database:
 Database reduces Redundancy: Removes duplicity of data because data are kept at one place.
 Database controls Inconsistency: Data updation maintains consistency and unambiguity.
 Database facilitates Sharing of Data: The data stored in the database can be shared among several users.
 Database ensures Security: Data are protected against disclosure to unauthorized users.
 Database maintains Integrity: DBMS enforces integrity rules to insure the validity or correctness of data.
Relational Data Model:
Data model describes ‘How data is organized or stored’ in the database. A Database can be categorized in various
models as per organization of records like Relational Data Model, Network Data Model, Hierarchical Data Model
and Object Oriented Data Model.
Relational Data Model: In Relational model, data is organized in the form of Relation or Table consisting rows and
columns. This model is mostly used by RDBMS software.
Relation: A Relation or Table is Two-Dimensional structure containing in Rows and Columns. It has the following
properties-
 Column homogeneous- All values in a column are of same data type.
 Unique columns- Each column assigned a unique name and must have atomic (indivisible) value.
 Unique rows- All rows of a relation are distinct i.e. no two identical records can exist in the Relation (Table).
Tuple/Entity/ Record: A Row of a table is called Tuple or Record.
Attribute/ Field: A column of a table is called Attribute or Field.
Domain: It is collection (set) of possible values from which the value for a column is derived.
Degree: Number of columns (attributes) in a table.
Cardinality: Number of Records in a table.
Concept of Keys:
A table may have several columns and some column or combination of columns which can identifies a record in
the table uniquely. Such column(s) are called Key of the Table. Keys can be categorized in following types.
Primary Key: A column or group of Column, which uniquely identify a Record/Tuple in a Table is called Primary
Key. The Primary key cannot have null or duplicate values. A table can have only ONE primary key. Example:
Vehicle Number, Enrolment number, Admission No, Roll No,PNR Number , Aadhaar , PAN No. etc.
Candidate Key: A Table may have multiple keys having candidature to work as primary key. Collection of all such
key-columns is called candidate keys. Note that Primary key is one of the candidate key.
Alternate Key: All candidate key other than Primary key are called Alternate key (Secondary Key) because they
can be used as an alternative to Primary key.
Foreign Key: is a non-key attribute, which establish a relation with another table. Mostly it is common column in
two tables and works as primary key of another table.
Consider the following tables and their columns:
EMPLOYEE (EmpNo, Name, Designation, City, AadharNo, DeptNo)
DEPARTMENT (DeptNo, Dname, HODName)
Candidate Keys of EMPLOYEE Table : (EmpNo, AadharNo)
Primary Key of EMPLOYEE Table- EmpNo & Primary Key of DEPARTMENT Table- DeptNo
Foreign Key of EMPLOYEE Table- DeptNo. (because it is common to both table and is primary key in Department
Table)
MySQL:
MySQL is an open source Relational Database Management System (RDBMS) software based on SQL. The main
features of MySQL are –
Quick Revision Material: Class XII - Informatics Practices (2024-25) Page: 11 of 25
 Open Source & Free: It is Open Source and available free of cost.
 Portability: It can be installed and run on any types of Hardware and OS like Linux, MS Windows or Mac etc.
 Security: It offers security and authorization feature to keep database secure.
 Connectivity: The MySQL database can be connected with Programming Languages like Python, Java etc.
 Query Language: It uses SQL (Structured Query Language), which is standardized by ANSI.
Types of SQL (MySQL) Commands:
SQL commands may categorised into two category as their usage:
DDL (Data Definition Language): Commands to define structure of data i.e. Database and Table.
DML (Data Manipulation Language): Commands to process records stored in the table.
DDL Commands (Works with Table/Database) DML Commands (Works with Records)
CREATE Creates Database and Tables SELECT Displays records from the table.
ALTER Modifies structure of Table INSERT Insert records in the table
DROP Deletes Database and Table DELETE Deletes records from the table
UPDATE Modifies values of existing records.
Apart from these commands, MySql the following miscellaneous commands –
SHOW DATABASES: Displays list of Databases available.
SHOW TABLES: Displays list of tables stored in currently opened database.
USE <Database Name>: Opens a database for working. Example : USE EMPLOYEE
DESCRIBE <Table>: Display structure of table. Example – DESCRIBE Student
Data Types in MySQL:
A column of the Table stores same type of values as defined while creating a table. Commonly used MySQL data
types for a column are-
INTEGER (Size)/INT (size) : Stores numbers without decimal upto given size.
DECIMAL (M, D)/NUMERIC (M, D)/FLOAT (M,D) : Numbers with decimal points upto M size and D decimal places.
Ex: Decimal (8,2) will store like 123456.78
CHAR (size): Stores string/text upto given size. Maximum size is 255 and default is 1, if size not given.
VARCHAR (size): Stores variable size string upto given size. Maximum size is 65535.
DATE: Stores date string in YYYY-MM-DD format.
TIME: Store time string in HH:MM:SS format.
Note: All values must be enclosed in single or double quotes except Integer and Decimal numbers.
Working with DDL Commands
Creating Database and Table:
CREATE DATABASE <Data base Name>
CREATE TABLE < Table Name> (<Col name1><data type>[(size)] [Constraints],….);
Constraints:
Constraints are the rules, condition or checks applicable to a column or table which ensures the integrity or
validity of data. The commonly used constraints are-
Constraints Purpose
NOT NULL Ensures that a column cannot have NULL value.
UNIQUE Ensures that all values in a column are different.
DEFAULT Provides a default value for a column, when nothing is given.
CHECK Ensures that all values in a column should satisfy certain condition.
PRIMARY KEY Defines Primary Key of the Table that can identify a row uniquely.
FOREIGN KEY Defines Foreign key which makes a relation with any other table to ensure Referential
Integrity of the data.
Note: Constraints are optional. A table may have multiple Unique constraints but only one Primary Key.
Creating Database and table. Creating table with constraints.
CREATE DATABASE SCHOOL; CREATE TABLE Student
USE SCHOOL; (StCode char(3) NOT NULL PRIMARY KEY,
CREATE TABLE Employee Stname char(20) NOT NULL,
(Code char(3), StAdd varchar(40),
EmpName char(20), AdmNo char(5) UNIQUE,
City varchar(40), StSex char(1) DEFAULT ‘M’,
Pay Numeric(8,2)); StAge integer CHECK (StAge>=5) );

Quick Revision Material: Class XII - Informatics Practices (2024-25) Page: 12 of 25


Modifying Structure of Table: Adding new column -
We can alter (modify) the structure of existing ALTER TABLE Student ADD (TelNo Integer);
table by the using ALTER TABLE Command. With ALTER TABLE Student ADD (Code int(3) Primary Key);
ALTER TABLE Command, we can- Modifying Existing Column :
 Add a new Column or Constraints ALTER TABLE Student MODIFY Name VARCHAR(40);
 Modifying existing column (data type, size etc.) Deleting Column:
ALTER TABLE Student DROP TelNo;
 Delete an existing column or Constraints
Renaming Column Name:
 Rename Column Name
ALTER TABLE EMP CHANGE ENAME EMPNAME
ALTER TABLE <Table Name> CHAR(40); OR
ADD | MODIFY | DROP | CHANGE <Column ALTER TABLE EMP RENAME ENAME EMPNAME;
Definition(s)>
Deleting Database and Table: DROP DATABASE School;
DROP DATABASE <Data base Name> DROP TABLE Student;
DROP TABLE <Table Name>
Working with DML commands
Inserting Records: Suppose a Table STUDENT (Code, Name, Fname, DOB, Class)
You can insert record in the table by using by using is created. The following command will insert a record.
the following DML command. INSERT INTO Student VALUES
INSERT INTO <Table Name> [<Column list>] (‘s1’,’Amar’, ‘Dhirendra Kumar’,’1985-10-25’, 12);
VALUES <list of values>
INSERT INTO Student VALUES
Note:
 Values to be given as per order of columns. (‘s2’,’Shaan’, NULL,’1972-5-25’, 10);
 ‘Null’ can be used in place of unknown values. INSERT INTO Student (StID, FName, Name, Class)
 You can define order of column with table name VALUES (‘s3’,’Amitabh’, ’Abhishek’, 12);
as per order of values to be inserted.
Deleting Records: DELETE FROM Student ; (All record will be deleted)
DELETE FROM <Table Name> DELETE FROM Student WHERE City=‘Mumbai’ ;
[WHERE <Condition>] DELETE FROM Student WHERE Class >=11 ;
Modifying Records: UPDATE Student SET Class =10 ;
UPDATE <Table> SET <Column> = <Expression> UPDATE Student SET Class=10 WHERE class=9 ;
[WHERE <Condition>] UPDATE Emp SET Sal = Sal+(Sal*10/100)
WHERE Sal <=10000;
UPDATE Emp SET City = ‘Dehradun’ WHERE CITY IS NULL;
Displaying Records:
The SELECT command used to make a request (query) to retrieve stored records from the table.
SELECT < [Distinct | ALL] * | column name(s)> FROM <table(s)> [WHERE <condition> ]
[ORDER BY <column(s)> [ASC | DESC] ] [GROUP BY <column(s)> [HAVING <condition>] ] ;
A condition defined with WHERE clause may have the following Relational and Logical operators:
=, > , < , >=, <=, <>, IS , LIKE, IN, BETWEEN, OR , AND , NOT (!)
Note:
 IS operators is used to compare NULL value (Never use = (equal) with Null.
 BETWEEN operator defines a range of values as lower and upper range (both are inclusive)
 LIKE Operator used to define a condition based on a pattern of string.
Pattern is a search string having the following wild cards-
Percent (% ) - Represents a substring in any length
Under score ( _) - (Represents a single character at used position.)
Example.
● ‘A%’ : Any string starting with ‘A’ character. ● ‘_ _A’ : Any 3 character string ending with ‘A’.
● ‘_B%’ : Any string having second character ‘B’ ● ‘_ _ _’ represents any 3 letter string.
Making Simple Queries Using SELECT Clause:
Displaying all records with columns Using Column Aliases -
SELECT * FROM Student ; SELECT Name, DOB AS ‘Date of Birth’ FROM Student;
Displaying all records with selected columns. Making Expressions:
SELECT Name, City FROM Student ; SELECT 4*3 ;
Displaying unique values in a column SELECT Name, Sal*12 FROM EMP;
SELECT DISTINCT City FROM Student ; SELECT Name, Sal*12 AS ‘Annual Salary’ FROM EMP;
Quick Revision Material: Class XII - Informatics Practices (2024-25) Page: 13 of 25
Displaying Selected Records- WHERE Searching NULL Values – IS Operator
SELECT * FROM Student WHERE City=‘Mumbai’; SELECT * FROM Student
SELECT Name, City from Student WHERE City IS NULL ;
WHERE City <> ‘Mumbai’ AND Class>10; SELECT * FROM Student
SELECT * FROM Emp WHERE Sal >10000 OR Job =‘Manager’; WHERE City IS NOT NULL;
SELECT * FROM Student WHERE NOT Grade=‘A’;
Specifying Range of Values – BETWEEN Operator Specifying List of values– IN Operator
SELECT * FROM Emp WHERE Sal BETWEEN 5000 SELECT * FROM Emp
AND 10000; WHERE Sal IN (5000, 10000) ;
[Same as SELECT * FROM Emp WHERE Sal >= 5000 [Same as SELECT * FROM Emp WHERE Sal = 5000 OR
AND Sal<=10000 ;] Sal =10000 ; ]
SELECT * FROM Emp WHERE NOT Sal BETWEEN SELECT * FROM Student WHERE City IN (‘Mumbai’,
5000 AND 10000 ; ‘Delhi’,’Kanpur’) ;
Specifying Pattern of string- Ordering result of query – Order By Clause:
SELECT * FROM Student WHERE Name LIKE ‘A%’; SELECT * FROM Student Order By City;
SELECT * FROM Student WHERE Name LIKE ‘%Singh%’; SELECT * FROM Student Order By City DESC;
SELECT Name, City FROM Student WHERE Class>=9 SELECT * FROM Student
AND Name LIKE ‘%Kumar%’ ; WHERE City=”Prayagraj” Order By Name;
Functions in MySQL:
A function is a special types of command in MySQL that performs some operation on table and returns a single
value as a result. MySQL functions may be divided in the following categories-
 Math or Numeric Functions ( works on numeric columns and numeric data)
 Text or String Functions (works on string data or text columns)
 Date & Time Function (works on date and time data or columns)
 Aggregate Functions (works on numeric/Text columns vertically and also called Multi Row function)
Numeric Functions: SELECT MOD(5,2) ;  1
MOD(N,M) Returns remainder of N divide by M SELECT POW(5,2) ;  25
POWER(N,M) Returns N to the power M( N ) M SELECT ROUND(‘212.567’,1 ) ;  212.6
POW(N,M) Select ROUND(15.193,1);  15.2
ROUND (N [,M]) Returns a number rounded off up to M Select ROUND(15.193);  15
place. If M is -1, it rounds nearest 10. Select ROUND (355.35,-1)  360
If M is not given, the N is rounded to the Select ROUND (124.35,-1)  120
nearest Integer. Select ROUND (355.35,-2)  400
TRUNCATE(N,M) Returns number after truncating M SELECT TRUNCATE(‘212.567’,1 ) ; 212.5
decimal places. SELECT ROUND(PAY,2) FROM EMP;
SQRT (N) Returns square root of N SELECT TRUNCATE(PRICE*QTY,2) FROM ITEMS;
String Functions: SELECT LENGTH(‘abcd’ ) ;  4
LENGTH(str) Returns the length of given string SELECT LENGTH(Name) FROM Student;
LOWER(str)/ Returns given string in lower case. SELECT LOWER(‘ABcD’ ) ;  abcd
LCASE(str) SELECT LOWER(Name) FROM Student;
UPPER(str)/ Returns given String in upper case SELECT UPPER(‘abcD’ ) ;  ABCD
UCASE(str) SELECT UPPER(Name) FROM Student;
LTRIM(str) Removes Leading/Trailing/both SELECT LTRIM(‘ abcd’ ) ;  abcd
RTRIM(str) spaces from given string. SELECT LTRIM(Name) FROM Student;
TRIM(str) SELECT RTRIM(‘abcd ’ );  abcd
LEFT(str, N) Returns the (N) characters from SELECT TRIM(‘ abcd ’ ) ;  abcd
RIGHT(str,N) left/right from the given string. SELECT SUBSTR(‘MY COMPUTER’, 4,3’ )  COM
SUBSTR(str,P,[N]) Returns the substring for given SELECT LEFT(‘MYSQL’, 2 )  MY
MID (str,P,N) position (P) and (N) characters. If N SELECT LEFT( Name, 4) FROM Student;
is (-ve) then backward position SELECT RIGHT(‘MYSQL’, 3 )  SQL
counted. SELECT MID(‘COMPUTER’, 4,3 )  PUT
INSTR(str1,str2) Returns the index of first SELECT MID (Name, 4,3) FROM Student;
occurrence of str2 in str1. SELECT SUBSTR(‘ABCDEFG’ , -5, 4) ;  CDEF
SELECT SUBSTR(‘ABCDEFG’ , 3) ;  CDEFG
SELECT INSTR(‘CORPORATE’, ‘OR’);  2

Quick Revision Material: Class XII - Informatics Practices (2024-25) Page: 14 of 25


Date & Time Functions: SELECT CURDATE() ;  2024-10-31
CURDATE() Returns the current date in YYYY- SELECT CURDATE()+10;  2024-11-10
CURRENT_DATE() MM-DD format. SELECT NOW() ;
NOW() Returns the current date & Time as SELECT DATE(‘2008-12-31 01:02:03’) ;
YYYY-MM-DD HH:MM:SS  2008-12-32
DATE() Returns the date part of a date- SELECT YEAR(‘2008-12-31’) ;  2008
time expression. SELECT YAER(DOB) FROM Student;
SELECT MONTH(‘2008-12-31’) ;  12
DAY(), MONTH() Returns the Day/Month/Year from
SELECT * From Emp Where MONTH( DOB)=10;
YEAR() given date or date type column.
SELECT * FROM Student Where DAY( DOB)=15;
DAYNAME() Returns the name of the weekday SELECT DAYOFWEEK(‘2008-12-31’) ; 1
DAYOFMONTH() Returns the day of month (1-31). SELECT DAYOFYAER(‘2010-02-05’) ; 36
DAYOFWEEK() Returns the day of week (1-7).
DAYOFYEAR() Returns the day of year (1-366).
Aggregate Functions: SELECT SUM (Sal) FROM Emp;
SUM() Returns the sum of given column. SELECT SUM(Sal) FROM Emo WHERE
MIN() Returns the minimum value in the column. City=‘Guwahati’;
MAX() Returns the maximum value in the column. SELECT MAX (Sal) FROM Emp;
AVG() Returns the Average value of the given column. SELECT MAX(Sal) FROM Emp WHERE
City=‘Jaipur’;
COUNT() Returns the total number of NOT NULL values in
SELECT AVG (Sal) FROM Emp;
the column/ number of records.
SELECT COUNT (Name) FROM Emp;
Note: SELECT COUNT (*) FROM Emp;
 Aggregate functions works on whole column (vertically) SELECT COUNT(*) FROM Emp
and ignores NULL values. WHERE City=‘Jaipur’;
 Never use Aggregate functions with WHERE clause. Note: Count(*) gives number of records.
Grouping Records - GROUP BY Clause Select Sum (Sal) from EMP where
Some time it is required to apply a Select query on a group of City=‘Kanpur’;
records instead of whole table. Select Min (Sal) from EMP Group By City;
GROUP BY <column> [HAVING <Condition>] clause with Select Select Job, Sum(Sal) from EMP Group By Job;
command makes groups. A group column is chosen which have Select AVG(Sal) from EMP Group By City;
non-distinct (repeating) values like City, Job etc. Select Count(*) from EMP Group By City;
Condition may be applied on Groups with HAVING. Generally, Select Job, Sum(Pay) from EMP Group By Job
the Aggregate Functions are applied on groups. HAVING Avg(Pay)>=7000;
Tips: A query question containing “wise” or “for each” Select Job, Sum(Pay) from EMP Group By Job
indicates the use of Group By clause with Select. HAVING Count(*)>=5;
Joining two tables (Join Query):
Sometimes it is required to access information from two or more tables, which requires the Joining of tables. A
query in which two or tables are required to join is called Join Query. The following major types of Join can be
implemented on tables –
Cross Join: Each record of Table-11 is joined with each record of Table-2. It is also called Cartesian product. If
Table-1 has 3 columns and 5 records, and Table-2 has 4 columns and 6 records then 5x6=30 records with 3+4=7
columns will be generated as result.
Natural Join: Tables are joined on the equality of common column and common column will be displayed once.
Equi-Join: It is mostly similar to Natural Join where two tables are joined on the equal value of given column but
record contains all column from both tables.
The commonly used method of Joining table is-
SELECT < Column(s)> FROM <Table1, Table 2 > WHERE <Joining Condition> [Order By ..] [Group By ..]
You may add more conditions using AND/OR/NOT operators, if required.
Join condition mostly usage Common Column of both tables and written as-
Table1.Common col=Table2.Common col (You can also use alias (short name) of tables in Join condition.)
Ex. Find out the name of Employees working in Production Deptt.
Select Ename From EMP, DEPT Where Emp.DeptNo=Dept.DeptNo AND Dname=‘Production’;
Ex. Find out the name of Employees working in same city from where they belongs (hometown).
Select Ename From EMP, DEPT Where Emp.DeptNo=Dept.DeptNo And City=Location;
Ex. Find out the name of students enrolled in B.Tech Course.
Select Ename From STUDENT AS S, COURSE AS C Where S.CourseID=C.CourseID and Cname=‘B.Tech’;
Quick Revision Material: Class XII - Informatics Practices (2024-25) Page: 15 of 25
UNIT-3 [10 Marks] 1M 2M 3M 4M 5M Total
Introduction to Computer Networks 3 2 - - 5 10 M

A computer network is a collection of two or more computing devices which are interconnected to share data and
other resources. The Computer network facilitates transfer or exchange of information in the form of text, image,
and audio, video through wired or wireless transmission medium.
A computer Network may include-
 Hosts or Nodes: Devices receives or sends data like computers, laptops, mobiles etc.
 Network devices: Devices manages transfer of data like Switch, Router and Modem etc.
 Transmission Media (wired or wireless): Media which carries data signals like wire or Bluetooth etc.
 Protocol: Set of rules which control the communication.
Advantages of Computer Network:
 Sharing Resources: Network facilitates sharing of hardware and software resources like sharing of data,
programs and printer etc. among users irrespective of their physical location.
 Improved Communication: Computer network enables fast, reliable and secure communication between
users like Sending e-mail, SMS and MMS etc.
 Reduced Communication cost: Sharing resources also reduces its communication cost. Internet and Mobile
network playing very important role in sending and receiving text, image, audio and video data at low cost.
Types of Computer Network:
A network may vary in size, complexity and coverage area. On the basis of coverage of geographical area, data
transfer speed and complexity, a computer network may be classified as:
 LAN (Local Area Network) : LAN connects devices placed in limited geographical area like a single room, a
floor, buildings or campus. LAN usage wires (Ethernet cables) or wireless (Wi-Fi) to connect devices and offers
high speed data transfer rates usually varies from 10-100 Mbps.
 MAN (Metropolitan Area Network): The MAN may connects several LANs and covers a larger geographical
area like a city or a town. Cable TV network or cable based broadband internet services are examples of MAN.
This kind of network may be extended up to 100 km.
 WAN (Wide Area Network): The WAN covers large geographical area like countries and continents. A WAN is
formed by connecting several LANs and MANs. The Internet is the largest WAN that connects billions of
computers, smart phones and millions of LANs from different continents.
 PAN (Personal Area Network): The PANs are small network which connects devices in small proximity up to 10
meters using wired USB connectivity or wireless system like Bluetooth, Infrared , Wi-Fi etc. PAN facilitates
transfer of files like songs, videos, images etc. from one computer, mobile to other.
PAN LAN MAN WAN
Covered Area Approx. 10 mt. Room, Building, May cover a city Country or
complex or campus continents.
Media used Data cable, Ethernet , Coaxial Optical fiber, Radio Microwave and
Infrared/Bluetooth. cable, Wifi etc. wave, Microwave satellite etc.
Network Cable, Dongle LAN card,Hub, MODEM, Router, MODEM, Router,
Devices used Switch, Repeater Gateway Gateway
Transmission Media:
A Transmission medium is a medium of data transfer over a network. The selection of media depends on the cost,
data transfer speed, bandwidth and distance.
Transmission Medium is divided into two major categories:
(A) Wired (Guided) Media:
 Twisted Pair Cable: Twisted pair or Ethernet cable is most common media which consists of four insulated
pairs of wires twisted around each other. It is low-cost, flexible and easy to install cables and can transfer
data upto 100 mts distance. It uses RJ-45 Connector for connecting devices.
 Co-Axial Cable: This cable consists a solid insulated wire surrounded by wire mesh separated by foil or
insulator. Co-axial Cable or Coax, is mostly used in Cable TV transmission and can carry data upto 500 mts.
 Optical Fiber: An optical fiber is a thin, flexible, and transparent strand of glass or plastic that carry light
signals instead of electric current. Signal are transmitted in the form of light emitted from source using
Light Emitting Diode (LED) or LASER beam. Optical fibers offers secure and high speed transmission upto a
long distance.
Quick Revision Material: Class XII - Informatics Practices (2024-25) Page: 16 of 25
(B) Wireless (Unguided) Media:
 Infrared Wave: It used for short-range (approx. 5 mt) communication using wireless signals. It is mostly
used in Remote operated devices like TV, Toys, Cordless phones etc.
 Bluetooth: Bluetooth is a wireless technology for creating personal networks operating within a range of
10 meters.
 Wi-Fi (Wireless Fidelity): Wi-Fi communication is similar to Bluetooth in operation, but it covers a large
coverage (50-200 mts.)
 Radio waves: Radio wave is used to make broadcast network like FM Radio within city. Radio wave
propagates in Omni direction (surrounding) and can penetrate solid walls/buildings etc.
 Microwaves: Microwave are high energy electromagnetic waves propagates in line of sight direction. It is
high speed wave and can cover distance upto 100 km.
 Satellite: Satellite works like a Trans-Receiver Antenna in the space, which receives, regenerates and
redirects signals using Microwave. Services like DTH, VSAT, GPS and Satellite phones etc. are offered by
the satellite.
Network Devices:
Networking devices are equipment that receive or transmit data or signal and make communication channel.
Some common Networking devices are-
 Network Interface Card (NIC): A NIC (Network Interface Card) or LAN Card enables computer to connect with
a network using a RJ-45 port. Each LAN card possess a unique 6 Byte Physical (static) address known as Media
Access Control (MAC) Address, which is used to identifies a device uniquely over the network. WLAN
(Wireless) card is also used for connecting PC/Laptops with Wireless Network.
 Hub: A Hub is a device which connects multiple computers together to form a Local Area Network (LAN). Hub
makes Broadcast type Network and do not manage traffic over the network channel. Nowadays Hub is
obsolete technology and Switch is used in place of Hubs.
 Switch: Switch is similar to Hub that also connects several nodes to form a Network. But Switch is faster than
hub due to better traffic management and control over Network. Switch can also be used to combine various
small network segments to form a big Network.
 Repeater: A Repeater is a device that regenerates the received signals and re-transmits to its destination. In
case of twisted pair cable (Ethernet), signals become weak after 100 meters. So, Repeaters are required at
each 90- 100 meters to maintain signal strength. A Hub or Switch also works as a repeater.
 Router: Router is an inter-networking device which connects multiple Networks to form a big Network. The
basic role of Routers is to determine the best possible route (shortest path) for the data packets to be
transmitted. In a large network (WAN), multiple routers work to facilitate speedy delivery of data packets.
 Gateway: A Gateway device connects dissimilar networks having different protocols. Gateway is also called
protocol converter, since it converts data packets from one protocol to other while connecting two dissimilar
networks. Usually it is implemented by software within a router device.
 MODEM: A MODEM (MOdulator-DEModulator) device connects Telephone line to the Computer. It converts
Digital signal into Analog (Modulation) and Analog to Digital (Demodulation). This conversion is required
because Telephone lines can’t carry digital data. Generally it is used to connect a PC with Telephone lines to
access Internet or make voice call using PC.
Network Topologies:
The layout of interconnection of computers and devices in a network is called Topology.
The selection of topology for a network, depends on Cost of media, Flexibility to add more devices and Reliability
of network (Fault detection in case of Network failure). Some commonly used Topologies are-
Bus Topology:
In the bus topology, all devices are connected to a main or backbone cable. It is simple and oldest topology used
in the early days of computer networking.
Ring Topology:
In a ring topology, all nodes are connected to a main cable making a closed loop (ring). All data packet travel in the
ring in the same direction and passes through each node.
Tree Topology:
Tree topology combines multiple star topology networks together onto a bus (Bus-Star approach). In its simplest
form all connecting devices (hub or switch) are connected to the bus network to make "root" of the network tree.
Quick Revision Material: Class XII - Informatics Practices (2024-25) Page: 17 of 25
Mesh Topology:
In Mesh topology, all devices are directly connected to each other, forming a mesh-like structure. Mesh topology
is most expensive and complex to implement and manage.

Introduction to Internet:
 Internet is a network of networks that consists of millions of private, public, academic, business, and
government networks, that are linked by various wired, wireless, and optical networking technologies.
 The Internet is a global system of interconnected computer networks that use the standard Internet protocol
suite (TCP/IP) to serve billion users worldwide.
 The modern Internet is an extension of ARPANet (Advanced Research Project Agency Network), created in
1969 by the American Department of Defense.
 The Internet carries variety of information resources and services, such as the inter-linked hypertext
documents of the World Wide Web (WWW), communicational infrastructure to support e-mail, chat and
transfer of Text, Images, Audio, Video etc.
Application of Internet:
 World Wide Web (WWW):
Word Wide Web (WWW) or Web is a collection of inter-linked hypertext pages accessed through Web
Browser program using internet. A web page may contains information in form of text, images, audio,
video or Animation. The resources on the web can be shared or accessed through the Internet. The Web
pages (HTML pages) are stored on web server and transferred via the Hypertext Transfer Protocol (HTTP)
using a software application called a web browser.
Tim Berners Lee, a British computer scientist invented the revolutionary World Wide Web in 1990 by
defining three fundamental technologies i.e. HTML, WWW and URL.
 HTML: Hyper Text Markup Language (HTML) is a language which is used to design Web Pages. A web page
is designed using HTML tags like <HEAD>,<BODY> etc. to define the web page layout and organized
contents which to be displayed by the web browser. Webpages are stored as .html or .htm files.
 URL (Uniform Resource Locator) : URL is a unique address of web resources located on the web. It
provides the location and mechanism (protocol) to access the web resource. URL is also called a web
address. A URL contains protocol, subdomain, Domain and name of webpage along with path/directory.

Protocol- Protocols may be http, https, ftp and telnet etc.


Subdomain- Subdomain may be www, blog, and mail etc.
Domain- Domain contains name of website and 3 characters Top level domain (TLD) like .com, .edu, .org,
.net etc. Sometimes country domain (2 letters) also used like .uk, .in, .nz etc.
Path and Web page- last segment of URL may contains location/path and webpage name.
 E-Mail:
Email (electronic mail) is the ways of sending and receiving message(s) using the Internet. The message
can be either text onto the email application or an attached file (text, image, audio, video, etc.). E-mail
address like [email protected] identifies the sender and recipients. Now days Web-based e-mail services are
available at free of cost through various service providers like Google-Gmail, Yahoo- Yahoo mail,
Microsoft-Hotmail & Outlook etc. E-mail service providers may provide extra facilities like filtering spam,
search emails by sender or contents and organizing contacts and email ids, sending email to cc, bcc (blind
carbon copy) recipients etc.
An Email application uses SMTP (Simple Mail Transfer Protocol), IMAP (Internet Mail Access Protocol) and
POP(Post Office Protocol) etc. to handle mails over network.
Quick Revision Material: Class XII - Informatics Practices (2024-25) Page: 18 of 25
 Instant Messaging (Chat):
Instant Messaging (IM) or Chatting over the Internet means communicating to people at different
geographic locations in real time through text message(s). It is similar to e-mail, except that message is
sent immediately to recipient. It facilitates user to type and send messages to make conversation.
Applications such as WhatsApp, Slack, Skype, Yahoo Messenger, Facebook Messenger etc., are examples
of instant messengers. Some applications support sending audio and video along with text chat.
 Voice Over Internet Protocol (VoIP):
Voice over Internet Protocol (VoIP), allows make voice call over the Internet. VoIP offers voice
transmission over a computer network (IP) rather than through regular telephone network. It is also
known as Internet Telephony. Examples of Voip are Whatsapp, Skype, Google Chat etc.
 Video calls and Video Conferencing :
Video Conferencing allows two or more people to make two-way video and audio transmissions. In Video
conferencing, group of people at multiple locations may participate rather than individuals. H.239 is
commonly used protocol for Video conferencing. Google Meet, Microsoft Team, Skype, Zoom or
WhatsApp are most commonly used applications for video conferencing or meeting.
Website:
In general, a website is an organized collection of interlinked web pages related through hyperlinks, stored on a
web server to provide information or service to its visitor.
All the pages of a website are stored under one domain name and have a common theme or template. For
example, the website of CBSE will have all the pages related to syllabus, Circulars, Events, resource materials etc.,
under one domain name and having a common design theme.
A website can be accessed by providing the address of the website (URL) in the browser. The main page of
website (Home/Index page) will be open when it is opened on the browser.
Web Page:
A web page is a HTML document on the WWW that can be viewed through web browser. To make web pages
more attractive, various styling CSS (Cascaded Style Sheet) and formatting are applied on a web page. Further,
program codes (scripts) may also be used to make webpage interactive and define different actions and behavior.
JavaScript, PHP and Python are commonly used script language.
A web page is usually a part of a website and may contain information in the forms of texts, images, audio and
video etc. Depending on the functionality and features, a web page may be classified as-
Static Web Page:
A static webpage is one who’s content always remains static, i.e., does not change for person, location or device.
Static web pages are generally written in HTML or CSS and have the extension .htm or .html.
Dynamic Web Page:
A dynamic web page is one in which the content of the web page can be different for different users according to
language, location or device. The dynamic are more complex in design and take more time to load than static web
pages. Dynamic web pages can be created using script languages such as JavaScript, PHP, ASP.NET, Python etc.
Web pages displaying the date, time, weather report, multi-lingual pages or auto resizing webpage as per screen
size of the client device are Dynamic web page.
Static V/s Dynamic Web Page
Static Webpage Dynamic Web page
The static web pages display the same content The dynamic Web page changes its appearance or
each time, irrespective of location or device. contents according to user, location or device.
It takes less time to display on browser at client Dynamic web pages take more time while displaying on
end. browser.
These are simple in layout and style and no Mostly database is used at server-end to store contents
Database is used. and style information.
Mostly designed through HTML and stored as Designed in Script language like Java Script, ASP.Net,
.htm or .html format PHP etc. and stored as .php,.asp etc.
Web Server:
A web server stores and delivers the contents of a website to web clients (browser) when requested.
A web server as a computer, stores Web server Application software and a website's contents (HTML pages,
images, CSS style sheets, and Script files).
Web server as a software, is a specialized program that understands URLs and requests from browsers, and
Quick Revision Material: Class XII - Informatics Practices (2024-25) Page: 19 of 25
responds to those requests.
Each web server is assigned a unique domain name, so that it can be accessed from anywhere using Internet. The
web browser from the client computer sends a HTTP request for a page and web server then accepts request,
interprets, searches and responds (HTTP response) against request of the web browser. The requested web page
is then displayed in the browser of the client. If the requested web page is not found, web server generates “Error:
404 Not found” as a response.
Web Hosting:
Web hosting is a service that enables you to publish website on the Internet. Once a website is created, it should
be placed on web server for global access.
For webhosting, we need storage/space on a web server where all the files (webpage) and necessary data can be
stored. Mostly Web Server services (CPU, RAM, and storage etc.) are taken on rent basis from the cloud service
providers and web developer hosts website on server by uploading the files constituting the website (HTML, CSS,
JavaScript, images, databases, etc.). These services are usually paid and resources can be increased or decreased
as per requirement.
All web servers are assigned a unique numeric address called IP address when connected to the Internet. This IP
address needs to be mapped to domain name (Website name/URL) of the website using DNS (Domain Name
Service). The domain name can be registered (purchased) through an authorized agency i.e. Registrar Domain
Names.
Web Browser:
A Web browser is a software application that helps us to view the web page(s) from web server to any client
device. Some commonly used web browsers are Google Chrome, Internet Explorer, Mozilla Firefox, Opera, 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.
The modern browsers allow a wide range of visual effects, use encryption for advanced security and also have
cookies that can store the browser settings and data.
Every web browser offers certain settings that define the manner in which the browser will behave. These settings
may be related to privacy, search engine preferences, download options, auto fill and autocomplete feature,
theme and much more. Each browser application allows customization of its settings through setting options.
Add-ons and Plug-ins:
Add-ons and plug-ins are the tools that help to extend the functionality of the web browser.
An add-on is also called extension in some browsers and is used to add a particular functionality to the browser
like playing sound or graphics is an example of an add-on. Mostly these Add-ons are provided as Extensions
through a library provided by the Web Browser which can be installed from the browsers setting options.
A plug-in is a complete program or third-party software which offers some extra functionality to users. For
example, Flash players and Java are plug-ins etc. A Flash player is required to play a video in the browser. A plug-in
is a software that is installed on the host computer and can be used by the browser for multiple functionalities
and can even be used by other applications as well.
Cookies:
A cookie is a small text file, which is transferred by the webserver to the browser while surfing a website. The
information stored in cookies are related to user, pages were visited, choices and menu(s) settings on a particular
website. It helps in customizing the web pages like language, auto-login information, preferences and sometimes
remembering the shopping preference and displaying advertisements of interest, etc.
Cookies are usually harmless and they can’t access information from the hard disk or transmit virus or malware.
However, cookies may be privacy threats. Sometimes viruses can also be tricked as cookies and cause harm to a
computer system. Cookies can be disable by changing the Privacy and Security settings of the browser.

Quick Revision Material: Class XII - Informatics Practices (2024-25) Page: 20 of 25

You might also like