Computer sem 5
Computer sem 5
THEORY NOTES
1. COMPONENTS OF DATA COMMUNICATION
A data communications system has five components:
Message: The message is the data to be communicated. It can be text, numbers, pictures, audio and video.
Sender: The sender is the device that sends the data message. It can be a computer, telephone handset, video
camera and so on.
Receiver: The receiver is the device that receives the message. It can be a computer, telephone handset, video
camera and so on.
Transmission medium: The transmission medium is the physical path by which a message travels from sender to
receiver. Some examples of transmission media include twisted-pair wire, coaxial cable, fiber-optic cable, radio
waves and so on.
Protocol: A protocol is a set of rules for two devices to communicate. Communication is not possible without a
protocol.
2. NETWORK
Network is a group of computers and other devices, such as printers and scanners, connected by a communications link,
enabling all the devices to interact with each other and share applications, data and hardware components. Networks
can be small or large, permanently connected through wires or cables, or temporarily connected through phone lines or
wireless transmissions. The largest network is the Internet, which is a worldwide group of networks.
TYPES OF NETWORK
LAN (Local Area Network)
It is a small network of connected computers, where in computers are connected to each other physically with
the help of wire or cable. (Though now-a-days there are wireless LANS, they come under WIRELESS NETWORK
(WLAN) and not LAN.)
Each computer may work with peripheral devices such as printer, data storage devices.
Connected computers must be within certain radius limit; generally, one kilometer. In other words, LAN is
confined to a small area.
In LAN at least one computer is designed as file server. In some LAN file server is referred to as network drivers.
The microcomputers managed by the file server are called as workstations or nodes.
In LAN resources such as printers, data storage devices, software etc. can be shared.
The file server manages the communication and sharing of peripheral devices.
If required, LAN can contain more than one file server.
Data transfer speed is measured in mega-bytes per second (MBPS) (10 MBPS or so).
Two or more LANS can be connected to each other with the help of Bridges or Gateways.
LAN is generally owned by an organisation. (Privately Owned)
Star Network
This structure/ topology is commonly used.
It consists of a centralised computer system from which the various communication channels originate.
Each Terminal/ Computer can communicate only with the central computer system.
If the terminals want to transfer data among themselves, it can be done only by sending the data to the central
computer system which in turn sends them to the destination.
This structure is appropriate for organisation that requires a centralised data base on centralised data
processing facility.
Advantages
Easy to add/remove nodes.
A node failure does not bring down entire network.
It is easier to diagnose network problems through a central computer.
Disadvantages
Failure of central computer (server) will bring down entire network.
As every node requires new cable; the cable cost is more.
Ring/Loop Network
It was commonly used network structure for LAN.
It is an extension of bus network where last computer is connected with the first.
In this topology the network cable passes from one node to another until all nodes are connected in a form of a
ring.
There is direct point to point link between two neighbouring nodes.
The links are unidirectional which ensures that transmission by node travels the whole ring and comes back to
the node, which made request for the transmission.
Data is transmitted using Token Ring
Advantages
Less cable cost.
Ring network are easily extendable.
Disadvantages
Failure of any node / Sever/ Cable will damage whole network.
Data has to travel through every computer through transmission line.
Relatively expensive and difficult to install.
Fiber-optic cable: It is a thin thread of glass that transmits lively beams of light rather than electric current. Fiber-optic
cable can carry data at a higher speed. Fiber-optic cable is immune to the electromagnetic interference. Normally in
fiber optic cable light moves only in one direction (single mode). For two-way communication (Multi-mode) to take place
a second connection must be made. Now-a-days it can support speed of more than 2 Gbps. Fiber-optic cables are used
for MAN. It is difficult to install and very expensive.
5. NETWORK HARDWARE
Modem
The term modem is derived from 2 terms Modulator & Demodulator.
Modulator means converting digital signals into analog signals & Demodulator means converting Analog signals
into digital signals.
On sending computer Modem works as modulator whereas on the receiving computer Modem works as a
demodulator.
Modem is capable of doing both but it will work as a modulator or demodulator depending on where you are
using a Modem.
Modem is required if data is transferred over a telecommunication line.
Modem can be either internal/external.
Diagram for Data communication between Computerl (CI) and Computer2 (C2) using telecommunication line will
be as follows:
MAC Address
In computer networking, a Media Access Control address (MAC address) is a unique 48- bit number assigned to
Network Interface Card (NIC) to identify it on a LAN.
Because they are so long, MAC addresses are usually displayed in hexadecimal.
This address is stored in its hardware, such as the card's read-only memory.
Hubs
Hub is a hardware device that provides a common connection point in LAN.
Hub is connected to Server and each node is connected to the hub by means of simple twisted pair wires.
A simple network device that connects other devices to the network and sends packets to all the devices
connected to it.
Hub contains multiple ports.
Hubs cannot filter data, so data packets are sent to all connected devices.
There are 3 types of Hub viz. Passive Hub, Active Hub and Intelligent Hub.
Switch
Switches are combination of hardware and software devices, which are used to direct messages across a
network.
A network device that connects multiple devices together and filters packets based on their destination with the
connected devices.
Switch can read MAC address therefore, it will transfer data to the correct device's but not to all the connected
devices.
Switches create temporary point to point links between two nodes on a network and send all data along that
link.
Hub/Switch is basically used to create a network.
Basically, Hub and Switch is used for the same purpose but difference is that switch can read MAC address of the
device therefore it will transfer data to correct device's whereas Hub cannot read MAC address of the device
and therefore it will transfer data to all the devices.
Bridge
Bridge is collection of Hardware & Software facilities, which enables devices on one network to communicate
with devices on another, similar Network.
Bridge is a communications processor that connects two Local Area Networks (LANS) working on the same
protocol.
The main task of a bridge computer is to receive and pass data from one LAN to another.
A bridge is a repeater with add on functionality of filtering contents by reading the MAC addresses of source and
destination.
Bridges do not provide management facilities.
Router
A device that receives and analysis packets and then routes them towards their destination.
In some cases, a router will send a packet to another router; in other cases, it will send it directly to its
destination.
Routers are required on Internet to read IP addresses.
If IP-address is of our network then the packet is transferred to our network else the packet is forwarded to next
router on Internet.
Router is used to connect the networks.
6. NETWORK PROTOCOLS
Each network requires protocol, which is set of rules for two devices to communicate
Transmission Control Protocol/Internet Protocol (TCP/IP)
A set of networking protocols widely used on the Internet that provides communications across interconnected
networks of computers with dissimilar hardware architectures and various operating systems. TCP/IP includes standards
for how computers communicate and conventions for connecting networks and routing traffic.
SCTP: System Control Transmission Protocol. Used for Internet telephony and related applications.
UDP: User Datagram Protocol. Used for connectionless TCP/IP transport layer. TCP/IP creates a packet-switching
network. When a message, whether it is a file or just e-mail, is ready to be sent over the Internet, the TCP protocol
breaks it up into small packets. Each packet is then given a header, which contains the destination address. The packets
are then sent individually over the Internet. The IP protocol guides the packets so that they arrive at the proper
destination. Once reached at destination, the TCP resembles the packets into the original message,
7. INTERNET
Website
A website is a digital presence on the internet, accessible through a web browser.
It is built using HTML (Hypertext Markup Language) for content structure and CSS (Cascading Style Sheets) for
presentation and layout.
Comprises interconnected web pages that may include text, images, videos, and other multimedia elements.
Identified by a unique domain name (e.g., www.example.com) that serves as its address on the web.
Website files are hosted on web servers, making the content accessible globally.
Typically includes a navigation system allowing users to move between different pages and sections.
May incorporate interactive elements like forms, buttons, and links to engage users.
Serves a specific purpose, such as providing information, selling products, sharing content, or facilitating
communication.
Ideally designed to be responsive, adapting to different screen sizes for optimal viewing on various devices.
Implementing security measures to protect data and ensure safe user interactions.
E-mail
E-mail, short for electronic mail, is a method of exchanging digital messages over the internet.
Requires users to have an email account, typically provided by email service providers like Gmail, Outlook, or
Yahoo.
Messages are sent to and from specific email addresses, formatted as [email protected].
Comprises a subject line for summarizing the message and a body where users can write the main content.
Allows users to attach files, documents, or media to their emails for sharing additional information.
Organizes emails into folders or labels to manage and categorize messages.
Emails are stored in the inbox when received and in the sent items when sent, creating a record of
communication.
Supports carbon copy (CC) and blind carbon copy (BCC) for including additional recipients with or without
others' knowledge.
Enables users to reply to received emails or forward them to other recipients.
Includes spam filters to automatically identify and move unwanted or suspicious emails to a separate folder.
Users can set up a signature, typically at the end of their emails, containing personal information or professional
details.
Some email services offer encryption options to enhance the security and privacy of email communication.
Sniffing
Sniffing is a network monitoring technique used to capture and analyze data packets transmitted over a
network.
Involves intercepting and inspecting data packets as they travel across a network, revealing the information
being exchanged.
Sniffers operate in promiscuous mode, allowing them to capture and analyze all network traffic, not just the
packets intended for the device.
Analyzes the content and structure of packets to understand the communication protocols being used, such as
HTTP, FTP, or SMTP.
In some contexts, sniffing can be used for unauthorized access, capturing sensitive information like usernames,
passwords, or other confidential data.
Legitimate use includes network troubleshooting and monitoring to identify issues, analyze performance, and
optimize network configurations.
Unauthorized or malicious sniffing poses a security threat, as it can lead to the exposure of sensitive information
and compromise the confidentiality of data.
Sniffing becomes more potent when applied to unencrypted communication, as encrypted data is more
challenging to intercept and interpret.
Sniffing is particularly relevant in wireless networks, where it can capture data transmitted over the airwaves.
Spoofing
Spoofing involves deceptive techniques where an entity disguises its identity to appear as someone else or as a
trusted source.
In network security, IP spoofing occurs when an attacker alters the source IP address in a network packet to
make it appear as if it comes from a trusted source.
In emails, spoofing occurs when the sender's address is manipulated to appear as if the message is from a
different source, often to trick the recipient.
In telecommunication, caller ID spoofing involves manipulating the caller ID information to display a different
number than the actual one.
This type of spoofing involves altering the Domain Name System (DNS) responses to redirect users to malicious
websites by providing false IP addresses.
In computer networks, MAC spoofing entails changing the Media Access Control (MAC) address of a device to
impersonate another device on the network.
In the context of biometrics, spoofing refers to tricking a system by presenting fake biometric data, such as
fingerprints or facial features.
Spoofed websites mimic legitimate sites to deceive users into providing sensitive information, often part of
phishing attacks.
Security measures like encryption, digital signatures, and multi-factor authentication are implemented to
mitigate the risks associated with various types of spoofing.
Spoofing poses a significant security threat by undermining trust, leading to potential unauthorized access, data
theft, or other malicious activities.
8. Types of Hackers
1. White Hat Hackers:
Ethical hackers who use their skills to help organizations identify and fix security vulnerabilities.
Often employed by companies to perform penetration testing and strengthen cybersecurity.
4. Hacktivists:
Hackers motivated by social or political causes, aiming to promote their ideologies or protest against specific
issues.
Often engage in cyber-attacks as a form of digital activism.
5. Script Kiddies:
Inexperienced individuals who use pre-written scripts or tools to carry out hacking activities without deep
technical knowledge.
Typically motivated by a desire to gain recognition or cause disruptions.
6. State-Sponsored Hackers:
Operate on behalf of a government or state entity with the intent of espionage, cyber warfare, or political
influence.
Engage in sophisticated and targeted attacks against other nations or entities.
7. Hacktivist Groups:
Collective of hackers with shared ideological or political goals, working together to achieve their objectives.
Examples include groups like Anonymous, who often target organizations or governments.
8. Cyber Criminals:
Individuals or groups primarily motivated by financial gains, engaging in activities such as ransomware attacks,
identity theft, or credit card fraud.
9. Insider Threats:
Employees or individuals with internal access to systems who misuse their privileges for malicious purposes.
Can pose a significant threat due to their knowledge of internal systems.
9. SEARCHES
SEARCH ENGINES: A search engine is a program or web page on a web site that helps you to search an Internet site or
the entire Internet for a specific key word or words. The search engine then displays a list of Web pages that contain
information related to the key word/s. Search engines are also called as Web crawlers or spiders.
ADVANCE SEARCH: To overcome the problems of duplicate and irrelevant results, many search engines provide a set of
advanced search options. Advance search is possible (by clicking at Advance Search option) with search engine. In
advance search user can type key words which should be present, key words which should not be present. Also user can
select Result per page, Language, File type etc.
BOOLEAN SEARCH: Most of the search engines allow special words, called Boolean operators. Boolean operators are
used to modify your search condition. Boolean operators are AND, OR, NOT. You can use these Boolean operators along
with key words in the search text box. Many search engines use implied Boolean operators by default. Some of them will
use OR as default Boolean operator whereas, some of them will use AND as default Boolean operator. It is better
practice to use Boolean Operator in your search condition. Boolean operators are not supported by some search engines
in that case you can use advance search.
META SEARCH ENGINES: The Meta search engine is software which can search through many Internet search engines
simultaneously. The user search request is sent to number of search engines like google, msn, indiatimes, yahoo, etc.
The user can check the results obtained from the multiple searches and then connect to any web page he wants.
Every search engine has a specific format in which it should receive the search request. The Meta search engine knows
the exact format required by every search engine therefore it will forward the search request in proper format to the
search engine. The advantage of the Meta search engine is that the user does not have to know the formats of the
different search engines.
MYSQL
1. Write MySQL statement to create a table called BEST having the columns Consumer Number (CNO, integer, Primary
key), Consumer Name (CNAME, character with variable width 30 columns). Type of connection (TYPE, character with
variable width 25 columns default value “INDUSTRIAL”) and bill amount (BILL, width of 9 including 2 decimals, positive).
2. Write MySQL statement to create a table called COMPANY having columns Employee Number (EN, integer, should be
increased by 1 automatically). Name of employee (NAME, character with width 30 columns). Department name (DEPT,
character with variable width 20 columns, should not be empty) Gender (GENDER, Boolean) and Provident Fund Amount
(PF, 8 integer and 2 decimals).
4. Write MySQL statement to create a table called ABFOUNDATION having columns Donor Identity Number (DNO,
integer, Primary key), Donor Name (DNAME, character with width 20 columns), Donor Email Address (Demail, character
with width 15 columns), Amount Donated (DAMT, Integer, Not negative), Date of Donation (DT, Date)
8. Create a table named HOSPITAL, containing information of the patient, having the columns Patient Registration
Number (PRN, should not be duplicate, Should increase automatically if value is not provided, integer),Patient name
(P_NAME, variable width 20), Age (AGE, width 2), Doctor Name ( DOCTOR, Variable Width 10, must contain some data),
Type of patient (TYPE, Character, width 3, default value OPD) and charges (CHRGS, Integer, Default 1000).
This statement is used to add new column to an existing table, to change the type or size or attribute, to change the
column name, and to delete a column. This command has 4 options
ADD, MODIFY, CHANGE and DROP
1. To change the type of SAL column to decimal (8,2) from SAMPLE table.
2. To change the type of name column to clear(10) from SAMPLE table.
3. To give default value 10,000 to a salary column from SAMPLE table.
4. To change size of SNAME column to 9.
UCASE / UPPER : It returns the string with all alphabets changed to uppercase, other characters remains as it is.
e.g. mysql > SELECT UPPER ( ‘ mysql ’ ) ; MYSQL
LEFT : It returns the leftmost ‘n’ characters from the string. If ‘n’ is zero or negative then empty string is returned.
e.g. mysql > SELECT LEFT ( ‘ DATABASE ’ , 4 ) ; DATA
RIGHT : It returns the rightmost ‘n’ characters from the string. If ‘n’ is zero or negative then empty string is returned.
e.g. mysql > SELECT RIGHT ( ‘ DATABASE ’ , 4 ) ; BASE
SUBSTRING / MID : It returns the substring of ‘n’ characters long from given string, starting at position ‘m’.
e.g. mysql > SELECT SUBSTRING ( ‘ COMPUTER ’ , 2 , 4 ) ; OMPU
TRIM : It returns the string with all removed string i.e. leading & trailing both.
e.g. mysql > SELECT TRIM ( ‘ bbXYbb ’ ) ; XY
LENGTH : It returns the length of a string. i.e. number of characters within a string.
e.g. mysql > SELECT LENGTH ( ‘ abcd ’ ) ; 4
CONCAT : It returns the string by concatenating the arguments given in the function. Returns NULL if any
argument is NULL.
e.g. mysql > SELECT CONCAT ( ‘ My ’ , ‘ S ’ , ‘ QL ’ ) ; MySQL
CONCAT_WS : It returns the string by concatenating the arguments with given separator. Returns NULL if separator is
NULL.
e.g. mysql > SELECT CONCAT_WS ( ‘ - ’ , ‘ My ’ , ‘ S ’ , ‘ QL ’ ) ; My-S-QL
NUMERIC FUNCTIONS
ABS : It returns the absolute value of X. If X is negative then it is multiplied by -1 otherwise X remains as it is.
e.g. mysql > SELECT ABS ( -2 ) ; 2
ROUND : It returns the argument X, rounded to a number with D decimals. If D is 0, result will be without decimal point.
If D is negative, ‘ -1’ then nearest 10, ‘-2’ nearest 100 etc.
e.g. mysql > SELECT ROUND ( 1.298 , 1 ) ; 1.3
SQRT : It returns the non-negative square root of X. If X is negative then answer is NULL.
e.g. mysql > SELECT SQRT ( 16 ) ; 4
MONTH : It returns the month of the year for a given date, in the range 1 to 12.
e.g. mysql > SELECT MONTH ( ‘ 2022-11-25 ’ ) ; 11
YEAR : It returns the year for date, in the range 1000 to 9999.
e.g. mysql > SELECT YEAR ( ‘ 2022-11-25 ’ ) ; 2022
NOW / SYSDATE : It returns the current date and time in ‘YYYY-MM-DD HH:MM:SS’.
e.g. mysql > SELECT NOW ( ) ; 2022-11-25 10:30:00
TIME : It returns the time part from the given date-time expression in ‘HH:MM:SS’.
e.g. mysql > SELECT TIME ( ‘ 2022-11-25 10:30:00 ’ ) 10:30:00
DATE : It returns the date part from the given date-time expression in ‘YYYY-MM-DD’.
e.g. mysql > SELECT DATE ( ‘ 2022-11-25 10:30:00 ’ ) ; 2022-11-25