Introduction of DBMS (Database
Management System)
DBMS is a software system that manages, stores, and retrieves
data efficiently in a structured format.
It allows users to create, update, and query databases
efficiently.
Ensures data integrity, consistency, and security across
multiple users and applications.
Reduces data redundancy and inconsistency through
centralized control.
Supports concurrent data access, transaction management,
and automatic
DBMS acts as a bridge between a central database and
multiple clients-including apps and users. It uses APIs to
handle data requests, enabling apps and users to interact with
the database securely and efficiently without directly accessing
the data.
What is Database?
Data refers to raw, unorganized facts and figures, such as
numbers, text, images, or symbols, that can be processed and
analyzed to extract meaningful information
Data can exist in a raw form (unorganized) or processed form
(organized and meaningful).
A database is a structured collection of data designed for
efficient storage, retrieval and manipulation.
It serves as a centralized repository, allowing data to be
accessed, managed, and updated by multiple users or
applications
Application of DBMS
. Railway Reservation System
In the rail route reservation framework, the information base is needed to
store the record or information of ticket appointments, status of train's
appearance, and flight. Additionally, if trains get late, individuals become
acquainted with it through the information base update.
2. Library Management System
There are many books in the library so; it is difficult to store the record of
the relative multitude of books in a register or duplicate. Along these lines,
the data set administration framework (DBMS) is utilized to keep up all the
data identified with the name of the book, issue date, accessibility of the
book, and its writer.
3. Banking
Database the executive's framework is utilized to store the exchange data
of the client in the information base.
4. Education Sector
Presently, assessments are led online by numerous schools and colleges.
They deal with all assessment information through the data set
administration framework (DBMS). In spite of that understudy's
enlistments subtleties, grades, courses, expense, participation, results,
and so forth all the data is put away in the information base.
5. Credit card exchanges
The database Management framework is utilized for buying on charge
cards and age of month to month proclamations.
6. Social Media Sites
We all utilization of online media sites to associate with companions and
to impart our perspectives to the world. Every day, many people group
pursue these online media accounts like Pinterest, Facebook, Twitter, and
Google in addition to. By the utilization of the data set administration
framework, all the data of clients are put away in the information base
and, we become ready to interface with others.
7. Broadcast communications
Without DBMS any media transmission organization can't think. The
Database the executive's framework is fundamental for these
organizations to store the call subtleties and month to month postpaid bills
in the information base.
8. Accounting and Finance
The information base administration framework is utilized for putting away
data about deals, holding and acquisition of monetary instruments, for
example, stocks and bonds in a data set.
9. E-Commerce Websites
These days, web-based shopping has become a major pattern. Nobody
needs to visit the shop and burn through their time. Everybody needs to
shop through web based shopping sites, (for example, Amazon, Flipkart,
Snapdeal) from home. So all the items are sold and added uniquely with
the assistance of the information base administration framework (DBMS).
Receipt charges, installments, buy data these are finished with the
assistance of DBMS.
10. Human Resource Management
Big firms or organizations have numerous specialists or representatives
working under them. They store data about worker's compensation,
assessment, and work with the assistance of an information base
administration framework (DBMS).
Characteristics of DBMS
A database management system is able to store any kind of data in a
database.
The database management system has to support ACID (atomicity,
consistency, isolation, durability) properties.
The Database management system allows so many users to access
databases at the same time.
Backup and recovery are the two main methods which allow users to
protect the data from damage or loss.
It also provides multiple views for different users in a single
organization.
It follows the concept of normalization which is helpful to minimize the
redundancy of a relation.
It also provides users query language, helpful to insert, retrieve,
update, and delete the data in a database.
Advantages and Disadvantages of DBMS
Improved Data Sharing
One of the biggest advantages of a DBMS is its ability to share data. Using a DBMS,
several users are allowed to access and use the database simultaneously without
influencing one another. This is especially handy for teams that are working on the
same project.
Enhanced Data Security
Security is a paramount feature in any organisation since it is the backbone of any
reputed organisation. DBMS comes up with strong security systems that help in the
protection of data. This data can only be accessed or used by users who have the
permission to do so. This means your data is well protected from any external
subjects to avoid any data breach. However, for the prevention of any breach of
data, one has to make constant updates to the system.
Data Integrity and Accuracy
DBMS helps maintain the accuracy and integrity of your data over time. Integrity
constraints help maintain the quality of data, which is very important for making
accurate business decisions.
Reduced Data Redundancy
In a DBMS, data redundancy is minimised. Data is stored in one place and can be
referenced as needed. This saves storage space and ensures that the data remains
consistent.
Backup and Recovery
DBMS provides reliable backup and recovery solutions. If a system is damaged you
are able to restore data lost easily. It means that business activities are unhampered
and important data remain secure.
Support for Complex Queries
SQL is used for advanced querying with the help of DBMS. This allows you to
retrieve and analyse data efficiently. It is useful in coming up with meaningful and
real reports and analyses.
Scalability
As mentioned before, DBMS also has the capability of storing large amounts of data
as well as scaling up. Due to this, it is applicable in all small and big companies. As
your data grows, your DBMS can grow with you.
Data Independence
DBMS abstracts the data structure from the users. This means users can interact
with the data without knowing the complex backend. It simplifies data management
and improves user experience.
Disadvantages of DBMS
There are many disadvantages that can be faced while using a database
management system. Let’s discuss each disadvantage one by one.
Increased Cost
The main disadvantage of DBMS (Database Management System) is the high cost.
The cost can be many types, such as hardware or software costs, data storage
costs, etc. Let’s take a look at them in detail.
Hardware and Software Costs: A database management system database requires
more processing power, which needs high-speed processors, and these processes
use hardware. It is expensive and increases the cost of the overall system. Database
demands need a lot of storage and expensive software for storing data, and this
storage memory needs to be fast for faster output. Hence, the storage adds to overall
costs. There are many costs involved in setting up and maintaining a database
management system.
Staff Training and Expense: A huge amount of cost is required for training and
educating staff who maintain the database in the computer system. This is because
managing a database is very complicated.
Cost of Data Conversion: Converting a database to another form is complicated.
Skilled database designers are required to design the entire database. Hence, a
large amount of money is required for their salaries and the software required to
design the database. All these components increase the cost of the database.
Complexity
The database management system is very complex for normal people to use. It
cannot be understood before any formal training. The setup involves understanding
the specific requirements of the organisation, choosing the right DBMS, and
configuring it to suit those needs. This complexity requires skilled personnel, such as
database administrators (DBAs). These professionals are very skilled in database
design, maintenance, and troubleshooting. The complexity can be a significant
barrier for small organisations or those without access to such expertise.
Backup and Recovery Challenges
Ensuring data backup and recovery in a DBMS environment can be challenging.
While most DBMS provide tools for backup and recovery,
Scalability Issues
DBMS is designed to scale. Scaling up a DBMS to handle increased data volumes
and concurrent users can require significant investment in hardware and
infrastructure. Sometimes, DBMS might not efficiently support horizontal scaling
(adding more servers), leading to performance bottlenecks as the system grows.
DBMS Launguagaes/Classification of DBMS
Introduction of DBMS (Database
Management System)
DBMS is a software system that manages, stores, and retrieves
data efficiently in a structured format.
It allows users to create, update, and query databases
efficiently.
Ensures data integrity, consistency, and security across
multiple users and applications.
Reduces data redundancy and inconsistency through
centralized control.
Supports concurrent data access, transaction management,
and automatic
DBMS acts as a bridge between a central database and
multiple clients-including apps and users. It uses APIs to
handle data requests, enabling apps and users to interact with
the database securely and efficiently without directly accessing
the data.
What is Database?
Data refers to raw, unorganized facts and figures, such as
numbers, text, images, or symbols, that can be processed and
analyzed to extract meaningful information
Data can exist in a raw form (unorganized) or processed form
(organized and meaningful).
A database is a structured collection of data designed for
efficient storage, retrieval and manipulation.
It serves as a centralized repository, allowing data to be
accessed, managed, and updated by multiple users or
applications
Application of DBMS
. Railway Reservation System
In the rail route reservation framework, the information base is needed to
store the record or information of ticket appointments, status of train's
appearance, and flight. Additionally, if trains get late, individuals become
acquainted with it through the information base update.
2. Library Management System
There are many books in the library so; it is difficult to store the record of
the relative multitude of books in a register or duplicate. Along these lines,
the data set administration framework (DBMS) is utilized to keep up all the
data identified with the name of the book, issue date, accessibility of the
book, and its writer.
3. Banking
Database the executive's framework is utilized to store the exchange data
of the client in the information base.
4. Education Sector
Presently, assessments are led online by numerous schools and colleges.
They deal with all assessment information through the data set
administration framework (DBMS). In spite of that understudy's
enlistments subtleties, grades, courses, expense, participation, results,
and so forth all the data is put away in the information base.
5. Credit card exchanges
The database Management framework is utilized for buying on charge
cards and age of month to month proclamations.
6. Social Media Sites
We all utilization of online media sites to associate with companions and
to impart our perspectives to the world. Every day, many people group
pursue these online media accounts like Pinterest, Facebook, Twitter, and
Google in addition to. By the utilization of the data set administration
framework, all the data of clients are put away in the information base
and, we become ready to interface with others.
7. Broadcast communications
Without DBMS any media transmission organization can't think. The
Database the executive's framework is fundamental for these
organizations to store the call subtleties and month to month postpaid bills
in the information base.
8. Accounting and Finance
The information base administration framework is utilized for putting away
data about deals, holding and acquisition of monetary instruments, for
example, stocks and bonds in a data set.
9. E-Commerce Websites
These days, web-based shopping has become a major pattern. Nobody
needs to visit the shop and burn through their time. Everybody needs to
shop through web based shopping sites, (for example, Amazon, Flipkart,
Snapdeal) from home. So all the items are sold and added uniquely with
the assistance of the information base administration framework (DBMS).
Receipt charges, installments, buy data these are finished with the
assistance of DBMS.
10. Human Resource Management
Big firms or organizations have numerous specialists or representatives
working under them. They store data about worker's compensation,
assessment, and work with the assistance of an information base
administration framework (DBMS).
Characteristics of DBMS
A database management system is able to store any kind of data in a
database.
The database management system has to support ACID (atomicity,
consistency, isolation, durability) properties.
The Database management system allows so many users to access
databases at the same time.
Backup and recovery are the two main methods which allow users to
protect the data from damage or loss.
It also provides multiple views for different users in a single
organization.
It follows the concept of normalization which is helpful to minimize the
redundancy of a relation.
It also provides users query language, helpful to insert, retrieve,
update, and delete the data in a database.
Advantages and Disadvantages of DBMS
Improved Data Sharing
One of the biggest advantages of a DBMS is its ability to share data. Using a DBMS,
several users are allowed to access and use the database simultaneously without
influencing one another. This is especially handy for teams that are working on the
same project.
Enhanced Data Security
Security is a paramount feature in any organisation since it is the backbone of any
reputed organisation. DBMS comes up with strong security systems that help in the
protection of data. This data can only be accessed or used by users who have the
permission to do so. This means your data is well protected from any external
subjects to avoid any data breach. However, for the prevention of any breach of
data, one has to make constant updates to the system.
Data Integrity and Accuracy
DBMS helps maintain the accuracy and integrity of your data over time. Integrity
constraints help maintain the quality of data, which is very important for making
accurate business decisions.
Reduced Data Redundancy
In a DBMS, data redundancy is minimised. Data is stored in one place and can be
referenced as needed. This saves storage space and ensures that the data remains
consistent.
Backup and Recovery
DBMS provides reliable backup and recovery solutions. If a system is damaged you
are able to restore data lost easily. It means that business activities are unhampered
and important data remain secure.
Support for Complex Queries
SQL is used for advanced querying with the help of DBMS. This allows you to
retrieve and analyse data efficiently. It is useful in coming up with meaningful and
real reports and analyses.
Scalability
As mentioned before, DBMS also has the capability of storing large amounts of data
as well as scaling up. Due to this, it is applicable in all small and big companies. As
your data grows, your DBMS can grow with you.
Data Independence
DBMS abstracts the data structure from the users. This means users can interact
with the data without knowing the complex backend. It simplifies data management
and improves user experience.
Disadvantages of DBMS
There are many disadvantages that can be faced while using a database
management system. Let’s discuss each disadvantage one by one.
Increased Cost
The main disadvantage of DBMS (Database Management System) is the high cost.
The cost can be many types, such as hardware or software costs, data storage
costs, etc. Let’s take a look at them in detail.
Hardware and Software Costs: A database management system database requires
more processing power, which needs high-speed processors, and these processes
use hardware. It is expensive and increases the cost of the overall system. Database
demands need a lot of storage and expensive software for storing data, and this
storage memory needs to be fast for faster output. Hence, the storage adds to overall
costs. There are many costs involved in setting up and maintaining a database
management system.
Staff Training and Expense: A huge amount of cost is required for training and
educating staff who maintain the database in the computer system. This is because
managing a database is very complicated.
Cost of Data Conversion: Converting a database to another form is complicated.
Skilled database designers are required to design the entire database. Hence, a
large amount of money is required for their salaries and the software required to
design the database. All these components increase the cost of the database.
Complexity
The database management system is very complex for normal people to use. It
cannot be understood before any formal training. The setup involves understanding
the specific requirements of the organisation, choosing the right DBMS, and
configuring it to suit those needs. This complexity requires skilled personnel, such as
database administrators (DBAs). These professionals are very skilled in database
design, maintenance, and troubleshooting. The complexity can be a significant
barrier for small organisations or those without access to such expertise.
Backup and Recovery Challenges
Ensuring data backup and recovery in a DBMS environment can be challenging.
While most DBMS provide tools for backup and recovery,
Scalability Issues
DBMS is designed to scale. Scaling up a DBMS to handle increased data volumes
and concurrent users can require significant investment in hardware and
infrastructure. Sometimes, DBMS might not efficiently support horizontal scaling
(adding more servers), leading to performance bottlenecks as the system grows.
DBMS Languages/Classification of DBMS
1. DDL (Data Definition Language)
2. DCL (Data Control Language)
3. DML (Data Manipulation Language)
4. TCL (Transaction Control Language)
1. DDL (Data Definition Language)
The DDL stands for Data Definition Language, Which is used to define the
database's internal structure and Pattern of the Database. It is used to
define and modify the structure of the database itself, including the tables,
views, indexes and other schema-related objects. It deals with the
creation and modification of database schema, but it doesn't deal with the
data itself. Following are the five DDL commands in SQL:
CREATE: Used to create database objects like tables, indexes or
views.
ALTER: Used to modify the structure of an existing database object,
such as adding a new column to a table.
DROP: Used to delete database objects.
TRUNCATE: Used to remove all rows from a table, without affecting
the structure.
RENAME: Used to change the name of a database object.
1.1 CREATE Command
The CREATE is a DDL command used to create databases,
tables, triggers and other database objects.
Syntax:
CREATE TABLE Students (
column1 INT,
column2 VARCHAR(50),
column3 INT
);
EX: CREATE TABLE employees (
employee_id INT PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50),
hire_date DATE
);
Alter Command
ALTER is a DDL command which changes or modifies the existing
structure of the database and it also changes the schema of database
objects. We can also add and drop constraints of the table using
the ALTER command.
Syntax:
ALTER TABLE Students ADD column_name;
EXample
Drop Command
DROP is a DDL command used to delete/remove the database objects
from the SQL database. We can easily remove the entire table, view or
index from the database using this DDL command.
Syntax:
DROP Table Table_name;
Example:
Truncate Command
The TRUNCATE command is used to delete all the records from a table
without removing the structure. Unlike the DELETE command, which can
remove specific rows and can be rolled back, TRUNCATE is a more
efficient way to delete all rows in a table without logging individual row
deletions.
Syntax:
TRUNCATE TABLE table_name;
Example:
Rename Command
The RENAME command in a Database Management System (DBMS) is
used to change the name of a database object, such as a table, column or
index. This command is helpful when we want to give a more meaningful
or appropriate name to an object without needing to recreate it.
Syntax:
ALTER TABLE Old_Table_Name RENAME TO New_Table_Name;
Example:
Rename Command
The RENAME command in a Database Management System (DBMS) is
used to change the name of a database object, such as a table, column or
index. This command is helpful when we want to give a more meaningful
or appropriate name to an object without needing to recreate it.
Syntax:
ALTER TABLE Old_Table_Name RENAME TO New_Table_Name;
Example:
.
DML Command
DML - Data Manipulation Language
DML commands are used to manipulate the data stored in database
tables. With DML, you can insert new records, update existing ones,
delete unwanted data or retrieve information.
Command Description Syntax
INSERT INTO table_name (column1,
INSERT Insert data into a table column2, ...) VALUES (value1,
value2, ...);
UPDATE table_name SET column1 =
Update existing data
UPDATE value1, column2 = value2 WHERE
within a table
condition;
Delete records from a DELETE FROM table_name WHERE
DELETE
database table condition;
Example of Insert command
The primary DML commands are:
INSERT: Used to add new rows or records into a table.
Example:
Code
INSERT INTO Employees (FirstName, LastName, Department, Salary)
VALUES ('Jane', 'Smith', 'Marketing', 60000);
UPDATE: Used to modify existing data in one or more rows of a
table. A WHERE clause is typically used to specify which rows to update; without it, all
rows in the table will be affected.
Example:
Code
UPDATE Employees
SET Salary = 65000
WHERE FirstName = 'Jane' AND LastName = 'Smith';
DELETE: Used to remove one or more rows from a table. Similar to UPDATE,
a WHERE clause is crucial to specify which rows to delete; otherwise, all rows will be
removed.
Example:
Code
DELETE FROM Employees
WHERE FirstName = 'Jane' AND LastName = 'Smith';
SELECT: While often categorized under Data Query Language (DQL), SELECT is also
considered a DML command as it is fundamental to retrieving data for manipulation
or analysis. It is used to fetch data from a database table.
Example:
Code
SELECT FirstName, LastName, Department
FROM Employees
WHERE Department = 'Marketing';
3)DQL Command
Data Query Language (DQL) in SQL primarily consists of one command: SELECT.
The SELECT command is used to retrieve data from a database. It can be used in
conjunction with various clauses to refine the data retrieval process.
Here are the key components and clauses commonly used with
the SELECT command in DQL:
SELECT: Specifies the columns or expressions to be retrieved.
Syntax
SELECT column1, column2 FROM table_name;
FROM: Indicates the table(s) from which the data will be retrieved.
Syntax
SELECT * FROM employees;
WHERE: Filters the rows based on specified conditions.
Syntax
SELECT name, age FROM students WHERE age > 18;
JOIN:Combines rows from two or more tables based on a related column between
them. Common types include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
Syntax
SELECT orders.order_id, customers.customer_name
FROM orders
INNER JOIN customers ON orders.customer_id = customers.customer_id;
GROUP BY:Groups rows that have the same values in specified columns into
summary rows.
Syntax
SELECT department, COUNT(employee_id) FROM employees GROUP BY
department;
HAVING: Filters the grouped result set based on specified conditions, similar
to WHERE but applied after GROUP BY.
Syntax
SELECT department, AVG(salary) FROM employees GROUP BY department
HAVING AVG(salary) > 50000;
ORDER BY:Sorts the result set based on specified columns in ascending (ASC) or
descending (DESC) order.
Syntax
SELECT product_name, price FROM products ORDER BY price DESC;
DCL Command
Commands in DCL
The two most important DCL commands are
GRANT
REVOKE.
1)GRANT
This command is used to grant permission to the user to perform a
particular operation on a particular object. If we are a database
administrator and we want to restrict user accessibility such as one who
only views the data or may only update the data.
we can give the privilege permission to the users according to our wish.
Syntax
GRANT privilege_list
ON Object_name
TO user_name;
REVOKE
This command is used to take permission/access back from the user. If
we want to return permission from the database that we have granted to
the users at that time we need to run REVOKE command.
Syntax
REVOKE privilege_list
ON object_name
FROM user_name;
TCL Commands
TCL includes the following commands:
1. COMMIT
The COMMIT command is used to save all the transactions to the
database that have been performed during the current transaction.
Once a transaction is committed, it becomes permanent and cannot be
undone.
This command is typically used at the end of a series of SQL
statements to ensure that all changes made during the transaction are
saved.
Syntax:
COMMIT;
2)ROLLBACK
The ROLLBACK command is used to undo all the transactions that have
been performed during the current transaction but have not yet been
committed.
This command is useful for reverting the database to its previous state
in case an error occurs or if the changes made are not desired.
Syntax:
ROLLBACK;
3. SAVEPOINT
The SAVEPOINT command is used to set a point within a transaction to
which we can later roll back.
This command allows for partial rollbacks within a transaction,
providing more control over which parts of a transaction to undo.
Syntax:
SAVEPOINT savepoint_name;
Uses of TCL Commands
COMMIT: Used after data modifications (INSERT, UPDATE, DELETE)
to save changes to the database.
ROLLBACK: Used to revert changes if something goes wrong,
ensuring data integrity.
SAVEPOINT: Used to create intermediate points within a transaction to
which you can roll back, providing finer control over transaction
management.
SET TRANSACTION: Used to configure transaction behavior, ensuring
proper isolation and consistency as per requirements.
Example Using COMMIT and ROLLBACK
Let's update the name of a student from 'Jolly' to 'Sherlock' in the
STUDENT table and ensure the change is committed.
UPDATE STUDENT
SET NAME = ‘Sherlock’
WHERE NAME = ‘Jolly’;
COMMIT;
ROLLBACK;
By using this command you can update the record and save it
permanently by using COMMIT command.
Now after COMMIT:
Name Marks
John 79
Sherlock 65
Name Marks
Shuzan 70
If commit was not performed then the changes made by the update
command can be rollback.
Now if no COMMIT is performed.
UPDATE STUDENT
SET NAME = ‘Sherlock’
WHERE STUDENT_NAME = ‘Jolly’;
After update command the table will be:
Name Marks
John 79
Sherlock 65
Shuzan 70
Now if ROLLBACK is performed on the above table:
rollback;
After Rollback:
Name Marks
John 79
Jolly 65
Shuzan 70
Example Using SAVEPOINT
If on the above table savepoint is performed:
INSERT into STUDENT
VALUES ('Jack', 95);
Commit;
UPDATE NAME
SET NAME= ‘Rossie’
WHERE marks= 70;
SAVEPOINT A;
INSERT INTO STUDENT
VALUES (‘Zack’, 76);
Savepoint B;
INSERT INTO STUDENT
VALUES (‘Bruno’, 85);
Savepoint C;
SELECT *
FROM STUDENT;
Name Marks
John 79
Jolly 65
Rossie 70
Jack 95
Zack 76
Bruno 85
Now if we Rollback to Savepoint B:
Rollback to B;
begins
The resulting Table will be-
Name Marks
John 79
Jolly 65
Rossie 70
Jack 95
Zack 76
Now if we Rollback to Savepoint A:
Rollback to A;
The resulting Table will be-
Name Marks
John 79
Jolly 65
Rossie 70
Jack 95
File System Verces Database
File System
The file system is basically a way of arranging the files in a storage
medium like a hard disk. The file system organizes the files and helps in
the retrieval of files when they are required. File systems consist of
different files which are grouped into directories. The directories further
contain other folders and files. The file system performs basic operations
like management, file naming, giving access rules, etc.
Difference Between File System and DBMS
Basics File System DBMS
The file system is a way of
arranging the files in a DBMS is software for
storage medium within a managing the database.
Structure computer.
Data Redundant data can be In DBMS there is no
Redundancy present in a file system. redundant data.
It doesn't provide Inbuilt It provides in house tools for
Backup and mechanism for backup and backup and recovery of data
Recovery recovery of data if it is lost. even if it is lost.
There is no efficient query
Query Efficient query processing is
processing in the file
there in DBMS.
processing system.
Basics File System DBMS
There is less data There is more data
consistency in the file consistency because of the
Consistency system. process of normalization .
It has more complexity in
It is less complex as
handling as compared to the
compared to DBMS.
Complexity file system.
File systems provide less DBMS has more security
Security security in comparison to mechanisms as compared to
Constraints DBMS. file systems.
It is less expensive than It has a comparatively higher
Cost DBMS. cost than a file system.
In DBMS data
independence exists, mainly
of two types:
There is no data
1) Logical Data
independence.
Independence .
Data 2)Physical Data
Independence Independence.
Only one user can access Multiple users can access
User Access data at a time. data at a time.
The user has to write
The users are not required
procedures for managing
to write procedures.
Meaning databases
Data is distributed in many
Due to centralized nature data
files. So, it is not easy to
sharing is easy
Sharing share data.
Data It give details of storage It hides the internal details
Abstraction and representation of data of Database
Integrity Integrity Constraints are Integrity constraints are easy
Constraints difficult to implement to implement
Introduction to SQL
Structured Query Language (SQL) is the standard language used to
interact with relational databases.
It allows users to store, retrieve, update and manage data efficiently
through simple commands.
It is known for its user-friendly syntax and powerful capabilities, SQL is
widely used across industries.
Introduction to Internet
What is Internet?
Internet is a group of computer systems connected from all around the
world. The Internet protocol suite is a framework defined through the
Internet standards
Uses of the Internet
E-mail: E-mail is an electronic message sent across a network from
one computer user to one or more recipients. It refers to the internet
services in which messages are sent from and received by servers.
Web Chat: Web chat is an application that allows you to send and
receive messages in real-time with others. By using Internet chat
software, the user can log on to specific websites and talk with a
variety of other users online. Chat software is interactive software that
allows users to enter comments in one window and receive responses
from others who are using the same software in another window.
World Wide Web: The World Wide Web is the Internet's most popular
information exchange service. It provides users with access to a large
number of documents that are linked together using hypertext or
hyperlinks.
E-commerce: E-commerce refers to electronic business transactions
made over the Internet. It encompasses a wide range of product and
service-related online business activities.
Internet telephony: The technique that converts analog speech
impulses into digital signals and routes them through packet-switched
networks of the internet is known as internet telephony.
Video conferencing: The term "video conferencing" refers to the use
of voice and images to communicate amongst users.
Advantages of the Internet
It is the best source of a wide range of information. There is no better
place to conduct research than the internet.
Online gaming, talking, browsing, music, movies, dramas, and TV
series are quickly becoming the most popular ways to pass the time.
Because there are hundreds of thousands of newsgroups and services
that keep you updated with every tick of the clock, the Internet is a
source of the most recent news.
Because of virtual shops where you may buy anything you want and
need without leaving your house, internet shopping is becoming
increasingly popular. Recently, virtual shops have been making a lot of
money.
With the emergence of online businesses, virtual stores, and credit
card usage, purchasing goods without going to the store has never
been easier.
Disadvantages of the Internet
Spending too much time on the internet is hazardous for the young
generation's physical and mental health.
Children who use the internet develop an addiction, which is quite
dangerous.
It is now quite easy to decipher someone's chat or email messages
thanks to the hacking community.
With the emergence of online stores, people prefer to order online
rather than going to local stores which results in less social interactions
among people.
Application of Internet
Electronic Mail (Email): Sending and receiving messages to individuals or groups.
Instant Messaging and Chat: Real-time text-based conversations.
Video Conferencing: Face-to-face meetings and conversations with people in
different locations.
Social Media: Connecting with others through platforms like Facebook and Twitter.
Information and education
Web Browsing: Accessing and navigating the World Wide Web to find information
on any topic.
Search Engines: Using tools like Google to quickly find relevant information.
Online Learning: Participating in interactive classes, accessing educational
resources, and conducting research.
Research: Accessing academic papers and literature reviews online.
Commerce and finance
E-commerce: Buying and selling products and services online.
Online Banking (E-banking): Conducting financial transactions, such as paying
bills and transferring money, through a bank's website.
Online Payments: Making payments for various goods and services.
Entertainment and travel
Streaming Services: Watching movies, videos, and listening to music.
Online Gaming: Playing interactive games with other users.
Travel Booking: Reserving flights, hotels, and other travel arrangements.
Business and industry
Cloud Computing: Storing and accessing data and applications over the internet.
Customer Relationship Management (CRM): Managing customer interactions and
data more effectively.
Smart Homes and Cities: Automating functions for convenience, energy savings,
and managing urban services.
Industrial Internet: Enhancing efficiency in industrial operations with smart
machines and AI.
What is a Web Browser and How does it
Work?
The web browser is an application software used to explore the
World Wide Web (WWW).
It acts as a platform that allows users to access information from
the Internet by serving as an interface between the client (user)
and the server.
The browser sends requests to servers for web documents and
services, then renders the received HTML content, including text,
images, links, styles, and scripts.
Simply being connected to the Internet isn't enough; a browser is
essential to search and view content online. Popular web
browsers include Google Chrome, Microsoft Edge,
How Does a Web Browser Work?
When a user accesses a website by typing a URL
like [Link] into the browser, the browser first
contacts a DNS (Domain Name System) server to translate the domain
name into an IP address, such as [Link]. After obtaining the IP
address, the browser sends a request to the corresponding web server.
The web server processes this request and responds with the required
content, including HTML, CSS, images, and scripts. The browser then
uses this content to display the webpage to the user.
A browser helps us find information anywhere on the internet. It is
installed on the client's computer and requests information from the web
server; such a type of working model is called a client-server model.
The browser receives information through HTTP protocol. In which
transmission of data is defined. When the browser received data from the
server, it is rendered in HTML to user-readable form and, information is
displayed on the device screen.
Internet services
To access/exchange a large amount of data such as software, audio clips,
video clips, text files, other documents, etc., we need internet services.
You must use an Internet service to connect to the Internet. Data can be
sent from Internet servers to your machine via Internet service. Some of
the commonly used internet services are :
Communication Services
Information Retrieval Services
File Transfer
World Wide Web Services
Web Services
Directory Services
Automatic Network Address Configuration
Network Management Services
Time Services
Usenet
NewsGroup
Ecommerce
Now let us discuss them one by one
1. Communication Services: To exchange data/information among
individuals or organizations, we need communication services. Following
are some of the common communication services:
IRC(Internet Relay Chat): Subscribers can communicate in real-time
by connecting numerous computers in public spaces called channels.
VoIP: It stands for Voice over Internet Protocol, which describes how to
make and receive phone calls over the internet. A larger number of
people believe VoIP is a viable alternative to traditional landlines. VoIP
(Voice over Internet Protocol) is a technique that helps us make voice
calls via the Internet rather than over a traditional (or analog) phone
line. Some VoIP services may let you call only other VoIP users, while
others may let you call anyone with a phone number, including long-
distance, mobile, and local/international lines. If you have an internet
connection you can easily call anyone without using a local phone
service because VoIP solutions are based on open standards, they can
be used on any computer. More than just setting up calls is what VoIP
service providers do. Outgoing and incoming calls are routed through
existing telephone networks by them.
List Server (LISTSERV): Delivers a group of email recipients' content-
specific emails.
E-Mail: Used to send electronic mail via the internet. It is a paperless
method for sending text, images, documents, videos, etc from one
person to another via the internet.
User Network (USENET): It hosts newsgroups and message boards
on certain topics, and it is mostly run by volunteers.
Telnet: It's used to connect to a remote computer that's connected to
the internet.
Video Conferencing: Video conferencing systems allow two or more
people who are generally in different locations to connect live and
visually. Live video conferencing services are necessary for simulating
face-to-face talks over the internet. The system can vary from very
simple to complex, depending on the live video conferencing vendors.
A live video-based conference involves two or more individuals in
separate locations utilizing video-enabled devices and streaming voice,
video, text, and presentations in real-time via the internet. It allows
numerous people to connect and collaborate face to face over large
distances. Tools available for this purpose are Zoom, FreeConference,
Google Hangouts, Skype, etc.
2. Information Retrieval Services: It is the procedure for gaining access
to information/data stored on the Internet. Net surfing or browsing is the
process of discovering and obtaining information from the Internet. When
your computer is linked to the Internet, you may begin retrieving data. To
get data, we need a piece of software called a Web browser. A print or
computer-based information retrieval system searches for and locates
data in a file, database, or other collection of data. Some sites are:
[Link]: Free tutorials, millions of articles, live,
online, and classroom courses, frequent coding competitions, industry
expert webinars, internships, and job possibilities are all available. A
computer-based system for searching and locating data in a file,
database, or another source.
[Link]: It includes advice for students, parents, and
educators on how to be more creative.
3. File Transfer: The exchange of data files across computer systems is
referred to as file transfer. Using the network or internet connection to
transfer or shift a file from one computer to another is known as file
transfer. To share, transfer, or send a file or logical data item across
several users and/or machines, both locally and remotely, we use file
transfer. Data files include - documents, multimedia, pictures, text, and
PDFs and they can be shared by uploading or downloading them. To
retrieve information from the internet, there are various services available
such as:
Gopher: A file retrieval application based on hierarchical, distributed
menus that is simple to use.
FTP (File Transfer Protocol): To share, transfer, or send a file or
logical data item across several users and/or machines, both locally
and remotely.
Archie: A file and directory information retrieval system that may be
linked to FTP
4. Web services: Web services are software that uses defined messaging
protocols and are made accessible for usage by a client or other web-
based programs through an application service provider's web server.
Web services allow information to be exchanged across web-based
applications. Using Utility Computing, web services can be provided.
5. World Wide Web: The internet is a vast network of interconnected
computers. Using this network, you can connect to the world wide web
(abbreviated as 'www' or 'web') is a collection of web pages. The web
browser lets you access the web via the internet.
6. Directory Services: A directory service is a set of software that keeps
track of information about your company, customers, or both. Network
resource names are mapped to network addresses by directory services.
A directory service provides users and administrators with full transparent
access to printers, servers, and other network devices. The directory
services are :
DNS (Domain Number System): This server provides DNS. The
mappings of computer hostnames and other types of domain names to
IP addresses are stored on a DNS server.
LDAP (Lightweight Directory Access Protocol): It is a set of open
protocols that are used for obtaining network access to stored data
centrally. It is a cross-platform authentication protocol for directory
services and also allows users to interact with other directory services
servers.
7. Automatic Network Address Configuration: Automatic Network
Addressing assigns a unique IP address to every system in a network. A
DHCP Server is a network server that is used to assign IP addresses,
gateways, and other network information to client devices. It uses
Dynamic Host Configuration Protocol as a common protocol to reply to
broadcast inquiries from clients.
8. Network Management Services: Network management services are
another essential internet service that is beneficial to network
administrators. Network management services aid in the prevention,
analysis, diagnosis, and resolution of connection problems. The two
commands related to this are:
ping: The ping command is a Command Prompt command that is used
to see if a source can communicate with a specific destination & get all
the possible paths between them.
traceroute: To find the path between two connections, use the
traceroute command.
9. Time Services: Using facilities included in the operating system, you
may set your computer clock via the Internet. Some services are :
Network Time Protocol (NTP): It is a widely used internet time service
that allows you to accurately synchronize and adjust your computer
clock.
The Simple Network Time Protocol (SNTP): It is a time-keeping
protocol that is used to synchronize network hardware. When a full
implementation of NTP is not required, then this simplified form of NTP
is typically utilized.
10. Usenet: The 'User's Network' is also known as Usenet. It is a network
of online discussion groups. It's one of the first networks where users may
upload files to news servers and others can view them.
What is a Physical Address?
The physical address is also known as the MAC (Media Access
Control) address or link address. It is the address of a node which is
defined by its LAN or WAN. It is used by the data link layer and is the
lowest level of addresses. MAC address is the unique address of a
device. The size of a physical address is 48 bits (6 bytes). Below is the
format for representing a physical address:
XX : XX : XX : YY : YY : YY, where 1 octant = 8 bits.
Example:
16 : 1A : BB : 6F : 90 : E5
The first 24 bits of a MAC address XX : XX: XX is decided by OUI
(Organizationally Unique Identifier). It represents the identity of the
manufacturer. The next 24 bits of a MAC address YY : YY : YY represents
the unique identity of the device. It is assigned by the manufacturer. They
represent NIC (Network Interface Card).
Below is a diagram representing the working mechanism of a physical
address:
Mechanism of Physical Address
In the above diagram, we can see that there are two networks - Network 1
and Network 2. A1 is the sender and there are two receivers - D1 and D2.
In case of physical address, receiver D1 receives the data but receiver D2
is unable to receive data. This is because receiver D2 does not belong to
the same network as the sender A1 belongs to. Physical address can only
be passed in the same network and not in different networks. The purpose
of using Physical address is to identify devices in the same network.
Advantages
Physical address can uniquely identify devices and deliver data
packets accurately.
We can restrict access to any network by allowing only those devices
which have the authorized MAC addresses to connect. Thus, it can
also be used for network security.
Disadvantages
MAC addresses can be easily spoofed. Thus, the devices can easily
gain unauthorized access to a network.
As physical addresses cannot traverse through the routers therefore
they can only be used in local networks and not between different
networks.
Physical and Logical Address
What is a Logical Address?
Logical address also referred to as IP (Internet Protocol) address is an
universal addressing system. It is used in the Network layer. This address
facilitates universal communication that are not dependent on the
underlying physical networks. There are two types of IP addresses - IPv4
and IPv6.
The size of IPv4 is 32 bits. For example ,
192 : 180 : 210 where, 1 octant = 8 bits.
The size of IPv6 is 128 bits. For example ,
1C18 : 1B32 : C450 : 62A5 : 34DC : AE24 : 15BC : 6A5D where , 1 octant
= 16 bits.
Below is a diagram representing the working mechanism of Logical
address:
Mechanism of Logical Address
In the above diagram , we can see that there are two networks - Network
1 and Network 2. A1 is the sender and there are two receivers - D1 and
D2. In case of logical address, receiver D1 as well as D2 receives the
data. This is because logical address can be passed in different networks.
The purpose of using logical address is to send the data across networks.
Advantages
Logical address can be used in different networks because they can
traverse through routers.
They can handle a number devices and networks. Even if the number
of devices and network increases, the logical address is able to handle
all them very easily. Thus, they are highly scalable.
Disadvantages
Internet Protocol is vulnerable to attacks such as hacking, phishing etc.
and there can be data loss.
It lacks privacy. The data which is moving through the packets can be
intercepted, traced and monitored by unauthorized entities.
Differences between Physical Address and Logical Address
Physical Address Logical Address
Physical Address is the address Logical address also referred to as IP
of a node which is defined by its (Internet Protocol) address is an universal
LAN or WAN addressing system
Physical Address is computed
Logical Address is generated by CPU.
bu MMU.
Found on Data Link Layer. Found on Network Layer.
Format is 48-bit address in Format is IPv4: 32-bit
hexadecimal. IPv6: 128-bit
Physical address is not visible to
Logical address is visible to users.
users.
ISP:Internet Service Provider
ISP stands for Internet Service Provider. An Internet Service Provider
(ISP) is an organization that provides internet access to individuals,
businesses and other organizations. They connect us to the internet,
either through wired connections (like fiber or cable) or wireless methods
(like Wi-Fi or mobile data).
Characteristics of Internet Service Provider
Email Account: Many Internet Service Providers offer an email
address to their consumers.
User Support: Professionals and an increasing number of lay users
prefer an ISP that can provide them with customer support so that they
have someone they can refer to if things go awry.
Access to High-Speed Internet: Probably the most obvious item on
this list as this feature of an Internet Service Provider lies literally in its
name. Furthermore, the higher the speed an Internet Service Provider
can offer one, the better it's standing in the market and the more
customers it can attract.
Spam Blocker: An Internet Service Provider that hinders its
customers' productivity by way of not blocking spam and displaying
frequent ads is not something that is generally favored in the market
today. Therefore, many of the Internet Service Providers offer spam
blocking features to their customers.
Web Hosting: Some of the ISPs offer web hosting services to their
clientele as well.
Domain Name System (DNS)
DNS is a hierarchical and distributed naming system that
translates domain names into IP addresses. When you type a
domain name like [Link] into your browser, DNS
ensures that the request reaches the correct server by resolving
the domain to its corresponding IP address.
Working of DNS
The DNS process can be broken down into several steps, ensuring that
users can access websites by simply typing a domain name into their
browser.
4/5
User Input: You enter a website address (for example,
[Link]) into your web browser.
Local Cache Check: Your browser first checks its local cache to see if
it has recently looked up the domain. If it finds the corresponding IP
address, it uses that directly without querying external servers.
DNS Resolver Query: If the IP address isn’t in the local cache, your
computer sends a request to a DNS resolver. The resolver is typically
provided by your Internet Service Provider (ISP) or your network
settings.
Root DNS Server: The resolver sends the request to a root DNS
server. The root server doesn’t know the exact IP address for
[Link] but knows which Top-Level Domain (TLD)
server to query based on the domain’s extension (e.g., .org).
TLD Server: The TLD server for .org directs the resolver to the
authoritative DNS server for [Link].
Authoritative DNS Server: This server holds the actual DNS records
for [Link], including the IP address of the website’s server.
It sends this IP address back to the resolver.
Final Response: The DNS resolver sends the IP address to your
computer, allowing it to connect to the website’s server and load the
page.
WEB Basics
What is WWW?
WWW stands for World Wide Web. A technical definition of the World Wide
Web is − All the resources and users on the Internet that are using the
Hypertext Transfer Protocol (HTTP).
A broader definition comes from the organization that Web inventor Tim
Berners-Lee helped found, the World Wide Web Consortium (W3C): The World
Wide Web is the universe of network-accessible information, an embodiment
of human knowledge.
In simple terms, The World Wide Web is a way of exchanging information
between computers on the Internet, tying them together into a vast
collection of interactive multimedia resources.
What is HTTP?
HTTP stands for Hypertext Transfer Protocol. This is the protocol being used
to transfer hypertext documents that makes the World Wide Web possible.
A standard web address such as [Link] is called a URL and here the
prefix http indicates its protocol
What is URL?
URL stands for Uniform Resource Locator, and is used to specify addresses
on the World Wide Web. A URL is the fundamental network identification for
any resource connected to the web (e.g., hypertext pages, images, and
sound files).
A URL will have the following format −
protocol://hostname/other_information
The protocol specifies how information is transferred from a link. The protocol
used for web resources is HyperText Transfer Protocol (HTTP). Other
protocols compatible with most web browsers include FTP, telnet,
newsgroups, and Gopher.
The protocol is followed by a colon, two slashes, and then the domain name.
The domain name is the computer on which the resource is located.
Links to particular files or subdirectories may be further specified after the
domain name. The directory names are separated by single forward slashes.
What is Website?
Currently you are on our website [Link] which is a collection of
various pages written in HTML markup language. This is a location on the
web where people can find tutorials on latest technologies. Similarly, there
are millions of websites available on the web.
Each page available on the website is called a web page and first page of any
website is called home page for that site.
What is Web Server?
Every Website sits on a computer known as a Web server. This server is
always connected to the internet. Every Web server that is connected to the
Internet is given a unique address made up of a series of four numbers
between 0 and 256 separated by periods. For example, [Link] or
[Link].
When you register a Web address, also known as a domain name, such as
[Link] you have to specify the IP address of the Web server that
will host the site.
We will see different type of Web servers in a separate chapter.
What is Web Browser?
Web Browsers are software installed on your PC. To access the Web you need
a web browsers, such as Netscape Navigator, Microsoft Internet Explorer or
Mozilla Firefox.
Currently you must be using any sort of Web browser while you are
navigating through my site [Link]. On the Web, when you
navigate through pages of information this is commonly known as browsing
or surfing.
We will see different type of Web browsers in a separate chapter.
What is SMTP Server?
SMTP stands for Simple Mail Transfer Protocol Server. This server takes care
of delivering emails from one server to another server. When you send an
email to an email address, it is delivered to its recipient by a SMTP Server.
What is ISP?
ISP stands for Internet Service Provider. They are the companies who
provide you service in terms of internet connection to connect to the internet.
You will buy space on a Web Server from any Internet Service Provider. This
space will be used to host your Website.
What is HTML?
HTML stands for Hyper Text Markup Language. This is the language in which
we write web pages for any Website. Even the page you are reading right
now is written in HTML.
This is a subset of Standard Generalized Mark-Up Language (SGML) for
electronic publishing, the specific standard used for the World Wide Web.
What is Hyperlink?
A hyperlink or simply a link is a selectable element in an electronic document
that serves as an access point to other electronic resources. Typically, you
click the hyperlink to access the linked resource. Familiar hyperlinks include
buttons, icons, image maps, and clickable text links.
What is DNS?
DNS stands for Domain Name System. When someone types in your domain
name, [Link], your browser will ask the Domain Name System to
find the IP that hosts your site. When you register your domain name, your IP
address should be put in a DNS along with your domain name. Without doing
it your domain name will not be functioning properly.
What is W3C?
W3C stands for World Wide Web Consortium which is an international
consortium of companies involved with the Internet and the Web.
HTTP and HTTPS
What is HTTP?
HTTP stands for HyperText Transfer Protocol. It is invented by Tim
Berner. HyperText is the type of text that is specially coded with the help
of some standard Markup language called HyperText Markup Language
(HTML). HTTP provides a standard between a web browser and a web
server to establish communication. It is a set of rules for transferring data
from one computer to another. Data such as text, images, and other
multimedia files are shared on the World Wide Web. Whenever a web
user opens their web browser, the user indirectly uses HTTP. It is an
application protocol that is used for distributed, collaborative, hypermedia
information systems.
HTTP
Characteristics of HTTP
HTTP is IP based communication protocol that is used to deliver data
from server to client or vice-versa.
Any type of content can be exchanged as long as the server and client
are compatible with it.
It is a request and response protocol based on client and server
requirements.
HTTP Request
HTTP request is a kind of message a client (in most cases, a web
browser) sends to the server demanding some specific resources. It
comprises of several elements like the request method (GET, POST and
etc. ), the headers and occasionally the body carrying the data. This is the
request part where the client outlines a request to the server and what
they want.
HTTP Response
Http response is a message sent by the server to the client in response to
an Http request. In simple terms, it has status code that describes the
result of a request; header, which is information about the response; and
the body, which is the actual response or an error message.
How Does the HTTP Protocol Work?
This means that the HTTP protocol uses a forms of a request and
response operational mode. When a client wants to retrieve information, it
uses http request to the servers as shown in the following stages. The
request is received by the server and in the form of an HTTP response the
server returns the data which the client requested or an error message.
This takes place over the internet using port 80 by default, to assist in the
identification of this protocol it is often referred to as the http or the hip
protocol.
What is HTTPS?
HTTPS stands for Hyper Text Transfer Protocol Secure. HTTP Secure
(HTTPS), could be a combination of the Hypertext Transfer Protocol with
the SSL/TLS convention to supply encrypted communication and secure
distinguishing proof of an arranged web server. is HTTP, then that website
is not secure.
HTTPS
Characteristics of HTTPS
HTTPS encrypts all message substance, including the HTTP headers
and the request/response data. The verification perspective of HTTPS
requires a trusted third party to sign server-side digital certificates.
HTTPS is presently utilized more frequently by web clients than the
first non-secure HTTP, fundamentally to ensure page genuineness on
all sorts of websites, secure accounts and to keep client
communications.
In short, both of these are protocols using which the information of a
particular website is exchanged between the Web Server and Web
Browser. But there are some differences between these two. A concise
difference between HTTP and HTTPS is that HTTPS is much more secure
compared to HTTP.
How Does the HTTPS Protocol Work?
HTTPS can be said to be similar to the HTTP only that it also provides a
level of security. It first creates a connection between the client and server
over SSL/TLS, which enhances security by encrypting the Client and
server communication. When a client makes a request for a resource
using the https then the server and the client agree on the encryption keys
that will be used in encrypting the data that will be transmitted in that
particular session. This makes sure that data being exchanged between
them is encrypted and coded hence cannot be intercepted.
Difference Between HTTP and HTTPS
HTTP HTTPS
HTTPS stands for
HyperText Transfer
HTTP stands for HyperText Transfer Protocol. In
Protocol Secure. In
HTTP, the URL begins with “[Link]
HTTPS, the URL starts
with “[Link]
HTTP uses port number 80 for communication. HTTPS uses port
HTTP HTTPS
number 443 for
communication.
HTTPS is considered
to be secure but at the
cost of processing time
Hyper-text exchanged using HTTP goes as plain text because Web Server
i.e. anyone between the browser and server can read and Web Browser
it relatively easily if one intercepts this exchange of need to exchange
data and due to which it is Insecure. encryption keys using
Certificates before
actual data can be
transferred.
HTTPS works
HTTP Works at the Application Layer.
at Transport Layer.
HTTPS uses
HTTP does not use encryption, which results in low Encryption which
security in comparison to HTTPS. results in better
security than HTTP.
HTTPS speed is
HTTP speed is faster than HTTPS.
slower than HTTP.
HTTPS will have the
data before sending it
HTTP does not use data hashtags to secure data. and returning it to its
original state on the
receiver side.
HTTP is used to transfer text, video, and images via HTTPS is used to
web pages. transfer data securely
HTTP HTTPS
via a network.