0% found this document useful (0 votes)
34 views61 pages

Web Full Stack Developer Virtual Internship

This document is an internship report by Swamy Kanulla for a Web Full Stack Developer Virtual Internship at Vasireddy Venkatadri Institute of Technology. It outlines the internship's objectives, curriculum, and the skills acquired during the program, including front-end and back-end technologies. The report also includes acknowledgments, a declaration, and a certificate of completion for the internship.

Uploaded by

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

Web Full Stack Developer Virtual Internship

This document is an internship report by Swamy Kanulla for a Web Full Stack Developer Virtual Internship at Vasireddy Venkatadri Institute of Technology. It outlines the internship's objectives, curriculum, and the skills acquired during the program, including front-end and back-end technologies. The report also includes acknowledgments, a declaration, and a certificate of completion for the internship.

Uploaded by

neekenduku58
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Swamy Kanulla 22BQ1A4274

An Internship Report
On
WEB FULL STACK DEVELOPER
VIRTUAL INTERNSHIP

Submitted for partial fulfillment of the requirements for the award of degree of
Bachelor of Technology
In
Computer Science & Engineering
(Artificial Intelligence and Machine
Learning)
By
Swamy Kanulla
22BQ1A4274

Department of Computer Science & Engineering


(Artificial Intelligence and Machine Learning)
VASIREDDY VENKATADRI INSTITUTE OF TECHNOLOGY
Approved by AICTE, Permanently Affiliated to JNTU, KAKINADA
Accredited by NBA & Accredited by NAAC with ‘A’ Grade
NAMBURU(V), PEDAKAKANI(M), GUNTUR(Dt) -522508

i
Swamy Kanulla 22BQ1A4274

Department of Computer Science & Engineering


(Artificial Intelligence and Machine Learning)
VASIREDDY VENKATADRI INSTITUTE OF TECHNOLOGY
Approved by AICTE, Permanently Affiliated to JNTU, KAKINADA
Accredited by NBA & Accredited by NAAC with ‘A’ Grade
NAMBURU(V), PEDAKAKANI(M), GUNTUR(Dt) -522508

DECLARATION

I, Swamy Kanulla here by declare that the course entitled WEB FULL STACK
DEVELOPER VIRTUAL INTERNSHIP done by me at Vasireddy Venkatadri Institute of
Technology is submitted for partial fulfillment of the requirements for the award of credits in
Department of CSM. The results embodied in this have not been submitted to any other
university for the same purpose.

Date: Swamy Kanulla

Place: Guntur 22BQ1A4274

Signature of the Candidate

ii
Swamy Kanulla 22BQ1A4274

VASIREDDY VENKATADRI INSTITUTE OF TECHNOLOGY


Computer Science & Engineering
(Artificial Intelligence and Machine
Learning)

CERTFICATE

This certificate attests that the following report accurately represents the work
completed by Purni Subramanyam registration number 22BQ1A42D0 during the academic
year 2024-2025, covering the time period from July 2024 to September 2024 as part of the
Web Full Stack Developer Virtual Internship programme By Eduskills Academy.

Signature of the Internship Coordinator Signature of the


HOD Mrs. M. Lavanya Dr. K. Suresh
Babu
(Asst Prof., Department of CSM) (Prof., Department of CSM)

iii
Swamy Kanulla 22BQ1A4274

Eduskills with VVIT:

iv
Swamy Kanulla 22BQ1A4274

LETTER OF UNDERTAKING

To

The Principal

Vasireddy Venkatadri Institute of

Technology Namburu,

Guntur.

Sub: Submission of internship report on Web Full Stack Developer Virtual Internship
on Eduskills platform.

Dear Sir,

I am pleased to submit my report on “Web Full Stack Developer Virtual


Internship” as per your instruction to fulfil the requirements of the Degree of Bachelor of
Technology in CSM from Jawaharlal Nehru Technological University, Kakinada. While
preparing this report, I have tried my level best to include all the relevant information,
explanations, things I learned from the Internship Courses, my contribution to this
programme to make the report informative and comprehensive. It would not have been
possible to complete this report without your assistance, of which I am very thankful.
Working for two months on Alteryx data analytics process automation virtual internship in
online was amazing and a huge learning opportunity for me. Also, it was a great experience to
prepare this report and I will be available for any clarification, if required. Therefore, I pray
and hope that you would be kind enough to accept my Internship Report and oblige thereby.

Yours Obediently,

Swamy Kanulla

ID:22BQ1A42744

EMAIL: [email protected]

v
Swamy Kanulla 22BQ1A4274

CERTIFICATE OF INTERNSHIP

vi
Swamy Kanulla 22BQ1A4274

CERTIFICATE OF LONGTERM INTERNSHIP

vii
Swamy Kanulla 22BQ1A4274

ACKNOWLEDGEMENT

We take this opportunity to express our deepest gratitude and appreciation to all those people
who made this Internship work easier with words of encouragement, motivation, discipline,
and faith by offering different places to look to expand my ideas and help me towards the
successful completion of this Internship work.

First and foremost, we express our deep gratitude to Mr. Vasireddy Vidyasagar,
Chairman, Vasireddy Venkatadri Institute of Technology for providing necessary
facilities throughout the Computer Science & Engineering program.

We express our sincere thanks to Dr. Y. Mallikarjuna Reddy, Principal,


Vasireddy Venkatadri Institute of Technology for his constant support and cooperation
throughout the Computer Science & Engineering program.

We express our sincere gratitude to Dr. K. Suresh Babu, Professor & HOD, Artificial
Intelligence and Machine Learning, Vasireddy Venkatadri Institute of Technology for his
constant encouragement, motivation and faith by offering different places to look to expand
my ideas.

We would like to express our sincere gratitude to our VVIT INTERNSHIP I/C Mr.
Y.V. Subba Reddy, SPOC and our Internship Coordinator Mrs. M. Lavanya for his
insightful advice, motivating suggestions, invaluable guidance, help and support in successful
completion of this Internship.

We would like to take this opportunity to express our thanks to the teaching and
non- teaching staff in the Department of Computer Science & Engineering (Artificial
Intelligence and Machine Learning), VVIT for their invaluable help and support.

Swamy Kanulla,

22BQ1A4274

viii
Swamy Kanulla 22BQ1A4274

ABSTRACT

The Web Full Stack Development Virtual Internship program is designed to equip participants
with a holistic understanding of modern web development principles and practices. The
curriculum spans both front-end and back-end technologies, offering exposure to user
interface frameworks, server-side programming, and database integration. Participants gain
foundational knowledge of key web technologies, such as HTML, CSS, JavaScript, and
frameworks like React or Angular, alongside backend languages like Node.js, Python, or Java.
This experience enables interns to understand the architecture of complete web applications,
covering client- server interactions, API development, and responsive design principles for
seamless user
experiences across platforms.

Interns will explore the intricacies of full stack application development, learning to design,
integrate, and deploy dynamic websites and web applications. The program emphasizes hands-
on project work, allowing participants to build scalable solutions that incorporate cloud
platforms, RESTful APIs, and version control systems such as Git. Essential concepts such as
database design (SQL and NoSQL), authentication, state management, and security best
practices are also covered, preparing interns to tackle both practical and theoretical challenges.
Debugging and troubleshooting methodologies are taught to address common issues in web
development, enhancing problem-solving skills required for professional growth.

The goal of the internship is to equip participants the practical skills and conceptual
understanding necessary to design, develop, and maintain robust web applications. The
program aims to foster a strong foundation, enabling interns to make significant contributions
to the software development ecosystem. Graduates will be well-prepared to pursue careers in
full stack web development or continue their learning journey, applying their new expertise in
innovative software solutions for a diverse range of industries

ix
Swamy Kanulla 22BQ1A4274

Table of contents:
EDUSKILLS WEB FULL STACK DEVELOPER VIRTUAL INTERNSHIP

MODULES CONTENTS DATE PAGE NO

1. HTML • Internet Basics 13-07-24 1–6


• HTML Fundamentals
• Tables
• Lists
2. CSS • Selectors 20-07-24 7 - 10
• Box Model
• Display
• Position
3. Javascript • Variables 27-07-24 11 - 15
• Data types
• Operators
• Functions
• Control Structures
4. Tailwind CSS • Introduction 03-08-24 16 - 19
• Advantages
• Background Classes
& shades
• Element sizing
• Padding and Margins
• Text styles
• Borders
• Flex Box
• Responsive design

5. Version Control • GitHub Repository 17-08-24 20 - 23


• Git Basics
• Git tags and releases
• Project Management
on GitHub
• Repository Settings
6. Web Hosting • Types of Hosting 24-08-24 24 - 30
• Domain/Domain Name
• Steps for Hosting
Swamy Kanulla 22BQ1A4274

7. SQL • Overview of 7-09-24 31 - 34


Database and
relational database
• Introduction to MYSQL
• CRUD operations
• Indexing & Optimisation
• Procedures & Functions
• Security
8. MongoDB ❖ Introduction and Setup 14-09-24 35 - 40
• What is MongoDB?
• Installing MongoDB
• Key Concepts
❖ CRUD Operations
• Creating Database
and Collections
• Inserting documents
• Querying documents
• Updating Documents
• Deleting Documents
• Indexing
❖ Aggregation and
Data Modelling
• Aggregation framework
• Examples of aggregation
• Data Modelling
Swamy Kanulla 22BQ1A4274

AICTE INTERNSHIP WEEKLY REPORT


Department of CSM, VVIT

Student Roll Number : 22BQ1A4274

Student Name : Swamy Kanulla


Branch : CSM

Year of Study : 4th


AICTE Student Profile ID : STU6413172aba10b1678972714

AICTE Regd. E-Mail ID : [email protected]


Contact Number : 8328455488

Internship Course Taken : EDUSKILLS WEB FULL STACK DEVELOPER

Weeks & Dates Objective of the Learning Outcome Student Signature


Activity Done

Week-1

Week-2

Week-3

Week-4
Swamy Kanulla 22BQ1A4274

Week-5

Week-6

Week-7

Week-8

Week-9

Week-10
Swamy Kanulla 22BQ1A4274

Module-1: HTML

HTML (Hyper Text Markup Language):


The standard markup language for creating web pages. It structures the content on the web.

Internet Basics
Introduction to the Internet
• Internet provides a global network, where interconnected nodes are accessible to
organizations and individuals through communication devices and media. A node
refers to any device, such as a computer, tablet, or smartphone that is part of a
network. A network is formed when two or more computers are connected wired or
wirelessly to share resources and information.
• Currently, Internet of Things (loT) encompasses the growth of devices connecting to
a network, ranging from televisions to household appliances. Data transfer lines in
networks facilitate the transfer of data between different computers. The Internet is
the backbone consists of high-speed data transfer connections that interconnect major
computer systems worldwide. (Server, cloud ... etc.)

Domain Name System (DNS)


• DNS or Domain Name System, serves as the Internet's equivalent of a phonebook.
While humans access information online through easily memorable domain names
like google.com or eduskillsfoundation.org, web browsers communicate through less
user- friendly Internet Protocol (IP) addresses. DNS plays a crucial role in translating
these human-readable domain names into machine-friendly IP addresses, enabling
browsers to load the desired Internet resources.
• In the intricate process of DNS resolution, a hostname (e.g ., www.example.com) is
converted into a corresponding IP address (e.g ., 192.168.1.1).
• Point to remember, An Internet Service Provider (ISP) is a company with a
permanent connection to the Internet backbone, enabling it to provide access to the
internet for users.
• Similar to how a home address guides us to a specific home, an IP address is essential
for locating a particular device/server on the Internet. When users wish to access a
webpage/website, there must be a translation between what they input into their web
browser (e.g ., example.com) and the machine-friendly address required to locate the
desired webpage.

HTML Fundamentals
What is HTML?
HTML, which stands for Hyper Text Markup Language, is the basic code used to create
web pages. It defines the layout and structure of a webpage through a set of elements.
These elements instruct the browser on how to present content, such as headings,
paragraphs, links, and more.

1
Swamy Kanulla 22BQ1A4274

HTML Evolution:
HTML 1.0
(1991):
This is where it all began. The first version of HTML was introduced by Tim Berners-Lee
in 1991.It was a simple markup language used to create basic documents with headings,
paragraphs, and links. Think of it as the foundational stage, where the web was just
starting to take shape.
HTML 2.0 (1995):
The second version brought improvements and added new features. It introduced
attributes like "align" for better control over page elements. Tables were introduced,
allowing for better organization of content.
HTML 3.2 (1997):
HTML 3.2 expanded further on the capabilities of the language. This version introduced
support for scripting languages like JavaScript. It also added new elements like the table
caption and improved support for forms.
HTML 4.01 (1999):
HTML 4.01 was a significant step forward in standardizing the language. It introduced
style sheets, allowing for better control of page layout and design. The concept of frames
for dividing the browser window into multiple sections was also introduced.
XHTML (2000):
XHTML (extensible HyperText Markup Language) was introduced to make HTML more
compatible with XML(extensible Markup Language). It followed stricter syntax rules and
aimed for a cleaner, more organized code structure.
HTML5 (2014): (currently in use)
HTML5 marked a major milestone in the evolution of HTML.

HTML Elements
• HTML is the primary language for crafting web documents, and these documents
typically bear the file extensions .html or .htm. In HTML, tags are strings enclosed by
the symbols "<" and ">." For instance, an opening tag is represented as <html>, and
its corresponding closing tag is </html>.
• Now let's try to understand the below basic HTML code shown in Fig-1.

Fig-1: Code and output on HTML elements


• The <! DOCTYPE html> declaration indicates that the document follows the
HTML5 standard.
• The <html> element serves as the root element for an HTML page.

2
Swamy Kanulla 22BQ1A4274

• The <head> element contains meta information related to the HTML page.
• The <title> element specifies the title displayed in the browser's title bar or tab.
• The <body> element encapsulates all visible content, including headings,
paragraphs, images, links, tables, lists, etc.
• The <h1> element denotes a large heading.
• The <h2> element denotes a medium heading
• The <p> element is used to define a paragraph.

Understanding more HTML tags:


• < br> tag defines a line break, and is an empty element without a closing tag.
• < meta> tag provides metadata about the HTML document such as descriptions
and keywords for search engine.
• < table> tags are used to create tables.
• < img> tags are used to insert images.
• <!-..-- > tag is used to write comments.

Tables
Understanding HTML Table Structure
HTML tables allow web developers to arrange data into rows and columns in a webpage.
• <table>: Specifies the creation of a table.
• <th>: Designates a header cell within a table.
• <tr>: Identifies a row within a table.
• <td>: Specifies a cell within a table.
• <caption>: Provides a caption for a table.
• <colgroup>: Specifies a set of one or more columns in a table, facilitating formatting.
• <col>: Defines properties for each column within a <colgroup> element.
• <thead>: Groups the content related to the header in a table.
• <tbody>: Groups the content related to the body in a table.
• <tfoot>: Groups the content related to the footer in a table.
Table Borders:
To add Basics border we will be using the CSS border property on <table>, < th>, and
<td> elements.
Syntax:
table, th, td{
border : 2px solid black;
}
Let use see an example code in Fig-2.1 and its output in Fig-2.2.

3
Swamy Kanulla 22BQ1A4274

Fig-2.1: Code on Table Border

Fig-2.2: Output of above code


The border attribute in the <table> tag is used to control the width of the table border.
Let’s see table border example for the code given in Fig-2.3 and its output is shown in Fig-2.4.

Fig-2.3: Border example for table

4
Swamy Kanulla 22BQ1A4274

Fig-2.4: Output of above code


Lists
Numbered List: A list that can be either numbered or ordered is referred to
as a numbered/ordered list.
Tags utilized to construct an ordered list include:
• < ol>
• < li> tag Defines an individual list item.
Should be employed as a subordinate tag of either the <OL> or <UL> tag.
<ol> tag defines an ordered list.
• The ordered list can feature numerical or alphabetical sequencing.
• Attributes within the <ol>
tag include: 1)start
2)type
Lets see an example code and its output in Fig-3:

Fig-3: Code and Output of <ol> list


Type Attribute:
Indicates the type of marker to utilize in the list.
Acceptable values for the Type Attribute include:
1. A: Uppercase letters
2. a: Lowercase letters
3. I: Uppercase Roman letters
4. i: Lowercase Roman letters
5. 1: Standard numbers (default)
Let’s see an example code using type attribute in Fig-4.

5
Swamy Kanulla 22BQ1A4274

Fig-4: Code and output of type attribute

Bulleted List: List of items prefixed with bullets is called Bulleted /Unordered List.
<ul> tag defines an unordered list. In short, an unordered list items will be marked with
bullets. Let’s see an example for bulleted list in Fig-5.

Fig-5: Code and output of Bullete

6
Swamy Kanulla 22BQ1A4274

Module-2: CSS

About CSS
1. CSS Syntax:
CSS (Cascading Style Sheets) is used to style HTML elements on a webpage. To
apply styles, you use a selector to target the HTML element you want to style.
2. CSS Selector:
The selector is like a pointer that indicates which HTML element you want to
style. For example, if you want to style all paragraphs, you use the selector p.
3. Declaration Block:
The declaration block is where you define the styles for the selected
HTML element. It is enclosed in curly braces {}.
4. Declarations:
Inside the declaration block, you have one or more declarations separated by semicolons.
Each declaration consists of a CSS property name and a value, separated by a colon.

Selectors
Simple selectors:
1. Element Selector: Selects HTML elements by their name.
Example: p {
//style
}
2. Class Selector: Selects elements with a specific class attribute.
Example: .class_name{
//style
}
3. ID Selector: Selects a specific element by its ID attribute.
Example: #id{
//style
}
4. Attribute Selectors:
1. Attribute Exists Selector: Selects elements with a specified attribute.
Example:
[target]{
//style
}
2. Attribute Value Selector: Selects elements with a specific
attribute value. [type=’text’]{
//style

7
Swamy Kanulla 22BQ1A4274

4. Pseudo-Class Selectors:
Pseudo-class selectors are used to select and style elements based on their state or
position in the document structure. They are denoted by a colon (:) followed by the
pseudo-class name. Here are some commonly used pseudo-class selectors:
1. : hover- Selects and styles an element when the mouse is over it.
Example :
button:hover{ color:r
e d;
}
2. :active: Selects and styles an element when it is being activated (e.g., clicked).
Example:
button:active{ color:g
r een;
}

CSS Box Model


Note: All HTML elements can be considered as boxes.
The concept of the "box model" in CSS pertains to the design and layout of elements. It
involves a rectangular structure that envelops each HTML element. The fundamental
components of the CSS box model include content, padding, borders, and margins. The
diagram below visually represents the hierarchical arrangement of these elements within the
box model.
The box model is shown in Fig-6.

Fig-6: Box model

8
Swamy Kanulla 22BQ1A4274

Explanation:
• Content: This refers to the internal area of the box where text and images are displayed.
• Padding: It defines the space between the content and the border. Essentially, it clears
an area around the content. The padding is transparent, allowing the background to
show through.
• Border: A border surrounds both the padding and the content, providing a visual
distinction. It defines the outermost boundary of the box.
• Margin: The margin is the transparent space outside the border. It clears an area
around the border, separating the element from its neighbouring elements or the outer
container.
• The box model allows us to add a border around elements, and to define space
between elements.
Display in CSS:

The display property defines how an element is displayed. It can alter the default behaviour of
an element, making it block, inline, or other display types.
Syntax:
selector{
display: value;
}
Common Values:
• block: The element will generate a block-level box.
• Inline: The element will generate an inline box.
• Inline-block: The element will generate an inline-level block container.
• none: The element is not displayed.
• flex: The element becomes a flex container.
• grid: The element becomes a grid container.
Let’s see an example code for display property in Fig-
6.

Fig-6: Code for using display property

9
Swamy Kanulla 22BQ1A4274

Position in CSS:
The position property is used to control the positioning of an element within its containing
element.
Syntax:
Selector {
Position : value;
}
Common Values:
• static: Default value. Elements are positioned according to the normal flow of
the document.
• relative: Positioned relative to its normal position.
• absolute: Positioned relative to its nearest positioned ancestor (if sticky
{any), otherwise relative to the initial containing block.
• fixed: Positioned relative to the browser window or the device screen.
• sticky: A hybrid of relative and fixed positioning. The element is treated as
relative positioned until it crosses a specified point, then it is treated as fixed
positioned.
• Let’s see an example for using the position property to style our html elements in
the below given figure (Fig-7).

• Fig-7: Code for using position property

10
Swamy Kanulla 22BQ1A4274

Module-3: JavaScript

JavaScript is a high-level, interpreted programming language that is primarily used to create


interactive effects within web browsers. It allows developers to manipulate web page content,
respond to user actions, and dynamically update the page without reloading. JavaScript is
essential for modern web development, enabling functionalities like form validation,
interactive maps, and animations.
JavaScript (JS) is a cross-platform, object-oriented programming language used by developers to
make web pages interactive. It allows developers to create dynamically updating content, use
animations, pop-up menus, clickable buttons, control multimedia, etc.

Embedding to HTML
To insert a script in an HTML document, use the <script> tag. Use the type attribute to define the
scripting language.
<! DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<script type="text/javascript">
document.write("hello
World");
</script>
</body>
</html>
• The two forward slashes(//) are a JavaScript comment symbol.
• Prevent the JavaScipt from trying to compile the line.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script type="text/javascript">
// document.write("hello World");
</script>

11
Swamy Kanulla 22BQ1A4274

</body>
</html>
External JavaScript
Write a script in an external file, and save with .js file extension.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<script src="script_file.js"></script>
</body>
</html>

Variables
A Variable is a named item in a program that stores a data value. You can introduce
variables in your code by declaring them. Declaring a variable tells the JavaScript
interpreter to reserve memory space for the variable.
To declare a JavaScript variable, use the statement :
var variable_name = value;
Variables declared within a function is called local
• Is accessible only with in the function
• Is destroyed when the function exits
• Variables declared outside the function is called global
• Is accessible
anywhere Datatypes
• You must declare a variable before using it.
• JavaScript variables
• Numeric
• String
• Boolean
• Null
Numeric value is any number, such as 13,22.5 ,- 3.1456 etc. Text string is any group of
text characters such as "Hello" or "Happy Holidays!", must be enclosed within either
double or single quotations .Boolean Values accepts only TRUE or FALSE value. NULL
value has no value at all.

12
Swamy Kanulla 22BQ1A4274

Operators:
Arithmetic Operators: +, -, *, /, %, ++, --
Assignment Operators: =, +=, -=, *=, /=,
%= Comparison Operators: ==. !=, >, <,
<=, >= Logical Operators: &&, ||, !

Functions
A function is a collection of commands that performs an action or returns a value. A
function name identifies a function.
Syntax:
function function_name(argument1,argument2,etc)
{
some statements;
}
Use return statement to return a value to the calling expression. function result(a,b)
{
c=a+b;
return
c;
}
1. Flow with control Structure

If and If......else statement


Syntax:
if (condition)
{
code to be executed if condition is true
}
Syntax:
if (condition)
{
code to be executed if condition is true
} else {

13
Swamy Kanulla 22BQ1A4274

code to be executed if condition is false


}
Example:
<script type="text/javascript">
//If the time on your browser is less than 10,
//you will get a "Good morning"
greeting. var d=new Date() var
time=d.getHours() if (time<10)
{
document.write("<b>Good morning</b>")
} else
{ document.write("Goo
d day!")
}
</script>
1. Switch Statement Syntax:
switch (expression)
{
case label1:
code to be executed if expression = label1 break
case label2:
code to be executed if expression = label2 break
default:
code to be executed if expression is different from both label1 and label2
}
Example:
<script type="text/javascript">
//You will receive a different greeting based on what day it is.
// Note that Sunday=0, Monday=1, Tuesday=2, etc.

14
Swamy Kanulla 22BQ1A4274

var d=new Date() theDay=d.getDay() switch (theDay)


{
case 5:
document.write("Finally Friday");

break case 6:
document.write("Super Saturday");
break
case 0: document.write("Sleepy
Sunday"); break
default: document.write("I'm looking forward to this weekend!")
}
</script>

3 Looping

While Syntax:
While
(Condition){ Code
to
be executed
}
The block of code will executed until the condition is false.
Do..while
Syntax:
do
{
Code to be executed
} while (condition)
The block of code will be executed until the condition is false.
For
Synt
ax:
For (initialization , condition , increment)
{
Code to be executed

15
Swamy Kanulla 22BQ1A4274

16
Swamy Kanulla 22BQ1A4274

Module-4:Tailwind CSS
Introduction
• The first release of Tailwind CSS came in 2017. It was accepted that the
development is much faster with this new framework.
• Tailwind is known as the Utility-First CSS Framework.
• In this framework, you are not required to write a lot of CSS code. Instead, you will
be creating many classes for the HTML elements.
• It is highly flexible for transferring the look and feel of the element on the website.

Advantages of Tailwind CSS


• No need for huge CSS files with custom CSS
• Easy to make design changes right from the view files
• Better developer experience
• Mobile-first designs from the start
• Designed with defaults for a polished and designed look and feel
• Easily customizable with the config file.

Background classes & shades


• This set of classes change the background color of an element using a scale of
100- 900 for shades and a palette of over 90 shades.
• Syntax: .bg-*-{100-900}
{} An example is shown in Fig-8.

Fig-8:Background class and shades example

Element sizing
• All of the numbers in Tailwind are based around the rem unit of measurement.
• 1 rem is equal to the size of the base font of the document. As an example, if the base
font size is 16px then 1 rem is equal to 16px and we can deduce that 1. 25 rem is
equal to 20px. To help with these fractional numbers, Tailwind's numbered classes are
multiplied by 4 to avoid having numbers with decimal places.
Sizing with classes
• Syntax: .w-*{},.h-* {}
• Available sizes in REM{0, 1, 2, 3, 4, 5, 6, 8, 10, 12,16, 20, 24, 32, 40, 48, 56, 64}
• Sizing in percentages 1/2... 1/{3, 4, 5, 6, 12)
• Sizing utilities {screen, full}

17
Swamy Kanulla 22BQ1A4274

Padding and margins


• These classes add padding and margin to an element using the Tailwind
numbering system.
• Example: .p-*{},.m-*{}, .p{x,y}-*{},.m{x,y}-*{}

Styling Text
Font styling is a huge part of any design and Tailwind has plenty of classes that we can use to
style the text on our apps. It even includes utility classes for transformations like uppercase.
.font-sans, .font-serif {}, .font-mono {}
Sizing
▪ .text-xs {}
▪ .text-sm {}
▪ .text-base{}
▪ .text-lg{}
▪ .text-xl {}
▪ .text-Zxl {}
▪ .text-3xl {}
▪ .text-4xl {}
▪ .text-5xl {}
▪ .text-6xl {}
Text Align
▪ .text-left {}
▪ .text-center{}
▪ .text-right {}
▪ .text-justify{}
Text Color
▪ .text-{color}-{shade(100-900)} {}
Font Weight (Bold)
• .font-hairline{} // 100
• .font-thin{} // 200
• .font-light{} // 300
• .font-normal{} //0
• .font-medium{} // 500
• .font-semibold {} // 600
• .font-bold{}// 700
• .font-extrabold {} // 800
Borders
These classes will color, stylize and add radius to any border or corners.
.border {} // 1px
.border-0 {} //0
.border-2 {} //2px
.border-4 {} //4px
border-8 {} // 8

18
Swamy Kanulla 22BQ1A4274

Flexbox
Tailwind uses Flexbox for the layout of items on the document. Flexbox is a css display property
that defines a flex container. Once a container has been assigned as a flex container, we can
use all of the alignment utility classes to achieve the desired look.

Default direction - horizontal alignment


• .justify-start{}
• .justify-center{}
• .justify-end {}
• .justify-between{}
• .justify-around{}
Flex Direction
• .flex-row {}
• .flex-row-reverse{}
• .flex-col {}
• .flex-col-reverse{}
Wrapping
• .flex-no-wrap{}
• .flex-wrap {}
• .flex-wrap-reverse{}
Responsive Design
All modern applications should be able to responsively fit into the screen size.
Tailwind is a mobile-first framework, meaning that all of the classes that we have talked about
thus far, are for mobile and trickle up to desktop. But we can change this with a couple of
modifiers.
Default breakpoints [all] // 0px
• .sm: // 640px
• .md: // 768px
• .Ig: // 1024px
• .xl: // 1280px

Default responsive classes


• .sm:bg-* {} // background color
• .sm:w-* {} // width
• .sm:h-* {} // height
• .sm:p-* {} // padding
• .sm:m-* {} // margin
• .sm:font-sans {} //fontfamily - sans, serif, mono
• .sm:text-lg {} // font size - xs, sm, base, lg, xl, {2-6}xl
• .sm:text-left {} // left, center, right, justify
• .sm:text-{color}-{shade(100-900)} {} // text color
sm:font-bold {} // font
weight
• .sm:tracking-tighter {} //letter spacing
• .sm:leading-tight {} // line spacing/height
• .sm:uppercase {} // text transform
• .sm:border-{color}-{shade (100-900)} // border color

19
Swamy Kanulla 22BQ1A4274

• .sm:border-{style} {} // border style


• .sm:border-width} {} // border width
• .sm:rounded-{size} {} // border radius
• .sm:{display} {} // block, inline, flex, table, hidden...
• .sm:flex {} // display flex
• .sm:flex-{collrow} {} // flex

20
Swamy Kanulla 22BQ1A4274

Module-5: VERSION CONTROL


What is Version Control?
Version control, also known as source control, is the practice of tracking and managing
changes to software code. Version control systems are software tools that help software
teams manage changes to source code over time.
Version control systems record changes in a special database called a repository. Each change
to the code is called a commit or revision. Each revision is assigned a unique ID which
allows referencing and rolling back to specific versions later on.

Benefits Of using Version Control


• Collaboration - Version control enables multiple developers to work on the same
codebase simultaneously without interfering with each other's work. Changes made by
different developers can be merged intelligently.
• History and Versioning - Version control maintains logs of all changes made to the
code, who made the changes, and when they were made. Developers can refer back to or
restore previous versions of the code.
• Restore and Rollback - If bugs are introduced, developers can revert the codebase back
to a previous known good state. Files can also be restored after accidental deletion or
corruption. Branching - Branches allow developers to work on new features or test
out bug fixes in isolation. Multiple branches can be created for different streams of
work to avoid disrupting the main code.
• Traceability - Detailed logs show who made what changes when, improving transparency
and accountability. Finding the root cause of issues becomes easier.
• Integrations - Version control integrates well with other DevOps tools like bug
tracking, CI/CD, automated testing etc. This leads to more efficient
development workflows.
• Faster Onboarding - New team members can get up to speed by looking at the
code history and changes made by other developers.
• Code Reviews - Code reviews and approvals become easier by looking at changed lines
and associated explanations.
• Experimental Edits - Developers can experiment boldly with changes. If the changes
do not work out, they can simple rollback without side effects.
• Disaster Recovery - Version controlled code repositories act as backup stores if code
is lost due to system failures, human errors etc.
• Summary:
• To summarize, version control is essential for collaborating and managing changes when
building software. It provides key capabilities like history, backups, collaboration and
branching to enable developers build software more efficiently.

GitHub Repository
1. Git:
GitHub is built on top of Git, a distributed version control system. Git allows multiple
developers to work on a project simultaneously without interfering with each other's work. 2. 2.
2. Repository:
In GitHub, a repository (repo) is a collection of files and the entire history of changes to

21
Swamy Kanulla 22BQ1A4274

Those files. Repositories can be public or private, depending on whether you want to
share your code with the public or keep it private.
3. Collaboration:
GitHub facilitates collaboration by enabling multiple developers to work on the same
project. Developers can clone a repository, make changes, and then submit those
changes for review and incorporation into the main codebase.
4. Branching:
Developers can create branches to work on features or fixes independently.
Branches allow for parallel development without affecting the main codebase
until changes are ready to be merged.
5. Pull Requests:
Pull Requests (PRs) are proposed changes submitted by a developer who has made
changes in their branch.PRs are reviewed by others, and once approved, the
changes can be merged into the main branch.
Issues:
GitHub Issues are used to track and discuss tasks, enhancements, bugs, or other types of
questions or problems within a repository. Issues can be assigned to specific individuals and
labelled for better organization.

Importance of GitHub
1. Code Versioning:
GitHub provides a robust version control system, allowing developers to track changes,
revert to previous states, and collaborate effectively.
2. Collaboration and Teamwork:
GitHub enables seamless collaboration among team members, fostering a sense of
community and teamwork.
3. Code Review:
Pull Requests and code reviews on GitHub ensure that changes are thoroughly examined
before merging into the main codebase, maintaining code quality.
4. Documentation:
GitHub repositories often include documentation, README files, and wikis that provide
crucial information for users and developers.
5. Continuous Integration/Continuous Deployment (CI/CD):
GitHub integrates with CI/CD tools, automating testing and deployment processes for
increased efficiency and reliability.
6. Open Source Contributions:
GitHub is a hub for open-source projects, allowing developers worldwide to contribute
to various projects and learn from each other.
7. Project Management:
GitHub offers project management tools such as boards, milestones, and labels, helping
teams organize and prioritize tasks.
8. Community Support:
Developers can seek help, share knowledge, and collaborate with the broader
community through discussions, issues, and contributions.

22
Swamy Kanulla 22BQ1A4274

Note: GitHub is a powerful platform that supports collaborative software development,


version control, and project management, making it an integral part of modern software
development workflows.

Manage Codes
1. Git Basics:
Repository (Repo):
A repository is a container for your project and includes all of its files and version history.
To create a new repository, use the git init command locally or create one on GitHub and
clone it to your local machine.
Cloning a Repository:
Use git clone to copy a repository from GitHub to your local machine.
Example: "git clone https://github.com/username/repository.git"
Committing Changes:
After making changes to your files, use git add to stage changes and git commit to save
them to the version history.
Branching:
Create a new branch using git branch and switch to it with git checkout or use git checkout -
b to create and switch in one command.
Example: git checkout-b new-feature
Merging:
Merge changes from one branch into another using git merge.
Pushing Changes:
Upload local changes to GitHub using git
push. Example: git push origin main

2. GitHub Features for Code Management:


Pull Requests (PRs):
Open a pull request to propose changes from your branch to the main branch.
PRs facilitate code review and collaboration.
Code Review:
GitHub's interface allows reviewers to comment on specific lines of code, suggest changes,
and approve or request changes to a pull request.
Branch Protection:
Protect branches to prevent direct commits or force pushes, ensuring that changes go through
the pull request process.
Forks and Upstream:
Fork a repository to create a personal copy. The original repository is referred to as the
"upstream" repository.
Code Searching:
Utilize GitHub's search functionality to find code snippets, files, or specific terms within
repositories
Blame and History:
Use git blame or GitHub's web interface to see who made changes to a specific line of code

23
Swamy Kanulla 22BQ1A4274

3. Git Tags and Releases:


Tags:
Tags are references to specific points in Git history, often used to mark release points.
Create a tag with git tag.
Releases:
GitHub allows you to create releases, associating them with a tag. Releases often include
release notes and downloadable assets.

4. Project Management on GitHub:


Issues:
Use issues to track tasks, bugs, or feature requests. Issues can be assigned, labeled, and
linked to pull requests.
Projects:
GitHub Projects provide boards to organize and prioritize work. They can be used for sprint
planning, bug tracking, and more.
Wiki:
Repositories can have a Wiki for collaborative documentation.

5. Collaboration:
Collaborators:
Add collaborators to your repository with different levels of access (read, write, or admin).
Teams:
Organize collaborators into teams for easier access management.
6. Repository Settings:
Access Controls:
Manage permissions, branch protection, and repository visibility in the repository settings.
Webhooks:
Set up webhooks for events like pushes, issues, or pull requests to trigger external actions.
Git Ignore and Git Attributes:
.gitignore:
Create a .gitignore file to specify files or directories to be ignored by Git.
.gitattributes:
Use gitattributes to control attributes such as line endings and merge strategies.

24
Swamy Kanulla 22BQ1A4274

Module-6: WEB HOSTING

Web hosting refers to the service of providing storage space and access for websites on
servers that are connected to the internet. Web hosting companies offer various plans and
services to store website files, databases, and other resources, making websites accessible to
users worldwide.

What is Web Hosting?

Web hosting is a service that allows organizations and individuals to post a website or web
page onto the Internet.
Web hosting is a necessity for any website - it is the physical location of your website on the
Internet, an online storage center that houses the information, images, video, and other
content that comprises your website.

A web hosting service is a type of Internet hosting service that allows individuals and
organizations to
make their website accessible via the World Wide Web. Web hosts are companies that
provide space on a server owned or leased for use by clients, as well as providing Internet
connectivity, typically in a data center.
Web hosting is the place where all the files of your website live. It is like the home of your
website where it actually lives.
The images briefly describing web host is shown in Fig-9.1

Fig-9.1: Web Hosting


In a nutshell, web hosting is the process of renting or buying space to house a website on the
World Wide Web. Website content such as HTML, CSS, and images has to be housed on a
server to be viewable online.
When a hosting provider allocates space on a web server for a website to store its files, they
are hosting a website. Web hosting makes the files that comprise a website (code, images,
etc.) available for viewing online. Every website you've ever visited is hosted on a server.

25
Swamy Kanulla 22BQ1A4274

Types of Hosting:
1. Shared hosting
Shared hosting is perfect for entry-level website hosting. This is where your website will
be stored on the same server as multiple other websites. With a shared hosting plan, all
domains share the same server resources, such as RAM (Random Access Memory) and
CPU (Central Processing Unit). However, because all resources are shared, the cost of
shared hosting plans are relatively low, making them an excellent option for website
owners in their beginning stages.
2. Virtual private server (VPS) hosting
A VPS hosting plan is the ultimate middle ground between a shared server and a
dedicated server. It's ideal for website owners that need more control, but don't
necessarily need a dedicated server.
VPS hosting is unique because each website is hosted within its own space on the server,
though it still shares a physical server with other users. While VPS hosting provides
website owners with more
customization and storage space, they're still not able to handle incredibly high traffic
levels or spikes in usage meaning that the site performance can still be affected by other
sites on the server.
3. Dedicated server hosting
Dedicated hosting gives website owners the most control over the server that their
website is stored on. That's because the server is exclusively rented by you and your
website is the only one stored on it. This means that you have full root and admin access,
so you can control everything from security to operating system that you run.
What is Domain/ Domain Name?
• Domain name is the address of your website that people type in the browser URL bar
to visit your website.
• In simple terms, if your website was a house, then your domain name will be its address.
• A domain name can be any combination of letters and numbers, and it can be used in
combination of the various domain name extensions, such as .com, .net and more.
• The domain name must be registered before you can use it. Every domain name is unique.
No two websites can have the same domain name. If someone types in
www.yourdomain.com, it will go to your website and no one else's.
• The Internet is a giant network of computers connected to each other through a global
network of cables. Each computer on this network can communicate with other
computers.
• To identify them, each computer is assigned an IP address. It is a series of numbers that
identify a particular computer on the internet. A typical IP address looks like this:
66.249.66.1
• Now an IP address like this is quite difficult to remember. Imagine if you had to use such
numbers to visit your favourite websites.
• Domain names were invented to solve this problem.
• Now if you want to visit a website, then you don't need to enter a long string of numbers.
Instead, you can visit it by typing an easy to remember domain name in your browser's
address bar.

26
Swamy Kanulla 22BQ1A4274

For example, www.google.com.


A domain name is unique to your website (just like a fingerprint), and cannot be shared between
different websites.

Steps For Hosting


Step 1: Open website of any hosting company.
With that out of the way, the most popular global registrars include:
• Namecheap
• GoDaddy
• Name.com
• Domain.com
• Bluehost.com
Step 2: Create Your account.
Once you've had a look at the top hosting companies, you need to pick one! There are a number
of features you should consider when choosing a website hosting company.
Below are some of the key factors to consider:
• Uptime
• Support
• Free domain name
• Value for Money
• Bandwidth
• WordPress integration
• Money-back guarantees
The below figure (Fig-9.2) shows GoDaddy website.

Fig-9.2: GoDaddy
Website Step 3: Choose a website hosting plan.
Once you have a host platform you like the look of, you still need to narrow your decision down
to a plan. There are numerous types of hosting (shared, dedicated, VPS, and more), and there
is usually a selection of plan tiers within each type.

27
Swamy Kanulla 22BQ1A4274

Step 4: Register a domain name.


It's all well and good having a plot of internet land, but without an address no one will be
able to find it! That's what a domain name is. It's your digital address.
Google's is www.google.com. You get the idea. Your site will need a domain as well.
Nearly every web hosting provider includes domain name registration in its signup process.
Sometimes it's included as a freebie in the plan you've chosen (GoDaddy and Bluehost, for
example it is shown in fig-9.3).

Fig-9.3: Page for registering domain name


A good domain is simple, easy to remember, and usually number- free. Don't feel bound to the
.com
convention either. More and more sites are playing around with atypical top level domains like
.xyz or .co. So long as it fits with your brand, you'll be fine.
If you already have a domain name it's simply a case of attaching it to your new server.
Many hosting
platforms include this in the signup process and handle it for you.
Step 5: Choose domain from the list.
After login go to visit my account:
The visit my account page is shown in Fig-9.4.

28
Swamy Kanulla 22BQ1A4274

Fig-9.4: visit my account page button


Choose Web Hosting and Manage
The page to choose web hosting is shown in Fig-9.5.

Fig-9.5: Choosing web hosting and manage


Go to File Manager option
After clicking manage the screen appears as shown in Fig-9.6.

Fig-9.6 : Screen after clicking Manage button


In file manager find public html folder
The file manger screen is shown in Fig-9.7.

29
Swamy Kanulla 22BQ1A4274

Fig-9.7: File manager


Then find your domain name folder and open it

Fig-9.8. Choosing files


Choose the upload option and upload all files one-by-one as shown in Fig-9.8.

Fig-9.9: Uploading Files


After Uploading your files are uploaded like this as shown in Fig-9.9.

30
Swamy Kanulla 22BQ1A4274

Open any browser and paste your web address and see the screen shown in Fig-10.

Fig-10: File Manager

31
Swamy Kanulla 22BQ1A4274

Module-7: SQL

SQL, or Structured Query Language, is a standardized programming language used for


managing and manipulating relational databases.

OVERVIEW OF DATABASE AND RELATIONAL DATABASES


What is a Database?
A database is an organized collection of structured information or data, typically stored
electronically in a computer system. It is usually controlled by a database management
system (DBMS), which serves as an interface between the database and its end users or
programs. This allows users to retrieve, update, and manage the data efficiently.
• Understanding Relational Databases
It is a type of DBMS that organizes data into tables consisting of rows and columns. These
tables are related to each other based on common attributes, enabling efficient data
management and retrieval
• Key Concepts in Relational Databases:
Tables: In this, data is stored in the form of tables. Each table consists of rows and
columns where rows represent individual records and columns represents attributes or
fields.
Relationships: It establishes the connection between tables based on shared data. The
most common type of relationship is foreign key-primary key relationship, where data is
one table refers to data in another table.
Normalization: It is the process of organizing data in database to minimize redundancy
and dependency.
Importance of RDBMS
• Data Integrity
• Flexibility
• Scalability
• Security
Here, we understand the database and relational database is the fundamental in today’s data
driven world. RDBMS like MYSQL provide powerful tools for storing, organizing and
retrieving data efficiently.

Introduction to MYSQL
What is MYSQL?
• MySQL is an open-source relational database management system
(RDBMS) developed by Oracle Corporation.
• It uses Structured Query Language (SQL) for database management and is known
for its reliability, speed and ease of use.
• MySQL is widely used for various applications, from small websites to large-
scale enterprise systems.
Key Features of MYSQL
Open Source: It is freely available for use and distribution
Cross-Platform Compatibility: It compatible with various
OS
Scalable: It refers the ability of systems to work easily with small amounts of data, large
32
Swamy Kanulla 22BQ1A4274

amounts of data, clusters of machines.

33
Swamy Kanulla 22BQ1A4274

INSTALLATION OF MYSQL

Download MySQL by visiting official website of


MYSQL https://dev.mysql.com/downloads/.
• Choose the appropriate MYSQL Community server addition for your OS.
• Click on the download button to initiate the download process.

CRUD OPERATIONS:
Creating Databases:
In MYSQL you can create a new database using CREATE DATABASE statement followed
by desired database name.
• CREATE Database: To create a specific
database Ex: CREATE DATABASE database;
• Selecting Database: To work with specific database, you need to select it using the
USE statement
USE database_name;
• Dropping the database: To delete a database and its
contents DROP DATABASE database_name
Exercise caution when you using this command, as it permanently deletes all in specific data
Example for creating table is shown in Fig-11.

Fig-11: Creating table ‘users’


In this, we create a table with table name user and id as a primary key and integer column
with auto-increment attribute, which automatically assigns unique value to each row,
email and name is variable character with the data type var not null means it should not be
empty whereas unique ensures that all the emails are entered into the database differently
In this, we are essential tasks in MYSQL database administration. By mastering these
operations, you can effectively organize and store data in MYSQL database.
Retrieve: Used to retrieve data from table and database.
• RETRIEVE : SELECT col1,col2,…. FROM TABLE_NAME;
Update: Used to update the existing data in table.
• UPDATE: UPDATE table_name SET column1=value1, column2=value2 , …
WHERE condition;
These are CRUD operations to be performed on a table.

INDEXING AND OPTIMIZATION


Indexing: It is a database optimization technique used to improve the speed and efficiency
of the data retrieval operations. An index in the data structure that organizes the values of
one or more columns in a table, allowing for faster lookup and retrieval of data

34
Swamy Kanulla 22BQ1A4274

CREATING AND MANAGING INDEXES:


Creating indexes: you can create an index on one or more columns of a table using
CREATE INDEX statement.
Syntax:
CREATE INDEX index_name ON table_name(column1,…);
Managing indexes: You can manage indexes by creating, dropping, or altering them based on
performance requirements of your database.

QUERY OPTIMIZATION TECHNIQUES:


Use indexes: Ensure that relevant columns are indexed to speed up query execution
Optimize Where Clause: Use appropriate conditions and indexing to filter rows
efficiently EXPLAIN STATEMENT AND QUERY ANALYSIS
EXPLAIN statement: It is used to analyses the execution plan of SQL query. It provides
information about how MYSQL executes the query and helps identify potential
performance. SYNTAX:
EXPLAIN SELECT column1,column2,… FROM table _ name where condition;

STORED PROCEDURES AND FUNCTIONS


Stored Procedures: It is a precompiled collection of SQL statements stored in the database
catalog. It can accept input parameters, perform operations, and return results to calling program.
Syntax:
CREATE [OR REPLACE] PROCEDURE procedure_name[ (parameter [,parameter]) ]
IS
[declaration_section]
BEGIN
executable_section
[EXCEPTION
exception_section]
END [procedure_name];
Function: A function is a subroutine stored in the database catalog accepts that accepts
parameters perform computations, and returns single value.
Syntax:
CREATE [OR REPLACE] FUNCTION function_name
[parameters] [ (parameter_name [IN | OUT | IN OUT] type [, ...])]
RETURN
return_datatype
{IS|AS}
BEGiN
< function_body >
END [function_name];

35
Swamy Kanulla 22BQ1A4274

Security and User Management


• Authentication: Verifies that clients are allowed to connect as a certain user.
• Authorization: Determines what actions an account is permitted to perform
after authentication
• Granting Privilege: you can grant the privilege using GRANT statement
Syntax: GRANT privilege on database _ name.table _ name to ‘username’@’host’
• Revoking privilege: to revoke it from the user to the REVOKE statement
Syntax: REVOKE privilege on database _ name.table _ name to ‘username’@’host’
• Viewing privileges: you can view the privilege assigned to the user using the
SHOW GRANTS statements.
Syntax: SHOW GRANT privilege FOR ‘username’@’host’

Securing the MYSQL Server:


Securing your MySQL database is vital to safeguard sensitive data and maintain application
integrity. Here's how to do it effectively:
• Use Strong Passwords: Make sure all MySQL users have tough, unique passwords with a
mix of characters. Regularly update and rotate passwords for added security.
• Keep MySQL Updated: Always install the latest patches and versions to fix any security
holes. This ensures you're protected against known vulnerabilities.
• Limit User Permissions: Give users only the permissions they need. Avoid using the
powerful root account for everyday tasks. Instead, create specific accounts with restricted
access.
• Enable Firewall Protection: Set up a firewall to control access to your MySQL server.
Only allow connections from trusted sources to prevent unauthorized access.
• Encrypt Your Data: Protect sensitive data both at rest and in transit using encryption
methods like SSL/TLS. This ensures that even if someone gains access, they can't read
the data.
• Regular Backups: Backup your databases regularly and store them securely. In case of
data loss or corruption, you'll have a copy to restore from.
• Monitor and Audit: Keep an eye on your database's activity using monitoring tools.
Regularly review logs for any suspicious behavior that could indicate a security breach.
• Disable Remote Root Access: Prevent remote access to the powerful root account to
minimize the risk of unauthorized access. Instead, use secure methods like SSH tunneling
for remote access.
• Remove Unused Accounts and Databases: Regularly clean up unused accounts and
databases to reduce the potential entry points for attackers. This minimizes the attack
surface and enhances security.

36
Swamy Kanulla 22BQ1A4274

Module-8: MongoDB

Module 1: Introduction and Setup


1. What is MongoDB?
2. Installing MongoDB
3. Key Concepts
1.1 What is MongoDB?
MongoDB is a NoSQL database program that uses a document-oriented data model. Unlike
traditional relational databases, MongoDB stores data in flexible, JSON-like documents.
This allows for more dynamic and scalable data storage, especially useful for handling
large volumes of unstructured data.
Key Features of MongoDB:
• Document-oriented: Stores data in JSON-like documents.
• Schema-less: No fixed schema, allowing for flexible data structures.
• Scalable: Can handle large volumes of data with ease.
• High Performance: Optimized for read and write operations.
• Cross-platform: Available for Windows, MacOS, and Linux

1.2 Installing MongoDB Step-by-Step Installation:


1.Download MongoDB:
Go to the official MongoDB website: MongoDB Download Center Select the appropriate
version for your operating system.
2.Install MongoDB:
Windows:
• Run the downloaded installer (.msi file).
• Follow the on-screen instructions to complete the installation.
MacOS:
• Open the downloaded .tgz file.
• Follow the instructions in the readme file to install MongoDB.
• Alternatively, use Homebrew: brew tap mongodb/brew and then brew
install mongodb- community.
Linux:
• Follow the instructions on the MongoDB website for your specific Linux distribution
(Ubuntu, Debian, CentOS, etc.).
3.Set up MongoDB:
• Create the data directory where MongoDB will store its data. For example, on
Windows, you might use C:\data\db, and on Linux/MacOS, you might use /data/db.
• Make sure the directory has the appropriate permissions
4.Run MongoDB:
• Open a terminal or command prompt.
• Navigate to the directory where MongoDB is installed.
• Start the MongoDB server with the command: mongodb (this will start server).
the database
• In another terminal or command prompt, start the MongoDB shell with the command: mongo

37
Swamy Kanulla 22BQ1A4274

1.3 Key Concepts


1. Databases and Collections:
• Database: A container for collections. Similar to a database in a relational database system.
• Collection: A group of MongoDB documents. Similar to a table in a database system.
2. Documents:
• A document is a set of key-value pairs (similar to JSON objects).
• Example of a document
{
"name": "John Doe",
"age": 30,
"address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA"
},
"hobbies": ["reading", "travelling", "swimming"]
}
3. Schema Design:
• MongoDB is schema-less, meaning it does not require a fixed schema. This
allows for flexibility in storing different types of data. Documents within a
collection can have different fields.
4. CRUD Operations:
a. Create: Insert new documents into a collection.
db.collection.insertOne({name: "John Doe", age: 30});
b. Read: Query documents in a collection. db.collection.find({age: 30});
c. Update: Modify existing documents. db.collection.updateOne({name:
"John Doe"}, {$set: {age: 31}});
d. Delete: Remove documents from a collection. db.collection.deleteOne({name:
"John Doe"});
5. Indexes:
a. Indexes improve the speed of data retrieval operations.
b. Created on fields that are frequently queried.
c. db.collection.createIndex({name: 1});

6. Aggregation:
• Used for processing data and returning computed results.
• Aggregation pipeline: a framework for data aggregation modeled on the concept
of data processing pipelines.
• db.collection.aggregate([
{$match: { age: { $gte: 30 } } },
{$group: {_id: "$age", total: { $sum: 1}}}
]);

38
Swamy Kanulla 22BQ1A4274

Module 2: CRUD Operations and Indexes


• Creating Databases and Collections
• Inserting Documents
• Querying Documents
• Updating Documents
• Deleting Documents
• Indexes

2.1 Creating Databases and


Collections Creating Databases:
• A database is a collection of data organized in a structured way.
• To create a database, you simply need to use the 'use' command database
name followed by the Database name.
use myDatabase;
• This command will create a new database if it does not exist or switch to it
if it does. Creating Collections:
• A collection is analogous to a table in a relational database.
• Collections are created within a database to store documents.
• db.createCollection("myCollection");
• Alternatively, a collection is implicitly created when you insert the first document into it.

2.2 Inserting Documents


• Documents are records in a collection, usually in JSON format.
• To insert a document into a collection: db.myCollection.insertOne({name:
"John", age: 25, city: "New York"});
• This command will add a single document to the myCollection collection.
• You can also insert multiple documents at once.

2.3 Querying Documents


• Querying is used to retrieve data from a collection.
• To find all documents in a collection:
• db.myCollection.find();
• This command returns all documents in myCollection.
• You can also use comparison operators.
• db.myCollection.find({age: {$gt: 25}});
• This command returns documents where the age is greater than 25.

2.4 Updating Documents


• Updating allows you to modify existing documents in a collection.
• To update a single document:
db.myCollection.updateOne({name: "John"},
{$set:
39
Swamy Kanulla 22BQ1A4274

{age:26}});

40
Swamy Kanulla 22BQ1A4274

• This command finds the document where the name is "John" and update the age to 26.
• To update multiple documents:
• db.myCollection.updateMany({city: "New York"},{$set: {city: "San Francisco"}});
• This command updates the city field to "San Francisco" for all where the city is "New York".

2.5 Deleting Documents

• Deleting removes documents from a


collection. To delete a single document:
db.myCollection.deleteOne({name:
"John"});
• This command deletes the first document where the name is
"John". To delete multiple documents:
db.myCollection.deleteMany
({age: {$lt: 25}});
• This command deletes all documents where the age is less than 25.

2.6 Indexes
Indexes improve the speed of query operations on a collection.
• To create an index on a field: db.myCollection.createIndex({name: 1});
• This command creates an ascending index on the name field.
• You can also create a descending index: db.myCollection.createIndex({age: -1});
• This command creates a descending index on the age field.
• Compound indexes can be created on multiple fields:
• db.myCollection.createIndex({name: 1, age: -1});
• This command creates an index on both the name and age fields.

Module 3: Aggregation and Data Modeling


• Aggregation Framework
• Examples of Aggregation
• Data Modeling

3.1 Aggregation Framework


• Introduction to Aggregation Framework
Aggregation in databases involves processing data records and returning computed
results. It's akin to the SQL GROUP BY clause but often more powerful and flexible.
Aggregation operations group values from multiple documents and perform a variety of
operations on the grouped data to return a single result.

Key Concepts
• Stages: Each stage transforms the documents as they pass through the pipeline.
• Pipelines: A sequence of stages through which data is processed.
• Operators: Used within stages to process data (e.g., $match, $group, $sort).

Common Aggregation Stages


41
Swamy Kanulla 22BQ1A4274

• $match: Filters the documents to pass only the ones that match the specified condition(s).
• $group: Groups input documents by a specified identifier expression
and applies the accumulator expressions.
• $sort: Orders the documents.
• $limit: Restricts the number of documents in the output.
Example
[
{"$match": {"status": "active"}},
{"$group": {"id": "$customerId", "total": {"$sum": "$amount"}}},
{"$sort": {"total": -1}},

{"$limit": 10}
]
In this example, we:
• Filter documents with status equal to "active".
• Group by customerId and sum up the amount.
• Sort the results in descending order of total.
• Limit the output to the top 10 customers.

3.2 Examples of Aggregation


Example 1: Calculating Average Age Consider a collection of student
records: [
{"name": "Alice", "age": 23},
{"name": "Bob", "age": 24},
{"name": "Charlie", "age": 22}
]
To calculate the average age:
[
{"$group": {"id": null, "averageAge": {"$avg": "$age"}}}
]
Output:
[ {"_id": null, "averageAge": 23}]
Example 2: Summing Order
Amounts For a collection of orders:
[
{"orderId": 1, "amount": 100},{"orderId": 2, "amount": 150},
{"orderId": 3, "amount": 200}
]
To sum the order amounts:
[
"$group": {"id": null, "totalAmount": {"$sum": "$amount"}}}
]
Output:
[ {"_id": null, "totalAmount": 450}]

42
Swamy Kanulla 22BQ1A4274

3.3 Data Modeling


Introduction to Data
Modeling
Data modeling is the process of creating a data model for the data to be stored in a database.
This model organizes the data and defines the relationships between them. It ensures that the
data is stored in a way that is efficient and can be accessed easily.
Key Concepts
• Entities and Attributes: An entity represents a real-world object, and details about that
entity.
attributes are the
• Relationships: Defines how entities are related to each other.
• Normalization: Process of organizing data to minimize redundancy.

Steps in Data Modeling


• Identify Entities: Determine the main objects (e.g., students, courses).
• Define Relationships: Establish how these entities are related (e.g., in
courses). students enroll.
• Map Attributes: Identify the attributes for each entity (e.g., student
title). name, course.
• Normalization: Organize attributes to reduce redundancy (e.g., separating student
details from course details).
Example
For a university database:
• Entities: Students, Courses, Enrollments
• Attributes:
• Students: studentId, name, age
• Courses: courseId, title, credits
• Enrollments: enrollmentId, studentId, courseId, dateEnrolled
Relationships:
■ A student can enroll in multiple courses.
■ A course can have multiple students.

43
VASIREDDY VENKATADRI INSTITUTE OF TECHNOLOGY
(An Autonomous Institution Affiliated to JNTUK, Kakinada
Approved by AICTE New Delhi - Accredited by NBA,
NAAC with ‘A’ Grade and ISO 9001:2008 Certified)
NAMBUR – 522508, Guntur, AP

SUPERVISOR EVALUATIONOF INTERNSHIP RUBRIC

Student Name:
Host Organization/Company:
Internship Supervisor:
Date of Evaluation:

Note: The external assessment evaluated by the committee consisting of HoD, senior faculty,
supervisor concerned and external Examiner. There shall be no internal marks for Summer
Internship.

External Assessment:
Report Preparation: 20 Marks (40%)
Presentation S Viva-Voce: 30 Marks (60%)

: 50 Marks

The purpose of this assessment is to provide the student intern with constructive feedback on his/her
internship experience. This evaluation form should be completed by the internship site supervisor
or the individual who is most responsible for supervisingthe intern’s work assignments.

The student’s grade is partially based on your evaluation of his/her/their performance on each of
the internship dimensions identified below. Use the evaluation rubric to assess the student’s
performance on each dimension by specifying a score based on the performance ratings and
descriptors delineated in the rubric form. Candid and objective comments about the student’s
performance are also appreciated. Please add your relevant comments in the space provided in
the form.

Quality of Work: The degree to which the student’s work is thorough, accurate, and completed in a
timelymanner.

Ability to Learn: The extent to which the student asks relevant questions, seeks out additional
information from appropriate sources, understands new concepts/ideas/work assignments, and is
willing to make needed changes and improvements.

Initiative and Creativity: The degree to which the student is self-motivated, seeks out challenges,
approaches and solves problems on his/her own, and develops innovative and creative
ideas/solutions/options.
Character Traits: The extent to which the student demonstrates a confident and positive attitude,
exhibits honesty and integrity on the job, is aware of and sensitive to ethical and diversity issues, and
behaves in an ethical and professional manner.

Dependability: The degree to which the student is reliable, follows instructions and appropriate
procedures, is attentive to detail, and requires supervision.

Attendance and Punctuality: The degree to which the student reports to work as scheduled and on-
time.

Organizational Fit: The extent to which the student understands and supports the organization’s
mission, vision, and goals; adapts to organizational norms, expectations, and culture; and
functions within appropriate authority and decision-making channels.

Response to Supervision: The degree to which the student seeks supervision, when necessary, is
receptive to constructive criticism and advice from his/her supervisor, implements suggestions from
his/her supervisor, and is willing to explore personal strengths and areas for improvement.

Supervisor Evaluation of Internship – Grading Rubric


Performance Rating
Evaluation
Dimensions Needs Improvement Meets Expectations Excellent Score
1 2 3 4 5 6
Internship Evaluation Dimensions – Grading Criteria

Work was done in a With a few minor Thoroughly and


careless manner and exceptions, adequately accurately performed
was of erratic quality; performed most work all work
Quality of work assignments were requirements; most requirements;
Work usually late and work assignments submitted all work
required review; made submitted in a timely assignments on time;
numerous errors manner; made made few if any
occasional errors errors

Comments:
Asked few if any In most cases, asked Consistently asked
questions and rarely relevant questions and relevant questions and
sought out additional sought out additional sought out additional
information from information from information from
appropriate sources; appropriate sources; appropriate sources;
Ability to was unable or slow to exhibited acceptable very quickly
Learn understand new understanding of new understood new
concepts, ideas, and concepts, ideas, and concepts, ideas, and
work assignments; was work work assignments;
unable or assignments; was was always willing to
unwilling to recognize usually willing to take
mistakes
and was not receptive take responsibility for responsibility for
to making needed mistakes and to make mistakes and to make
changes and needed changes and needed changes and
improvements improvements improvements

Comments:
Had little observable Worked without Was a self-starter;
drive and required extensive consistently sought
close supervision; supervision; in some new challenges and
showed little if any cases, found problems asked for additional
Initiative and interest in meeting to solve work assignments;
Creativity standards; did not seek and sometimes asked regularly approached
out additional for additional work and
work and frequently assignments; solved problems
procrastinated in normally set his/her independently;
completing own goals and, in a frequently proposed
assignments; few cases, tried to innovative and
suggested no new exceed requirements; creative ideas,
ideas or options offered some solutions, and/or
creative ideas options
Comments:
Regularly exhibited a Except in a few Demonstrated an
negative attitude; minor instances, exceptionally
was dishonest demonstrated a positive attitude;
and/or showed a positive attitude; consistently
lack of integrity on regularly exhibited exhibited honesty and
Character several occasions; honesty and integrity in the
Traits was unable to integrity in the workplace; was
recognize and/or was workplace; was keenly aware of and
insensitive to ethical usually aware of and deeply sensitive to
and diversity issues; sensitive to ethical and diversity
displayed significant ethical and diversity issues on the job;
lapses in ethical and issues on the job; always behaved in
professional behavior normally behaved in an ethical and
an ethical and professional manner
professional manner
Comments:
Was generally Was generally Was consistently
unreliable in reliable in completing reliable in completing
completing work tasks; normally work assignments;
assignments; did not followed instructions always followed
Dependability follow and procedures; was instructions and
instructions and usually attentive to procedures well; was
procedures detail, but work had careful and extremely
promptly or to be reviewed attentive to detail;
accurately; was occasionally; required little or
careless, and work functioned with only minimum
needed constant moderate supervision supervision
follow-up; required
close supervision
Comments:
Was absent Was never absent and Always reported to
excessively and/or almost always on time; work as scheduled with
was almost always late or usually reported to no absences and was
Attendance for work work as scheduled, but always on-time
and was always on time; or
Punctuality usually reported to
work as scheduled and
was almost always on-
time

Comments:
Was unwilling or Adequately Completely
unable to understood and understood and fully
understand and supported the supported the
support the organization’s mission, organization’s mission,
Organizatio- organization’s mission, vision, and vision, and
nal Fit vision, goals; satisfactorily goals; readily and
and goals; exhibited adapted to successfully adapted
difficulty in organizational to organizational
adapting to norms, expectations, norms, expectations,
organizational and culture; and culture;
norms, generally functioned consistently
expectations, and within appropriate functioned within
culture; frequently authority and appropriate authority
seemed to disregard decision-making and decision-making
appropriate channels channels
authority and
decision-making
channels
Comments:
Rarely sought On occasion, sought Actively sought
supervision when supervision when supervision when
necessary; was necessary; was necessary; was
unwilling to accept generally receptive to always receptive to
Response to constructive criticism constructive criticism constructive criticism
Supervision and and advice; and advice;
advice; seldom if implemented successfully
ever implemented supervisor implemented
supervisor suggestions in most supervisor
suggestions; was cases; was usually suggestions when
usually unwilling to willing to explore offered; was always
explore personal personal strengths willing to explore
strengths and areas and areas for personal strengths
for improvement improvement and areas for
improvement
Comments:
Evaluator contentment: Based on the student’s overall performance, a rating will be given
Performance Rating
Good Excellent
1 2

Summary Performance Ratings on Internship


Evaluation Criteria Score
(From above)
Quality of Work
Ability to Learn
Initiative and Creativity
Character Traits
Dependability
Attendance and Punctuality
Organizational Fit
Response to Supervision
Evaluator contentment
Total Score

Overall Performance Evaluation of Student Intern


Outstanding Very Good Satisfactory Marginal Unsatisfactory

Comments:

Yes No
we have reviewed this evaluation with the student intern.

Date of Review
If yes, the date of review:

Comments:

Signature of Committee members:


1.
2.
3.
4.

You might also like