0% found this document useful (0 votes)
12 views43 pages

Hsslive-Xii-Arike Comp App 2025

The document provides an overview of C++ programming, covering fundamental concepts such as tokens, data types, control statements, and functions. It explains the basic structure of a C++ program, including comments, keywords, and modular programming. Additionally, it discusses arrays, string handling, and various input/output operations, along with examples and syntax for clarity.

Uploaded by

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

Hsslive-Xii-Arike Comp App 2025

The document provides an overview of C++ programming, covering fundamental concepts such as tokens, data types, control statements, and functions. It explains the basic structure of a C++ program, including comments, keywords, and modular programming. Additionally, it discusses arrays, string handling, and various input/output operations, along with examples and syntax for clarity.

Uploaded by

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

Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.

in ®

COMPUTER
APPLICATION
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Chapter 1
Review of C++ Programming
Tokens
Fundamental building blocks of C++ program. (Lexical units)

Classification: (POLIK)
1. Punctuators: Special symbols used in C++ program. Eg: # ; ( ] }
2. Operators: Symbols that indicate an operation. Eg: +, <, *, &&
3. Literals(Constants): Constant values used in program.
(a) Integer literals: Whole numbers. Eg: 23, -145
(b) Floating literals: Constants having fractional parts. Eg: 12.5, 1.87E05
(c) Character literals: A character in single quotes. Eg: „a‟, „8‟

Escape sequences are character constants used to represent non graphic


symbols. Eg: „\n,‟ „\t‟

(d) String literals: One or more characters within double quotes. Eg: “a”, “score1”
4. Identifiers: Names given to different program elements.
(a) Variable: Name given to memory location.
(b) Label: Name given to a statement.
(b) Function name: Name given to a group of statements.
Rules to form an identifier:
(a) Can have only alphabets(upper and lower),digits and _(underscore).
(b) Cannot be keywords.
(c) Cannot start with digit.
5. Keyword (Reserved word): They convey a specific meaning to the compiler.
Eg: float, if, break, switch
Data types: Used to identify nature and type of data stored in a variable.
Fundamental datatypes:

Datatype Type of value Memory (bytes) Eg:

void null or empty data 0

char character values 1 „A‟, „\n‟

int integer values 4 84, -4

float real values 4

double Real values(more precision than float) 8 5.6, -89.5

207
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Basic structure of a C++ Program

#include <headerfile> -----> line 1


using namespace identifier; ---->line 2
int main() ---->line 3
{ statements;
:
return 0;
}
Comments
 Comments increase the readability of a program and helps in future program modification.
 It is not considered as the part of program and cannot be executed
Comments

Single line Comments Multiline Comments


// /* */

const Keyword
 The const keyword specifies that the value of a variable does not change throughout the
program.
 syntax :const data type variable_ name = value;
 Eg:constfloat pi=3.14;
Control Statements

 Control statements are used for altering the normal flow of program execution
 They are classified into two

Control Statements

Decision making statements Iteration statements

Decision making statements

 The statements provided by C++ for the selected execution are called decision making statements
or selection statements.

if statement
if...else statement
Decision making
statements

nested if
else if ladder
switch statement

1. if statement conditional operator

208
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

The syntax is:


if (test expression)
{
statement block;
}
If the test expression evaluates to True, the statement block is executed.
2. if...else statement
The syntax is:
if (test expression)
{
statement block 1;
}
else
{
statement block 2;
}
Here, if the test expression evaluates to True, statement block 1 is executed. If the test expression evaluates
to False, statement block 2 is executed.
3. Nested if
An if statement can be placed inside another if – else statement, this is called nesting of if.
If (Mark >=80)
{
If (age>18)
Cout<<”Eligible for higher studies”;
}
else
{
cout <<”Not Eligible”;
}
4 .else…if ladder
The else-if ladder helps to select one of many code blocks for execution.
The syntax is:
if (test expression 1)
statement block 1;
else if (test expression 2)
statement block 2;
else if (test expression 3)
statement block 3;
...............
else
statement block n;
5. switch statement
The switch statement is used to select one of many code blocks to be executed.
The syntax is:
switch(expression)
{
case 1: statement block 1;
break;
case 2: statement block 2;
break;
case 2: statement block 2;
break;
default: statement block n;
}
 The expression is evaluated and statements are executed according to the value.

209
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 If no match is found, then default statement is executed.

Conditional Operator (? :)
 It is a ternary operator (it takes three operands).
 The conditional Operator can be used as an alternative of if... else statement
 The syntax is: Condition? True-part: false-part;
 The condition is true the result is the true part, else the result is the false-part.
 Eg: big = (a>b)? a: b;

Iteration statements
 Iteration statements or looping statements are used to perform repeated execution of a set of one or
more statements.
 C++ provides three looping statements: while loop, for loop and do...while loop.

for loop
Entry control loop

while loop
Iteration/Looping
statements

Exit control loop do..while loop

 Entry controlled loop means condition is executed before loop body. The loop will run only if
condition is true
 Exit controlled loop means condition is executed after loop body. the loop will run at least once
even if condition is true/false
 A Looping statement has four elements:
a) Initialization - statement that gives starting value to loop variable eg:(i=1)
b) Condition – the test expression. eg: (i<=10)
c) updation – statement that changes the value in loop variable eg: (i++)
d) Body of loop- set of statements to execute repeatedly eg:((cout<<i;)

1. while loop
 It is an entry-controlled loop.
 The condition is checked first and if it is found True the body of the loop will be executed.
 The syntax is:

initialization;
while(test expression)
{
body of the loop;
update statement;
}
}
2. for loop
 It is an entry-controlled loop.
 The condition is checked first and if it is found True the body of the loop will be executed.
 The syntax is:

for (initialization; test expression; update statement)

210
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

{
Body of the loop;
}

3. do...while loop
 It is an exit controlled Loop.
 Here, the test expression is evaluated only after executing body of the loop.
 Its syntax is:

initialization;
do
{
body of the loop;
update statement;
} while(test expression);

Nested loop
 Placing a loop inside body of another loop is called nested loop.
 A nested loop contains an inner loop and an outer loop.
 In a nested loop, the inner loop statement will be executed repeatedly as long as the condition of the
outer loop is true.
 Example
for( int i=1; i<=5; i++)
{
for(int j=1; j<=i; j++)
{
cout<< i << " " ;
}
cout<<”\n”
}
Jump statements
 Jump statements transfers program control from one place to another part of a program

Jump statements

break continue goto return


1. break
 break statement is used to terminate a loop or switch statement.
 Example
for (int i=1; i<=10; i++)
{
if (i==5)
break;
cout<<i<<",";
}
its output will be 1,2,3,4
2.continue

211
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 continue statement is executed in a loop it skips the remaining statements in the loop and start next
iteration of the loop.
 Example
for (int i=1; i<=10; i++)
{
if (i==5)
continue;
cout<<i<<",";
}
its output will be 1,2,3,4,6,7,8,9,10
3.goto
 goto statement is used for unconditional jump.
 goto transfers the control from one part of the program to another
 Syntax of goto is
label: ............;
............;
............;
goto label;
............;
 Example
int i=1;
start:
cout<<=10)
goto start
its output will be 1 2 3 4 5 6 7 8 9 10
 exit( ) helps to terminate a program.

CHAPTER 2 - ARRAYS
Array
 Array is a collection of elements of same type placed in contiguous memory location
 Each element in an array can be accessed using its position called index number or subscript.
 An array index starts from 0
 The elements of an array with ten elements are numbered from 0 to 9.

Array declarations
Data_type array name[size];
 where size is the number of memory locations in the array.
 Eg: int a[10] ;

212
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Declares an array of size 10, where the first element is at a[0] and the last element is at a[9].

Array initialization
 Giving values to the array elements at the time of array declaration is known as array initialization.

Eg : int N[10]={12,25,30,14,16,18,24,22,20,28} ;
char word[7]={'V' , 'I' , 'B' , 'G' , 'Y' , 'O' , 'R' } ;
Memory allocation for arrays
Total bytes = size of data type x size of the array
Eg:
o The number of bytes needed to store the array int A[10] is 4 x 10=40 bytes.
o The number of bytes needed to store the array float B[5] is 4 x 5 = 20 bytes.

Array traversal operation


Accessing each element of an array at least once in a program is called array traversal.
String handling using arrays
 A character array can be used to store a string.
 A null character '\0' is stored at the end of the string.
 This character is used as the string terminator.
 Eg: char name[ ]=”Albert Einstein”;

Memory allocation for strings


Memory required to store a string = number of characters in the string + one byte for null
character.

Input/output operations on strings


By using input operator cin>>, we can input only one word.
Eg:
chat str[20] ;
cin>>str;
cout<<str;
If we input Higher Secondary, the output will be Higher.
gets() function is used to input string containing white spaces.
Eg:
chat str[20] ;
gets(str);
cout<<str;
If we input Higher Secondary, the output will be Higher Secondary.
puts() function is used to display a string data on the standard output device (monitor).

CHAPTER 3 - FUNCTIONS
Modular Programming / Modularization
 The process of breaking large programs into smaller sub programs is called modularization.

Merits of Modular programming


 Reduce the size of the program

213
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Reduce program complexity


 Less chance of error
 Improve re usability

Demerits of Modular programming


 Proper breaking down of the problem is a challenging task
 Each sub program should be independent

Function
 Function is a named unit of statements in a program to perform a specific task.
 functions are classified into two types

Functions

Predefined functions /built-in functions User defined functions

Arguments / Parameters
 A parameter is a named variable passed into a function
 Eg: cup=makeCoffee(water,milk,sugar,coffee powder) here makeCoffee is a function name and
water ,milk ,sugar ,coffee powder is arguments

Return value
 The result obtained after performing the task assigned to a function. Some functions do not return
any value
 Built-in functions

Console functions for getchar( )


character I/O
Header file : cstdio putchar( )

get()
Input Function
Stream functions for I/O getline()
operations
Header file : iostream put()
Output Function
write()
strlen()

strcpy()
String functions
strcat()
Header file : cstring
Predefined functions/
strcmp()
built-in functions
strcmpi()

abs()
Mathematical functions
sqrt()
Header file : cmath
pow()

isupper()

islower()

isalpha()
Character functions
isdigit()
Header file : cctype
isalnum()

toupper()

tolower()

214
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

1. Console functions for character I/O


A. getchar( )
 used to input a character
 Header file : cstdio
 Syntax : char variable=getchar( ) ; OR getchar(char variable Name) ;
 Eg: char ch=getchar( ) ; // the character input through the keyboard is stored in the variable
ch
B. putchar( )
 used to display a character
 Header file : cstdio
 Syntax : putchar ( variable Name / character constant )
 Eg: char ch = 'B' ;
putchar(ch) ; // displays B
putchar('C'); // displays C

2. Stream functions for input / output operations


Input Function
A. get( )
 used to input a single character or stream of characters
 Header file : iostream
 Syntax : cin.get(variable Name) ;
 Eg: cin.get(ch) ; // accepts a single character
B. getline( )
 used to input a string
 Header file : iostream
 Syntax : cin.getline(array name , len) ;
 Eg : cin.getline(str,10); // accepts a string of maximum 10 characters
Output function
a) put( )
 used to display a character
 Header file : iostream
 Syntax : cout.put(variable Nameor character constant) ;
 Eg : char ch='B' ;
cout.put(ch) ; // displays B
b) write( )
 used to display a string
 Header file : iostream
 Syntax : cout.write(arrayName , len) ;
 Eg : char str[20]="HELLO FRIENDS" ;
cout.write(str,5) ; // displays HELLO
3. String functions
A. strlen( )
 used to find the length of the string ( number of characters)
 Header file : cstring
 Syntax : int strlen(string) ;
 Eg: strlen("COMPUTER") ; // displays 8
B. strcpy( )
 used to copy a string to another

215
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Header file : cstring


 Syntax : strcpy( string1,string2) ;
 Eg: char name[20],name1[20];
Name=”WOHSS”;
Name1=”pinangode”;
strcpy( Name,Name1) ; // the string Name1 will be stored in the variable Name
cout<<name;//display pinangode
C. strcat( )
 used to append one string to another (join two strings)
 Header file : cstring
 Syntax : strcat(string1,string2) ;

 Eg: char name[20],name1[20];
Name=”WOHSS”;
Name1=”pinangode”;
strcat( Name,Name1) ; // the string Name1 will be append in the variable Name
cout<<name;//display WOHSS pinangode
D. strcmp( )
 used to compare two strings without ignoring cases
 The result will be 0 if two strings are same
 Header file: cstring
 Syntax : strcmp(string1,string2) ;
 Eg: cout<<strcmp("Hello","Hello"); // displays 0
E. strcmpi( )
 used to compare two strings ignoring the cases.
 The result will be same if two strings are same
 Header file : cstring
 Syntax : strcmpi(string1,string2) ;
 Eg : cout<<strcmpi("HELLO" , "Hello") ; // displays 0

4. Mathematical functions
A. abs( )
 used to find the absolute value of a number
 Header file : cmath
 Syntax : int abs( int) ;
 Eg : cout<<abs(-5) ; // displays 5
B. sqrt( )
 used to find the square root of a number
 Header file : cmath
 Syntax : double sqrt(double) ;
 Eg : cout<<sqrt(16) ; // displays 4
C. pow( )
 used to find the power of a number
 Header file : cmath
 Syntax : double pow(double, double) ;
 Eg: cout<<pow(3,2) ; // displays 9

5. Character functions
isupper( )
 used to check whether a character is in upper case(capital letter) or not.

216
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Header file : cctype


 Syntax : int isupper (char) ;
 Eg : cout<<isupper('A') ; // displays 1

islower( )
 used to check whether a character is in lower case(small letter) or not.
 Header file : cctype
 Syntax : int islower (char) ;
 Eg : cout<<islower('A') ; // displays 0

isalpha( )
 used to check whether a character is an alphabet or not.
 Header file : cctype
 Syntax : int isalpha(char) ;
 Eg : cout<<isalpha('B') ; // displays 1
 cout<<isalpha('8') ; // displays 0

isdigit( )
 used to check whether a character is digit or not
 Header file : cctype
 Syntax : int isdigit(char c) ;
 Eg : cout<<isdigit('5') ; // displays 1
 cout<<isdigit('r') ; // displays 0

isalnum( )
 used to check whether a character is alphanumeric or not.
 Header file : cctype
 syntax : int isalnum(char) ;
 Eg : cout<<isalnum('8') ; // displays 1
 cout<<isalnum('+') ; // displays 0

toupper( )
 used to convert the given character into its uppercase.
 Header file : cctype
 Syntax : char toupper(char) ;
 Eg : cout<<toupper('b') ; // displays B

tolower( )
 used to convert the given character into its lower case.
 Header file : cctype
 Syntax : chat tolower(char) ;
 Eg : cout<<tolower('B') ; // displays b

User defined functions


 A user defined function is a group of code to perform a specific task
 The syntax of a function definition is given below:

data_type function_name(argument list)


{
statements in the body;
}
 The data_type is any valid data type of C++.
 The function_name is a user defined word (identifier).

217
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 The argument_list, which is optional, is a list of parameters.

int sum(int a , int b)


{
Function with argument and return value int s=a+b ;
return s;
}
void sum(int a , int b)
{
Function with argument and no return value int s=a+b ;
cout<<"Sum="<<s;
}
void sum()
{
cin>>a>>b;
Function with no argument and no return value.
int s=a+b ;
cout<<"Sum="<<s;
}
int sum()
{
cin>>a>>b;
Function with no argument but with return value
int s=a+b ;
return s ;
}

function prototype
 A function prototype is the declaration of a function by which compiler is provided with the
information about the function such as the name of the function, its return type, the number and
type of arguments, and its accessibility.
 Syntax : data_type function_name(argument list);

Eg : int sum( int , int ) ;


void sum( ) ;
Formal arguments and actual arguments
 The values which are passed into a function is called arguments or parameters
 The variables used in the function definition as arguments are known as formal arguments.
 The variables used in the function call are known as actual arguments.

Methods of calling functions


 Call by value method and Call by reference method
Call by value method Call by reference method

Ordinary variables are used as formal Reference variables are used as formal
parameters. parameters.
Actual parameters may be constants, Actual parameters will be variables only
variables or expressions.
Exclusive memory allocation isrequired for Memory of actual arguments is shared by
the formal arguments. formal arguments.
The changes made in the formal arguments The changes made in the formal do reflect in
do not reflect in actual arguments actual arguments.

218
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Default argument
A default argument is a value provided in a function declaration that is automatically assigned by the
compiler if the calling function doesn‟t provide a value for the argument.
Scope and life of variables and functions
Local variable -The variables declared within the body of Function are called local variables
Global variable -The variables declared outside any function and which are accessible to all functions are
called global variables
Local function- A function which is declared inside the body of another function is called a local function.
Global function - A function declared outside the function body of any other function is called a global
function
4 - WEB TECHNOLOGY
Website
 Web page is a document available on World Wide Web.
 A web page contains huge information including text, graphics, audio, video and hyper links.
 Website is a collection of web pages.
 Web pages are developed with the help of HTML (Hyper Text Markup Language).

Communication on the web


 In the Internet, there are several types of communication like, accessing websites, sending e-mails, etc.
 Web pages are accessed using HTTP protocol

Communication on the web

Web server to web server


Client to web server communication
communication
1. Client to web server communication
 Here a user request service from a server and the server returns back the service to the client.

2. Web server to web server communication


 Server to Server communication takes place in e-commerce (online shopping).
 Here, Web server of online shopping website sends confidential information to bank web server and
vice versa.

Web server
 A web server is a powerful computer that hosts websites.
 A web server enables us to deliver web pages or services like e-mail, blog, etc.
 A web server is a computer that process request and distributes information.
 A web server can have single or multiple processors, fast access RAM, high performance hard disks,
Ethernet cards that support fast communication.

Software ports
 Software ports are used to connect client computer to server computer.
 It is a 16-bit number.
 Some of the commonly used ports and services are:

PORT NO SERVICE
20&21 FTP
22 SSH
25 SMTP
53 DNS
80 HTTP
110 POP3

219
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

443 HTTPS

DNS Server
 DNS Server used to resolve (Convert) domain name into IP.
 The process of translating domain name to IP address is called name resolution.
 The internet contains thousands of interconnected DNS servers.
 When you type a URL in your browser, the browser contacts the DNS server to find IP address.

Web designing
 Web designing is the process of designing attractive web sites.
 Any text editor can be used to design web pages. Eg: notepad, geany, sublime text etc..

Static and dynamic web pages


Static web page Dynamic web page
 Content and layout is fixed.  Content and layout may change.
 Never use databases.  Uses database.
 Directly run on the browser..  Runs on the server.
 Easy to develop  requires programming skills.

Scripts
 Scripts are program codes written inside HTML pages.
 Script are written inside <SCRIPT> and </SCRIPT> tags.
 The commonly used scripting languages are java script,VB script,PHP etc

Types of scripting languages


scripts

1. Client side scripts 2. Server side scripts


Difference between Client side & Server side scripting
Client side scripting Server side scripting
 Executed in the client browser  Executed in the web server.
 Used for validation of client data.  Used to connect to databases.
 Browser dependent  Not browser dependent
 Users can block.  Users cannot block.
 Eg:- JavaScript, VB script.  Eg:- Perl, PHP, ASP, JSP, etc

HTML (Hyper Text Markup Language)


 HTML is used to create web pages
 The commands used in HTML are called tags.
 Tags begins with opening angle bracket(< >) and ends with closing angle bracket(</ > ).
 Tags in HTML are of two types, Empty tag and Container tags
 The additional information supplied with HTML tags are called attributes.
 Eg:- <BODY Bgcolor = "blue">
 Here, <BODY> is the tag, Bgcolor is the attribute, blue is the value of this attribute.
 HTML file is to be saved with an extension .html or .htm

Container tags and empty tags


 Tags that requires opening tag and closing tag is called container tag.

220
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Eg: <HTML> and </HTML>


 Tags that requires only opening tag is called empty tag.
 Eg: <BR>, <IMG>

The basic structure of an HTML document


<HTML>
<HEAD>
<TITLE> ....... title of web page......... </TITLE>
</HEAD>
<BODY>
...............contents of webpage..........................
</BODY>
</HTML>
<HTML> Tag
 An HTML document begins with <HTML> tag and ends with </HTML>.
 Attributes of HTML tag
 Lang:-The lang tag is used to specify the language used in the web page.
 Dir:-The Dir tag specifies the direction in which text should be displayed in web browser.

<HEAD> Tag
It is a container tag used to specify the details of a webpage like title, scripts, CSS etc
<TITLE> Tag
 The <TITLE> tag defines the title of the HTML document.

<BODY> Tag
 The <BODY> Tag defines the body section of HTML document.
 The main attributes of <BODY> tag are,
 1)Bgcolor:-It specifies the background color of the document.
 2)Background:-It specifies the background image for the document.
 3)Text:-It specifies the colour of Text displayed on the document.
 4)Link:-It specifies the colour of unvisited link.The default colour is blue.
 5)Alink:-It specifies the colour of active link.The default colour is green.
 6)Vlink:-It specifies the colour of visited link.The default colour is purple.
 7)Leftmargin: -Specifies the left margin from where the text in the body appears.
 8)Topmargin:-Specifies the top margin from where the text in the body appears.

Headings in HTML
 HTML supports headings from <H1> to <H6>.
 An important attributes of heading tags is Align.
 It has three values Left,Right,Center

<P>Tag
 The <P> tag is used to create paragraph
 Attributes of <P> tag is Align
 It has three value, left,right,center or justify.

<BR> Tag
 The <BR> tag is used to insert a line break.

<HR> Tag
 The <HR> tag is used to create a horizontal line in HTML.
 Attributes of <HR> Tag

221
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Size:-It specifies the thickness of the line.


 Width:-It specifies the width of the line.
 Align:-It specifies the alignment of the line(Left, Right and Center)
 Color:-It specifies the color of the ruler

<CENTER> Tag
 It is a container tag used to display contents to the center of webpage.
 The content can be text,image,table etc.

Text formatting tags


 The text formatting tag is used to format text in a web page.
 The important text formatting tags are, bold, italics and underline etc.
 <B> and <STRONG>: To make the text Bold face
 <I> and <EM> : To make the text italics
 <U> : To underline the text
 <S> and <STRIKE>: To strike through the text
 <BIG> : To make a text big sized
 <SMALL> : To make a text small sized
 <SUB> : To make the text subscripted
 <SUP>: To make the text superscripted

<PRE> Tag
 The <PRE> tag defines preformatted text
 It is a container Tag used to display a text exactly in its original form that we typed in Text editor

<ADDRESS> tag
 It is container tag used to display a postal address
 The information may include name, phone numner,e-mail, address etc.
 The contents enclosed in <address> tag will be displayed in Italics similar to <i> tags

<MARQUEE> Tag
 The <MARQUEE> tag defines the text that scrolls across the user‟s display.
 Attributes of <MARQUEE> tag
 The important attributes of <MARQUEE> tag are,
 Height and Width:-It determines the size of marquee area.
 Hspace and Vspace:-It defines the space between marquee and the surrounding text.
 Scrollamount and Scrolldelay:-These attributes control the speed and smoothness of scrolling
marquee.
 Behaviour:-It defines the type of scrolling. It has three values scroll, slide and alternate.
 Loop:-It specifies how many times the marquee text must scroll. The default value is endless.
 Direction:-It specifies the direction of scroll.

<DIV> Tag
 The <DIV> tag defines a division or a section in an HTML document.
 Attributes of <DIV> tag is align,id,style

<FONT> Tag
 The <FONT> tag allows to define size,colour,style of text.
 Attributes of <FONT> Tag is
 Face:-It specifies the font name.

222
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Size:-It specifies the font size.


 Color:- It defines color to the text.

HTML entities for Special Characters


 In addition to tags there are entities to represent special characters in Html

Character Entity Meaning


&nbsp; Blank Space
" &quot; Double Quotation Mark
< &it; Less than symbol
> &gt; Greater than symbol
© &copy; Copy Right Symbol
™ &trade; Trademark Symbol
® &reg; Registered Symbol
Comments in Html
 Comments are non executable statements in any programming language
 Comments help us to understand the code in a better way.
 In Html comments are placed in .<!-- -- >

<IMG> tag
 The <IMG> tag is used to insert image in a web page.
 Attributes of <IMG> tag are,
 Src:-It specifies the name of image.
 Align:-It controls alignment of the image (TOP,MIDDLE or BOTTOM).
 Width:-It specifies the width of the image.
 Height:-It specifies the height of the image.
 Alt:-It defines the text to be displayed if the browser cannot display the image.
 Vspace and Hspace:-Controls the vertical and horizontal spacing between images in the web
page

5- WEB DESIGNING USING HTML


I. Lists in HTML
 There are three types of lists in HTML.

1. Unordered lists

Lists 2. Ordered lists

3. Definition list
1. Unordered lists
 Unordered list display a bullet or graphic symbol in front of each item.
 <UL> Tag is used to create Unordered List.
 Each list item is added using <LI>
 Important attribute of UL tag is Type
 Values in Type attribute are : Disc , Square, Circle
 Eg: <UL Type= "Disk">

<LI> apple </LI>


<LI> orange </LI>
<LI> mango </LI>
</UL>
2. Ordered lists

223
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Ordered list display numbers or alphabets in front of each item.


 <OL> Tag is used to create ordered List.
 Each list item is added using <LI>
 Important attribute of <OL> tag are
 Type: Sets Type of numbering
 Start : Sets starting value of Numbering.
 Eg: <OL Type= "i">

<LI> apple </LI>


<LI> orange </LI>
<LI> mango </LI>
</OL>
3. Definition list
 A Definition List is a list of terms with its definitions.
 <DL> Tag is used to create definition List.
 Each term is added using <DT> and its definition is provided using <DD>.
 Eg: <DL>

<DT>computer :</DT>
<DD> A computer is a digital electronic machine</DD>
Nested lists
 A list inside another list is called nested list.
 Eg: an ordered list inside another ordered list, an unordered list inside an unordered list, etc

II. Creating links


 Any clickable element in webpage is referred as Hyperlinks
 When it is clicked on that element , we can move to another page or another section of the same
document
 <A> Tag (Anchor tag) is used to create Hyperlinks
 Important Attributes of <A> Tag are,
 Href - To specify the url to be navigated
 Name : To provide the name to identify the link

Types of linking
Link

External Link Internal Link


1. External Linking
 The link from one page to another page is known as external linking.
 Here, the URL / web address is given as the value for Href attribute
 Eg: <A Href= "http://www.google.com.in">go to google</A>.

2. Internal Linking
 Link to a particular section of same document is known as internal linking.
 Name attribute of <A> is used for internal Linking.
 Eg: Eg. <a name=”Introduction”> Introduction</a>
Then we can link to this section as
<a href=”#Introduction”> Go to Introduction</a>
E-mail Linking
 mailto: protocol is used to create email linking

224
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Eg:- <A Href= mailto: "[email protected]">Mail SCERT Kerala </A>

Creating graphical hyperlinks


 We can make an image as a hyperlink using <IMG> tag inside the <A> tag.
 Eg:- <A Href= "https://www.wayanad.com"><IMG Src= "wayanad.jpg"></A>

Inserting music and videos


 <EMBED> tag: To add music or video to the web page.
 Attributes: Src, Height, Width, Align, Alt.
 <NOEMBED> tag: To display a text if the <EMBED> tag is not supported by the browser.
 <BGSOUND> tag: it is used play background music to a web page.

III. Creating tables in a web page


 <TABLE> tag is used to created table in a web page.
 Rows are added to tables using <TR> tag
 Columns are added to tables using <TH> (Heading Columns), <TD> (Ordinary columns) tags

Attributes of <table> tag


 Border - To specify Thickness of border
 BorderColor - To specify colour of border
 Align - To specify the position of table
 Bgcolor - To specify background colour
 Background - To assign background image
 Cellspacing - To specify space between cells
 Cellpadding - To specify space between cell border and its content
 Width and Height - To set table width and its height
 Frame- To set the outer border for table
 (Possible values - void , Above , Below, Hsides,Vsides , Box, etc.)
 Rules- To set the border of rows and columns
 (Possible values - none, cols, rows, all

Attributes of <TR> tag


 Align - To specify horizontal alignment of text in a row
 Valign- To specify vertical alignment of text in a row
 Bgcolor- To specify background colour for a row

Attributes of <TD> and <TH> tag


 Align - To specify horizontal alignment of text for a column
 Valign- To specify vertical alignment of text in for a column
 Bgcolor - To specify background colour for a column
 Colspan- To specify number of columns to be merged to form a single column
 Rowspan- To specify number of rows to be merged to form a single column

IV. Dividing the browser window


 <FRAMESET> is used to divide browser window in order to include more than one page in single
browser window.
 Attributes of <FRAMESET> are ,
 Cols : To specify number of vertical frames
 Rows: To specify the number of horizontal frames

225
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Border: To specify thickness of border for the frame


 Bordercolor : To specify colour of border
 <FRAME> tag defines frames inside <FRAMESET>
 Important attributes are
 Src , Scrolling , Noresize, Marginwidth MarginHeight , and Name

Nesting of Framesets
 Placing frameset tag inside another frameset tag is known as nesting of frames
 <NOFRAMES> tag is used to display some text content in the window if browser does not support
frames

V. Forms in web pages


 <FORM> tag provides a container to create forms in a web page.
 Important attributes of <FORM> tag are ,
 Action : To specify URL of form handler
 Method : To mention method used to upload data
 Target : To specify Target window of result of the script
 Name : To assign name
 A Form consists of two elements: <FORM> container and Form controls (like text fields, drop-down
menus, radio buttons, etc.)
 Different form controls are created using <INPUT , <TEXTAREA> , <SELECT>

<INPUT> Tag
 Its a an empty tag different types form controls
 Type , Name ,Value , Size and Maxlenght are attributes of <INPUT>
 Value of Type attribute is

Value Description
text Text Box
password checkbox Text box enter to password
checkbox Check box control
radio Radio button control
reset RESET button
submit SUBMIT button
button A standard button

<TEXTAREA> Tag
 It is used to create multiline text box.
 Important attributes of <TEXTAREA> tag are ,
 Name , Rows, Cols

<SELECT> tag
 It is used to create Dropdown list (or Select Box) in a form.
 Important attributes of <SELECT> tag are
 Name , Size, Multiple
 <OPTION> allows to add each items to the dropdown list.

<fieldset> tag
 The <fieldset> tag is used to group related elements in a form.
 The <fieldset> tag draws a box around the related elements.
 The <legend> tag is used to define a caption for the <fieldset> element.

226
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

6 - CLIENT SIDE SCRIPTING USING JAVASCRIPT


JavaScript
 Scripts are program codes written inside HTML page.
 Types of Scripting methods are
 Client Side Scripting
 Server Side Scripting
 JavaScript is well known Client Side Scripting language.
 JavaScript was developed by Brenden Eich in 1995
 JavaScript is supported by all web browsers.

<SCRIPT>Tag
 <SCRIPT> tag is used to include scripting code in an HTML page.
 Important attribute of <script> tag is language and type
 Language Attribute – To Specify the Scripting Language.
 Example:- <SCRIPT Language="javascript">
...................................................
...................................................
</SCRIPT>
How to design a web page using Java Script
<HTML>
<HEAD> <TITLE> sample title </TITLE> </HEAD>
<BODY>
<SCRIPT Language= "JavaScript">
document.write("Welcome to wayanad.");
</SCRIPT>
</BODY>
</HTML>
This program is saved with .html extension.
 document.write ():-This command is used to display a text in the body of a webpage.

Creating functions in JavaScript


 A function is a group of instructions with a name that can perform a specific task.
 In JavaScript a function can be defined with the keyword "function".
 Normally functions are placed in the <HEAD> Tag of <HTML>.
 JavaScript function does not have any return statement
 A function has two parts: function Header and function body (enclosed within { })

 Eg: function print() //it is function header


{
document.write(“Welcome to Wayanad”); // it is function body
}
Calling a function
 A function can be called using its name. Example: print( )

Data types in JavaScript


 JavaScript variables can hold different data types: numbers, strings, Boolean

227
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Data type Example Description


Number 27 , -10, 3.14, All numbers
String “wayanad”, ”200”, “false” Anything inside “ “
Boolean True, false True or false value

Variables in JavaScript
 var keyword is used for declaring all type of variable.
 Variable is used for storing a value.
 Example: var x,y;

X=10;
Y=”wayanad”;
Here, the variable x is number data type and y is String data type
Operators in JavaScript

Arithmetic Operators
Operator Description Example
+ Addition c= a+b
- Subtraction c= a-b
* Multiplication c= a*b
/ Division c= a/b
% Modulus c= a%b
++ Increment c= ++b
-- Decrement c= --b
Assignment Operators
Operator Description Example Meaning
= Assignment A=B
+= Add and Assignment A+=B A=A+B
-= Subtraction and Assignment A-=B A=A-B
*= Multiplication and Assignment A*=B A=A*B
/= Division and Assignment A/=B A=A/B
%= Modulus and Assignment A%=B A=A%B

Relational Operators
Operator Description Example
== Equal to a==b
!= Not equal a!=b
< Less than a<b
> Greater than a>b
<= Less than or Equal to a<=b
>= Greater than or Equal to a>=b

Logical Operators
Operator Description Example
&& AND C= a && b
|| OR C= a || b
! NOT C= !a

Control structures in JavaScript

228
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Control structures are used to alter the normal sequence of execution of a program.
1) if statement
 The if statement executes a group of statements based on a condition.
 The syntax is

if(test_expression)
{
Statements;
}
2) Switch statement
 The Switch statement is a multi-branching statement,
 It is executes statement based on value of the expression.
 The syntax is

switch(expression)
{
case value1:statement1;break;
case value2:ststement2;break;
- -----------------------
Default: statement;
}
3) for ............Loop
 The for loop executes a group of statements repeatedly.
 The syntax is

for(initialisation; expression; update statement)


{
statements;
}
4) While ...Loop
 The while loop executes a group of statements repeatedly based on a condition.
 The syntax is

while(expression)
{
statements;
}
String addition operator (+)
 The JavaScript concatenation operator is a plus sign (+).
 This operator lets you add the contents of two or more strings together to create one larger string
 Example: x = “Java”;

y = “Script”;
z = x + y;
 The + operator will add the two strings and the variable z will have the value JavaScript.

Built-in functions in JavaScript


1. alert() : This function is used to display popup message on the screen
Eg: alert ("Welcome to wayanad");
2. isNaN() : This function is used to check whether a value is a number or not. The function returns
true if the given value is not a number.
Syntax : isNaN ( " value" );
Eg : isNaN ("20") ---> False

229
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

isNaN (" bat ") ---> True


3. toUpperCase() : This function returns the upper case form of the given string
Example :- var a , b ;
a =" bat ";
b = a.toUpperCase ( );
document . write ( b );
Output : BAT
4. toLowerCase() : This function returns the lower case form of the given string.
Eg:- var x;
x="BAT";
alert(x.toLowerCase());
Output : bat
5. charAt() : It returns the character at a particular position. charAt(0) returns the first character in
the string.
Eg:- var s = " HELLO WORLD ";
var r = str . CharAt (1); it will return E
6. length property : length property returns the length of the string.
Eg:- var x;
x="JavaScript";
alert(x.length)); display 10
Accessing values in a textbox using JavaScript
num = document.frm1.txt1.value;
Here document refers the body section of the web page. frm1 is the name of the Form we have given
inside the body section. txt1 is the name of the text box within the frm1 and value refers to the content inside
that text box.
document.frm1.txt1.value = ans;
The above line assigns the value of the variable ans in the text box.
<INPUT Type= "button" Value= "ok" onClick= "show()">
The function will be called for execution when you click on the button.
Event's
Event Description
onClick Occurs when the user clicks on an object
onMouseEnter Occurs when the mouse pointer is moved onto an object
onMouseLeave Occurs when the mouse pointer is moved out of an object
onKeyDown Occurs when the user is pressing a key on the keyboard
onKeyUp Occurs when the user releases a key on the keyboard

Ways to add scripts to a web page


a. Inside the <BODY>:
We can place the scripts inside the <BODY> tag. the scripts will be executed while the contents of
the web page is being loaded.
b. Inside the <HEAD>:
We can place the script inside <HEAD> section. Usually functions are written here. They are called
from body. The script in this section will be loaded first. Mixing of web page content and scripts can
be avoided also.
c. External JavaScript file
Scripts can be placed into an external file and it can be linked to with the HTML document. This file
is saved with the extension „.js‟. The advantage is that the same script can be used across multiple
HTML pages or a whole website. The linking is done through the attribute Src of <SCRIPT> tag.

7 - WEB HOSTING
Web Hosting
 It is the process of providing storage space in web server for a web site.
 The companies that provide web hosting services are called web hosts.

230
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Stages of web hosting


1. Selection of hosting type.
2. Buying hosting space.
3. Registration of domain name.
4. Transfer of files to the server using FTP.

1. Selection of hosting type.


There are three types of web hosting:
Hosting

I. Shared hosting II. Dedicated hosting III. Virtual Private Server

I. Shared hosting
 In this type, more than one web site is stored in a single web server.
 This is the most common type of web hosting.

Characteristics
 Suitable for small web sites.
 Cheaper and easy to use
 Less service/performance

II. Dedicated Hosting


 In this type , single web site is stored in a single web server

Characteristics
 Suitable for secure and high performance web sits.
 Expensive
 More service/fast service

III. Virtual Private Server


 A server is virtually partitioned into several servers.
 Virtualization technology is used for partitioning. Ex:Vmware,FreeVPS
 This type of hosting provides less performance than dedicated hosting, but more performance
than shared hosting.

2. Buying hosting space


 While purchasing hosting space, we have to decide the amount of space required.
 We need to select a hosting space that is sufficient for storing the files of our website.

3. Domain name registration


 Domain names are used to identify a website in the Internet.
 After finalizing a suitable domain name for our website, we have to check whether this domain name
is available for registration .
 These websites check the database of ICANN that contains the list of all the registered domain
names

4. Transfer of files to the server using FTP (FTP client software)


 FTP is used to transfer files from one computer to another on the Internet.
 FTP client software establishes a connection with a remote server and is used to transfer files from
our computer to the server computer.
 The popular FTP client softwares are FileZilla, CuteFTP, SmartFTP, etc.

231
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Free hosting
 Web hosting service in free of charge is called free hosting (No money).

Limitations:
 Limited size of file can be uploaded.
 Advertisements from the service provider
 Audio/video may not be permitted

Content Management System (CMS)


 Content Management System (CMS) refers to a web based software system which is capable of
creating, administering and publishing websites.
 CMS provides an easy way to design and manage attractive websites.
 Some of the popular CMS software are WordPress, Drupal and Joomla

Responsive web design


 Responsive Web Design is automatically resize, hide, shrink, or enlarge, a website, to make it look
good on all devices (desktops, tablets, and phones)
 It is about creating web pages that look good on all devices
 A responsive web design will automatically adjust for different screen sizes and viewports.

Chapter 8
Database management System
Concept of Database
 A database is a collection of data.
 A DBMS (Data Base Management System) is a set of programs used to create access and maintain a
database
Advantages of DBMS
Advantages of DBMS
Data Data
Redundancy Redundancy Efficient Data Data Data Enforces Crash Sharing of
can be can be data access integrity integrity Security standard Recovery data
avoided avoided

1) Data Redundancy can be avoided:-


 Storing same data in multiple locations or the duplication of data is called data redundancy.
2) Data inconsistency can be reduced:-
 Data redundancy leads to data inconsistency.
 That is when the various copies of the same data do not match each other.
 Inconsistency can be controlled by controlling data redundancy.
3) Efficient data access:-
 A DBMS provides easy access to data in database.
4) Data integrity:-
 Data integrity refers to correctness, completeness and accuracy of data stored in the database.
5) Data Security:-
 Data security refers to protecting data against accidental loss or accessing /modifying data by
unauthorized users.
 Data security can be done by setting access rights using passwords.
6) Sharing of data:-
 The data stored in the database can be shared among multiple programs and users.
7) Enforces standard:-
 The database administrators enforce necessary standards.
 Some standards include-naming convention, display format, report structure, access rules etc.

232
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

8) Crash Recovery:-
 A DBMS provides a mechanism for data backup and recovery from crash/hardware failure.
Components of DBMS
Components of DBMS

Hardware Software Data Users Procedure

1) Hardware:-
 Hardware includes computers (Server, PC etc), storage devices (hard disk, magnetic tape) and
other devices for data storage and retrieval.
2) Software:-
 The Software consists of DBMS, application programs and utilities.
 Application programs are used to access data in database to generate reports, tabulations, etc.
 Utilities are the software tools used to manage the database system.
3) Data:-
 The database should contain all the data needed by the organization.
 The database contains Metadata (data about data) and operational data.
 The data in the DBMS is organized in the form of Field, Record and Files.
 Field:-A field is the smallest unit of stored data. Eg. Roll No, Name, Place etc.
 Record:-A record is a collection of related fields. For eg. 1001, Rajesh, Kollam
 Files:-A files is a collection of records of same type.
4) Users:-
 The users access the database by using application programs.
5) Procedure:-
 Procedures are rules and instructions that govern the design and use of a database.

Database Abstraction
 Abstraction is the process of hiding the complex background details of a DBMS from its users.
1) Physical Level:- view level
 It is the lowest level of abstraction. view1,view2,...........view n
 It describes how data is actually stored in a secondary storage
medium like magnetic disk or tape. Logical Level
2) Logical Level(Conceptual Level):-
 Logical level describes what data are stored in the database and what Physical Level
relationship exists between data.
 That is, the data type, format of data etc are hidden from users.
 Logical level abstraction is used by database administrator.
3) View Level:-
 This is the highest level of database abstraction and is closest to the users.
 It is concerned with the way in which individual users view the data.
Data Independence:
 Data Independence is the ability to modify the schema (structure of database) at one level without
affecting the database structure at next higher level.
1) Physical data independence:
 It is the ability to modify the schema at the physical level without affecting the schema at the
logical level.
2) Logical data Independence:
 It is the ability to modify the schema at the logical level without affecting the schema at the
view level.
Different users of database

233
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

Database Administrator (DBA)

Application Programmer
Data base users
Sophisticated Users

Naive Users
Database Administrator (DBA):
 A database administrator is a person who has central control over the database.
 The main duties of a DBA are
Design of the Physical and Logical Schema
Security and Authorization
Data availability and recovery from failure
Application Programmer:-
 Application programmers are computer professionals who interact with the database through
application programs written in any languages such as C, C++, Java etc.
 They interact with the data base using DML. (Data Manipulation Language).
Sophisticated Users:-
 Sophisticated users interact with database through their own queries (request to database) for
their complicated needs.
 They include engineers, analyst, scientists etc.
Naive users:-
 Naive users interact with database by invoking previously written application programs.
 Naive users include billing clerk in a super market, bank, hotel, clerical staff in an office etc.
Relational data model
 Database represented as a collection of tables called relation
The database products based on relational model (table) are known as Relational Database
Management System (RDBMS)
 Some of the popular RDBMS are Oracle, MYSQL, DB2 etc.
Terminologies in RDBMS
a. Entity
 An entity is a person or a thing in the real world that is distinguishable from others.
b. Relation
 Relation is a collection of data elements organized in terms of rows and columns.
 A relation is also called Table.
c. Tuple
 The rows (records) of a relation are generally referred to as tuples.
 A row consists of a complete set of values used to represent a particular entity.
d. Attribute
 The columns of a relation are called attributes.
 AdmNo, Roll, Name, Batch, Marks and Result are attributes of the STUDENT relation.

e. Degree
 The number of attributes in a relation determines the degree of a relation.

234
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 The relation STUDENT has six columns or attributes and therefore the degree of the
STUDENT relation is 6.
f. Cardinality
 The number of rows or tuples in a relation is called cardinality of the relation.
 The relation STUDENT has eight tuples and hence the cardinality of the STUDENT relation
is 8.
g. Domain
 A domain is a pool of values from which actual values appearing in a given column are
drawn.
 For example, the domain of the column Batch in the relation STUDENT is the set of values
{Science, Humanities, Commerce}.
h. Schema
 The description or structure of a database is called the database schema, which is specified
during database design.
i. Instance
 An instance of a relation is a set of tuples in which each tuple has the same number of fields
as the relational schema.
Keys
 A key is an attribute or a collection of attributes in a relation that uniquely distinguishes each
tuples from other tuples in a given relation.
a. Candidate key
 A candidate key is the minimal set of attributes that uniquely identifies a row in a relation.
 In the STUDENT relation, AdmNo can uniquely identify row.
 Therefore it can be considered as a candidate key.
b. Primary key
 A primary key is one of the candidate keys chosen to uniquely identify tuples within the
relation.
 As it uniquely identifies each entity, it cannot contain null value and duplicate value.
c. Alternate key
 A candidate key that is not the primary key is called an alternate key.
d. Foreign key
 A key in a table can be called foreign key if it is a primary key in another table.
RELATIONAL ALGEBRA
 The collection of operations that is used to manipulate the entire relations of a database is
known as relational algebra
 These operations are performed with the help of a special language called query language
SELECT(σ)
Unary
PROJECT(π)

RELATIONAL ALGEBRA UNION (U)

INTERSECTION(ꓵ)
Binary
SET DIFFERENCE(-)

CARTESIAN PRODUCT(X)
SELECT Operation
 Select rows from a relation that satisfies a given condition
 Denoted using sigma (σ)
 General Format
σ condition (Relation)
 Uses various comparison operators
<, >, <=, >=, <>

235
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Uses various Logical operators V (OR), ˄ (AND), ! (NOT)


PROJECT Operation
 Select certain attributes from the table and forms a new relation
 Denoted by π(Pi)
 General Format
πA1, A2,….., An (Relation)

A1, A2,………, An are various attributes
UNION Operation
 Returns a relation that containing all tuples appearing in two specified relations
 Two relations must be UNION compatible
 UNION compatible means two relations must have same number of attributes
 Denoted by „U‟
INTERSECTION Operation
 Returns a relation containing tuples appearing in both of the two specified relations
 Denoted by ꓵ
 Two relations must be union compatible
SET DIFFERENCE operation
 Returns a relation containing the tuples appearing in the first relation but not in the second relation
 Denoted by „ - ‟ (Minus)
 Two relations must be union compatible
CARTESIAN PRODUCT operation
 Returns a relation consisting of all possible combinations of tuples from two relations
 Degree of new relation = Degree of first relation + Degree of second relation
 Cardinality of new relation = cardinality of first relation X cardinality of second relation
 Denoted by „ X ‟ (cross)
 Also called cross product
Chapter 9
Structured Query Language

 Structured Query Language (SQL) is a language designed for managing data in relational database
management system (RDBMS).
 SQL provides an easy and efficient way to interact with relational databases.
 A query is a request to a database.
 Simple, Flexible, Powerful
 It‟s a relational database language not a programming language
Components of SQL
Components of SQL

DDL DML DCL

 Data Definition Language


 DDL is a component of SQL that provides commands to deal with the schema definition of the
RDBMS.
 The DDL commands are used to create, modify and remove the database tables.
 The common DDL commands are CREATE, ALTER, and DROP.
 Data Manipulation Language
 The Data Manipulation Language (DML) provides commands for dealing with data in table.
 DML permits users to insert data into tables, retrieve existing data, delete data from tables and
modify the stored data.

236
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 The common DML commands are SELECT, INSERT, UPDATE and DELETE.
 Data Control Language
 Data Control Language (DCL) is used to control access to the database for security concerns.
 The commands GRANT and REVOKE are used as a part of DCL.
 GRANT : Allows access privileges to the users to the database.
 REVOKE : Withdraws user's access privileges given by using GRANT command.
Creating Database
 We use the command CREATE DATABASE for creating a database in MySQL
 Syntax:
CREATE DATABASE <database_name>;
 Example:
CREATE DATABASE WOHSS;
Opening Database
 When we open a database, it becomes the active database in MySql
 Syntax:
USE <database_Name>;

SHOW DATABASES;
 This command list the entire databases in our system
Data types in MySQL
INT
Numeric Data Types
DECIMAL
CHAR
Data Types String Data types
VARCHAR
DATE
DATE and TIME
TIME
1. Numeric Data types
 The most commonly used numeric data types in MySQL are INT or INTEGER and DEC or
DECIMAL.
i. INT or INTEGER
 Integers are whole numbers without a fractional part.
 They can be positive, zero or negative.
ii. DEC or DECIMAL
 Numbers with fractional parts can be represented by DEC or DECIMAL data type.
 The standard form of this type is DECIMAL(size,D) or DEC(size,D).
2. String (Text) data types
 String is a group of characters. The most commonly used string data types in MySQL are
CHARACTER or CHAR and VARCHAR.
i. CHAR or CHARACTER
 Character includes letters, digits, special symbols etc.
 The CHAR is a fixed length character data type.
 The syntax of this data type is CHAR(x), where x is the maximum number of characters
in the data.
ii. VARCHAR(size)
 VARCHAR represents variable length strings.
 VARCHAR allocates only required space for a string
3. Date and Time data types
i. DATE
 The DATE data type is used to store dates.
 The YYYY-MM-DD is the standard format.

237
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

ii. TIME
 The TIME data type is used to specify a column to store time values in MySQL.
 The standard HH:MM:SS format.
MySQL commands
Creating tables
 The DDL command CREATE TABLE is used to define a table
 The syntax of CREATE TABLEccommand is:
CREATE TABLE <table_name>
(<column_name><data_type> [<constraint>]
[, <column_name><data_type> [<constraint>,]
..............................
.............................. );
 <table_name> represents the name of the table that we want to create
 <column_name> represents the name of a column in the table
 <data_type>represents the type of data in a column of the table
 <constraint> specifies the rules that we can set on the values of a column.
 All the columns are defined with in a pair of parentheses, and are separated by commas.
Rules for naming Tables and Columns
 The name may contain Letters (A – Z, a -z), Numbers (0-9), Under score (_), Dollar ($) symbol
 Must contain at least one character
 Must not contains white spaces and special symbols
 Must not be an SQL Keyword
 Duplication not allowed
Constraints
 Constraints are the rules enforced on data that are entered into the column of a table.
 Constraints could be column level or table level.
a. Column Constraints

Constraints

NOT NULL AUTO_INCREMENT UNIQUE PRIMARY KEY DEFAULT

 Column constraints are applied only to individual columns.


 They are written immediately after the data type of the column.
i. NOT NULL
 This constraint specifies that a column can never have NULL values.
 NULL is a keyword in SQL that represents an empty value.
ii. AUTO_INCREMENT
 The value of the column incremented by one
 The default value is 1
 The AUTO_INCREMENT column must be defined as the Primary Key of the table
iii. UNIQUE
 It ensures that no two rows have the same value in the column specified with this constraint.
iv. PRIMARY KEY
 This constraint declares a column as the primary key of the table.
 This constraint can be applied only to one column or combination of columns.
 The primary keys cannot contain NULL values.
v. DEFAULT

238
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Using this constraint, a default value can be set for a column, in case the user does not provide
a value for that column of a record.
b. Table constraints
 Table constraint is applied on a group of columns of a table.
 The table constraint appears at the end of the table definition.
 Example:
CREATE TABLE market(
code CHAR(2) PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
rate DECIMAL(10,2),
qty INT,
UNIQUE (code, name));
Viewing the structure of a table
 Use DESCRIBE command
 Syntax:
DESCRIBE <table_name>; OR DESC <table_name>;
Example: DESC student;
Inserting data into tables
 The DML command INSERT INTO used for inserting tuples into a table
 Syntax:
INSERT INTO <table_name> [<column1>,<column2>,……….<column N>]
VALUES(<value1>,<value2>,………<valueN>);
 Example:
INSERT INTO student
VALUES(101, „manu‟ , „m‟ , „2008/11/23‟, 540);
 Ensure the data type of the value and column matches
 CHAR or VARCHAR type of data should be enclosed in single quotes or double quotes
 The column values of DATE type columns are to be provided within single quotes
 Null values specified as NULL (or null) without quotes
 If no data available for all columns, then the column list must be included
Retrieving information from tables
 The DML command SELECT is used for retrieving data from table.
 Syntax:
SELECT <column_name>[,<column_name>,<column_name>, ...]FROM
<table_name>;
 An asterisk (*)symbol can be used to display values from complete list of columns
Eg: SELECT * FROM student; (Display all attributes in table)
Eliminating duplicate values in columns using DISTINCT
 Example:
SELECT DISTINCT course FROM student;
 The above query will eliminate duplicate values from the column „course‟ Duplicate values can be
eliminated using the keyword DISTINCT
WHERE clause
 In certain situations, we need to display only some values from the table.
 WHERE clause of SELECT command enables to display values from table that satisfies our
conditions.
 The syntax of SELECT command with WHERE clause is:
SELECT <column_name>[,<column_name>,<column_name>, ...]FROM
<table_name>WHERE <condition>;
 Eg1: SELECT * FROM student WHERE gender='F';
 The condition are expressed with the help of relational operators and logical operators

239
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

operators Description
Relational Operators
= Equal to
<> Not equal to
> Greater than
< Less than
>= Grater than or equal to
<= Less than or equal to
Logical operators
NOT TRUE if the condition is false
AND TRUE if both condition are true
OR TRUE If either of the condition is true

BETWEEN...AND Operators
 The SQL operator BETWEEN...AND is used to specify the range
 Example:
SELECT name, income FROM student WHERE income BETWEEN 1000 AND 5000;
 The above query list the student details whose income fall in the range of Rs 1000/- to Rs 5000/-
IN Operators
 To identify value from a given list.
 Example:
SELECT * FROM student WHERE course IN(„commerce‟, „science‟);
LIKE operators
 It is used to perform Condition based on pattern matching
 Patterns are specified using two special wild card characters ‘%’ and ‘_‟ (underscore)
 „%‟ matches a substring of characters
 „_‟underscore matches a single character
 “Ab%” matches any string beginning with “Ab”
 “%cat” matches any string containing “cat” as substring Eg: education
 “_ _ _ _” matches any string of exactly four characters with out any space between them
 “_ _ _%” matches any string of at least three characters
 Example:
SELECT name FROM student WHERE name LIKE „%ar‟;
SELECT name FROM student WHERE name LIKE „Div_ _ar‟;

Condition based on NULL value search

 The operator IS NULL used to find rows containing null values in a particular column

 Example:
SELECT name, course FROM student WHERE income IS NULL;
 If we want to retrieve the records containing non-null values in the income column, the below query
can be used
 SELECT name, course FROM student WHERE fincome IS NOT NULL;
ORDER BY clause
 The ORDER BY clause is used to sort the result of SELECT query in ascending or descending
order
 The default order is ascending
 We use the keywords „ASC‟ for ascending and „DESC‟ for descending

240
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Examples:
SELECT * FROM student ORDER BY name;(For ascending order the keyword „ASC‟ is not
necessary)
SELECT * FROM student ORDER BY name DESC;
Aggregate Functions
 SUM( ) - Total of the values in the column specified as argument
 AVG( ) - Average of the values in the column specified as argument
 MIN( ) - Smallest values in the column specified as argument
 MAX( ) - Largest of the values in the column specified as arguments
 COUNT( ) - Number of non NULL values in the column specified as argument

GROUP BY clause
 The GROUP BY clause used to group rows of a table based on a column value
 Example:
SELECT course, COUNT(*) FROM student GROUP BY course;
 We can apply conditions here by using HAVING clause
 Example:
SELECT course, COUNT(*) FROM student GROUP BY course HAVING course=‟science‟;
Modifying data in tables
 Use the DML command UPDATE
 It changes values in one or more columns of specified rows
 Changes may be affected in all or selected rows of the table
 The new data of the columns are given using SET keyword
UPDATE <table_name>SET <column_name> = <value>[,<column_name> = <value>,...]
[WHERE <condition>];
 Eg: UPDATE student SET income=7000 WHERE name='manu';

Changing structure of a table


 SQL provides a DDL command ALTER TABLE to modify the structure of a table
 The alteration in the form of adding or dropping columns, changing data type and size of the
column, rename a table
ALTER TABLE

ADD MODIFY DROP RENAME TO


Adding a new column
ALTER TABLE <table_name>
ADD <column_name> <data_type>[size] [<constraint> ]
[FIRST | AFTER <column_name>];
 ADD is the keyword to add the new column
 FIRST | AFTER indicates the position of the newly added column
 Example:
ALTER TABLE student ADD mark INT AFTER sex;
Changing the definition of a column
 We can change data type, size or column constraints of a column using the clause MODIFY with
alter table command
 Syntax:
ALTER TABLE <table_name>
MODIFY <colum_name> <data_type> [<size>] [<constraints>];
 Example:
ALTER TABLE student MODIFY AdmNo INT UNIQUE;
Removing column from a table

241
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 We can use DROP clause along with ALTER TABLE command


 Syntax:
ALTER TABLE <table_name> DROP <column_name>;
 Example:
ALTER TABLE student DROP mark;
Rename a table
 We can rename a table in the database by using the clause RENAME TO along with ALTER
TABLE
command
 Syntax:
ALTER TABLE <table_name>
RENAME TO <new_table_name>;
 Example:
ALTER TABLE student RENAME TO stdnt;
Deleting rows from a table
 Sometimes we need to remove one or more records from the table.
 The DML command DELETE is used to remove individual or a set of rows from a table.
 Syntax:
DELETE FROM <table_name> [WHERE <condition>];
 Example:
DELETE FROM student WHERE adm_no=107;
Removing table from a database
 If we do not need a table, it can be removed from the database using DROP TABLE command.
 Syntax
DROP TABLE <table_name>;
 For example, DROP TABLE student;

VIEWS
 A view is a virtual table that not really does not exist in the DB
 It is derived from one or more table
 The table or tables from which the tuples are collected to create a view is called base table(s)
 Created using the DDL command CREATE VIEW
 Syntax:
CREATE VIEW <view_name>
AS SELECT <column_name1> [, <column_name2], ……]
FROM <table_name>
[WHERE <condition>];

10. Enterprise Resourse Planning


Overview of an enterprise
 An enterprise is a group of people and other resources working together for a common goal.
Concept of Enterprise Resource Planning
 ERP is a software that combines all the business requirements of an enterprise or
company together into a single, integrated database so that the various
Productio
n
planning
departments of an enterprise can share information and communicate with Sales and
each other more easily. Distributi
on
Finance

Functional units of ERP Central


Databa
1. Financial module se

 This module collects financial data from various departments and Productio
n
Marketin
g
generates financial reports like balance sheets, general ledger, trial
balance, financial statements, etc. HR

2. Manufacturing module

242
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 Manages the entire production process.


3. Production planning module
 This module is used for optimising the utilisation of available resources
4. HR module
 HR stands for human resource.
 HR module maintains a complete employee database including personal information, salary
details, attendance, performance, promotion, etc. of all employees in an enterprise.
5. Inventory control module
 This Module manages the stock requirement for an organization
6. Purchasing module
 Purchase module is used for making the required raw materials available in the right time and at
the right price.
7. Marketing module
 Marketing module is used for monitoring and tracking customer orders, increasing customer
satisfaction and for eliminating credit risks.
8. Sales and distribution module
 Sales module includes inquiries, order placement, order scheduling, dispatching and invoicing.
9. Quality management module
 This module is used for managing the quality of the product.
Business Process Re-engineering
 Business Process Re-engineering (BPR) is the analysis and redesign of work flow within an
enterprise. IDENTIFY

 A business process consists of three elements. PROCESS

 Inputs: Data such as application forms, customer


enquiries and materials forprocessing. IMPLEME

BPR CURRENT
ANALYZE
NT
 Processing: Set of activities or stages of operations to get IMPROVE
MENTS
PROCESS

an output.
 Outcome: It is the output of processing steps. DESIGN,
PROCESS,
The different phases of ERP implementation are given below. IMPROVE
MENTS

1. Pre evaluation screening


 Here we evaluate some ERP packages available in the market to select a package
2. Package selection
 we select a package that is flexible to meet the enterprise requirements.
3. Project planning
 In this phase, the implementation process of ERP is planned and designed.
4. Gap analysis
 Difference between actual workflow of enterprise and ERP package is found.
5. Business Process Reengineering (BPR)
 Re engineering may result in efficient time management, reduced cost, and effective
utilization of resources.
6. Installation and configuration
 ERP package is installed and the data in the enterprise are fed into it
7. Implementation team training
 This is the phase where the company trains its employees to work on the new system.
8. System testing
 The software is tested to ensure that it works properly, free from errors etc.
9. Going live
 This is the phase where ERP is made available to the entire organization.
10. End-user training
 This is the phase where the actual users of the ERP system need to be trained.
11. Post implementation
 This the phase where we checked whether the objectives set for the ERP system has met.
Benefits of ERP system
1. Improved resource utilization

243
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

2. Better customer satisfaction


3. Provides accurate information
4. Decision making capability
5. Increased flexibility
6. Information integrity
Risks of ERP implementation
1. High cost (ERP package, infrastructure, networks etc.)
2. Time consuming
3. Requirement of additional trained staff
4. Operational and maintenance issues
ERP solution providers/ERP packages
1. Oracle
 Headquarters of Oracle corporation is California, USA.
 Oracle was originally known for its database system rather than its ERP system.
 The ERP package from Oracle provides strong finance and accounting module.
2. SAP
 SAP stands for Systems, Applications and Products for data processing.
 It is a German multinational software corporation .
 In the beginning, the software was developed aiming at large multinational companies.
3. Odoo
 Odoo is an open source ERP.
 In open source ERP the source code or program can be modified as necessary, based on the
requirement of organization.
 Odoo was formerly known as OpenERP
4. Microsoft Dynamics
 Microsoft is an American multinational corporation headquartered in Washington.
 Microsoft Dynamics is part of Microsoft business solutions.
5. Tally ERP
 Tally solutions Pvt Ltd is a Bangalore based Software Company in India.
 Tally ERP is a business accounting software for accounting, inventory and payroll.
ERP and related technologies
1. Product Life Cycle Management (PLM) INTRODUCTIO

 Product lifecycle management is the process of managing the


entire life cycle of a product.
 Four stage product life cycle consists of DECLINE PLM GROWTH

o development and introduction of a new product


o its growth in the market
o its maturity MATURITY

o its decline if it cannot compete with similar products of


other companies. SALES
2. Customer Relationship Management (CRM)
 Customer is an individual or group who receives or consumes
goods and services. MARKETING FEEDBACK
CRM
 Customers are the most important part of any enterprise.
 The success of any enterprise depends on good relationship
with its customers. SUPPORT

3. Management Information System (MIS)


 We can see that there are three components in MIS - Management, Information andSystem.
 A management information system will collect relevant data
from inside and outside an enterprise.
4. Supply Chain Management (SCM)
 The supply chain consists of all the activities associated with
moving goods from the supplier to the customer.

244
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 It begins with collecting raw materials and ends with receiving the goods by the consumer
5. Decision Support System (DSS)
 It is a computer program application that analyses business data and presents it so that users can
make business decisions more easily.
 DSS is only a support in nature, but human
decision makers still retain their supremacy. INPUT DATA
DSS DECISIONS
 DSS needs an effective DBMS to provide DATABASE,SOFTWARE
the support in decision making.

11. Trends and Issues in ICT


Mobile communication
 Mobile communication is the communication that do not require any physical connection between
devices.
Generations in mobile communication
a. First Generation networks
 First Generation or 1G mobile phones were based on the analog system and provided
basic voice facility only.
b. Second Generation networks
• Mobiles use digital communication.
• Introduced data services for mobile
• Picture Message and MMS (Multi Media Message) were introduced.
• The 2 popular standards introduced by 2G systems are GSM (Global System for
Mobiles) and CDMA (Code Division Multiple Access).
i. Global System for Mobiles
– It follows a uniform international standard so that mobile device can be used world wide
– Network is identified using a SIM (Subscriber Identity Module).
General Packet Radio Service and Enhanced Data rates for GSM Evolution
GPRS(General Packet Radio Services)
- GPRS is a 'data only' technology but helps to improve GSM voice quality.
EDGE(Enhanced Data rates for GSM Evolution)
- It‟s data rate is 3 times faster than GPRS.
ii. Code Division Multiple Access
 CDMA provides better coverage, better voice quality, high security than GSM.
c. Third Generation networks
 3G wireless network offers high data rate than 2G.
 3G use WCDMA (wide Band Code Division Multiple Access) technology.
d. Fourth Generation networks
 4G network is also called L.T.E(Long Term Evolution).
 4G network provides ultra speed
 Provides good quality images and videos.
e. Fifth Generation networks
 5G provide facility to unlimited access to information and sharing of data anywhere any
time.
Mobile communication services
a. Short Message Service
 It is a text messaging service used in mobile devices to exchange short messages.
 GSM system allows to send 160 characters.
 SMS uses SS7 protocol (Signaling System No.7).
b. Multimedia Messaging Service
 It is a standard way to send and recieve messages that consists multimedia
 MMS allows user to exchange multiple contents like text,audio,video,music etc over mobile
devices.

245
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

b. Global Positioning System


 GPS is a satellite based navigation system that is used to locate a geographical location
anywhere on earth using longitude and latitude.
 It is designed and operated by US Department of Defence
 The information from satellites are used to find the exact location
 GPS receivers need minimum 3 satellites to find 2D position.
 Four or more satellites are required to plot a 3D position which is accurate.
d. Smart cards
 A smart card is a plastic card embedded with a computer chip/memory that stores and transacts
data.
 The advantage of using smart card is that it is secure(data is protected), intelligent(it can store
and process data) and is convenient(easy to carry).
 Smart cards also work as credit cards, ATM cards,fuelcards,authorization cards etc
Mobile Operating System
 A mobile operating system is the OS used in mobile devices.
 The popular mobile OS are Android from Google, iOS (iPhone Operating System) from Apple,
Black Berry OS from Black Berry, Windows Phone from Microsoft.
Android Operating System
 It is a Linux based OS developed for touch screen mobile devices.
 It was developed by Android Inc. in 2003
 In 2005 Google acquired Android.
 Android has a large community of developers writing applications called „apps‟.
 Apps are developed using customised version of Java programming language.
 Most of these apps are available in „PlayStore‟ and can be freely downloadable.

ICT in Business
 Some major developments in business through the use of ICT are
o Social Network and big data analytics
o Business Logistics
Social Network and big data analytics
 Big data analysis is the process of examining large data sets containing a variety of data to uncover
hidden patterns, market trends, customer preferences etc.
Business Logistics
 It is the management of the flow of goods in a business between the point of origin and to the point
of consumption in order to meet the customer requirements.
RFID(Radio Frequency Identification)
 This Technology can be used to identify, track or detect a wide variety of objects in logistics.
 RFID consists of tag and reader.
 The tag contains a microchip for storing data and an antenna for sending and receiving data.

Information Security
1. Intellectual Property Right (IPR)
Intellectual Property Right

Industrial property Copyright

Patents Trademark Industrial Design Geographical Indication


 IPR is divide into 2 categories
A. Industrial Property
B. Copy Right
A. Industrial Property
 Industrial Property Right applies to industry, commerce and agricultural products.

246
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

 It protects
o Patents to inventions
o Trademarks
o Industrial designs
o Geographical indications.
 Patents
 It is the exclusive rights granted for an invention.
 To be patentable an invention must
o Relate to a process or product.
o be new
o involve an inventive step
o be capable of industrial use
o Not to be developed with the intention to harm others.
 The term for every patent in India is 20 yrs from the date of filing patent application.
 Trademarks
 It is a distinctive sign or logo that identifies certain goods or products by an individual
or a company.
 The initial term for registration is 10 years there after it can be renewed.
 Industrial designs
 Industrial design right protects the visual design of objects.
 Geographical indications
 Geographical indications are signs used on goods having a specific geographic origin
and possess qualities due to that place of origin.
 eg. Palakkadan Matta Rice, Aranmula Kannadi etc.
B. Copy Right
 It is a legal right given to the creators for an original work usually for a limited period of time.
 This work can be any form like books, music, painting, films, s/w etc.
 Under Indian copy right act a work is automatically protected by copy right when it is created.
 The copyright lasts for 60 years after the death of its Author.
DIFFERENCES IN THE REGISTRATION OF RIGHTS OF INTELLECTUAL PROPERTY
Patent Trademark Copyright
Refers to Product, Name, Logo, Creative, intellectual or artistic forms of work
process Symbols
Registration Required Required Automatic, can be registered
Duration 20 years 10 years Until 60 years after the death of the last
surviving author.
Renewable No Yes No
2. Infringement
 Unauthorized use of intellectual property right such as patents, trademark, copyrights etc are
called Intellectual Property Infringement.
3. Cyber Space
 It is a virtual environment created by computers and other devices connected to internet.
4. Cyber Crime
 Cyber crime is defined as criminal activity in which computer or computer network is used as a tool,
target or a place of criminal activity.
Cyber Crimes

Cyber crimes against individuals Cyber crime against property Cyber Crime against Government
Identity theft Credit card fraud Cyber terrorism
Harassment Intellectual Property theft Website defacement
Impersonation and cheating Internet time theft Attacks against e-
Violation of privacy governance websites
Dissemination of obscene materials

a. Cyber crime against individual

247
Join Now: https://join.hsslive.in Downloaded from https://www.hsslive.in ®

i. Identity theft
 Here a person uses another person‟s identifying information like their name, user id,
credit card number etc without their permission to commit fraud activities.
ii. Harassment
 Harassment involves posting humiliating comments on gender, race, religion etc.
 The use of vulgur (indecent) language is also considered as harassment.
 The use of internet to harass someone is called cyber stalking.
iii. Impersonation and cheating
 Impersonation is an act of pretending to be another person for harming the victim.
iv. Violation of privacy
 Violation of privacy is the intrusion into personal life of another, without a valid
reason.
v. Dissemination of obscene materials
 Distributing and posting sexual material is a cyber crime.
 It is also known as pornography.
b. Cyber crime against property
i. Credit cards fraud
 Credit card fraud involves unauthorized usage of another person‟s credit card
information for purchase or fund transfer.
ii. Intellectual property theft
 An intellectual property theft is the infringement or violation of an intellectual
property right.
 Copying of another person‟s language, thoughts and ideas and presenting them as
one‟s own original work is called Plagiarism and it can be easily detected using
online tools..
iii. Internet time theft
 The use of internet time by unauthorized persons without permission of the person
who pay for it is called internet time theft..
c. Cyber crime against government
i. Cyber terrorism
 Cyber terrorism is a cyber attack against sensitive computer networks like nuclear
power plant, air traffic control, telecom etc.
ii. Website defacement
 Hacking of govt. websites and posting hateful comments about govt. in those
websites.
iii. Attacks against e-governance websites
 These types of attack deny a particular online government service.
 This is done by using DDoS(Distributed Denial of Service) attack.
5. Cyber Laws
 They are the rules that govern the use of computer and internet.
 Cyber crimes are subject to Indian Penal Code, Information Technology Act, 2000 and IT Act
Amendment Bill 2008.
6. Cyber Forensics
 Cyber forensics is the discipline that combines law and computer science to collect and analyze
data from computer systems, networks, communication systems and storage device and to
present this evidence to courts.
7. Infomania
 Infomania refers to problems created by information overloading.
 Infomania is the excess enthusiasm for collecting knowledge. This may result in neglecting more
important things like family, duties etc.

248

You might also like