0% found this document useful (0 votes)
55 views72 pages

Hsslive-xii-comp-app--comm-act-malappuram-english

The document is a comprehensive guide on C++ programming, covering fundamental concepts such as character sets, tokens, data types, control statements, arrays, and functions. It includes detailed explanations, examples, and sample questions to reinforce understanding. The content is structured into chapters, making it suitable for teaching computer applications in commerce for second-year students.

Uploaded by

muhalthaf101
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)
55 views72 pages

Hsslive-xii-comp-app--comm-act-malappuram-english

The document is a comprehensive guide on C++ programming, covering fundamental concepts such as character sets, tokens, data types, control statements, arrays, and functions. It includes detailed explanations, examples, and sample questions to reinforce understanding. The content is structured into chapters, making it suitable for teaching computer applications in commerce for second-year students.

Uploaded by

muhalthaf101
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/ 72

1

ACT -ASSOCIATION OF COMPUTER TEACHERS


MALAPPURAM

FOCUS AREA 2022


COMPUTER APPLICATION (COMMERCE)
SECOND YEAR

prepared by:

 LIJU MATHEW MARTHOMA HSS CHUNGATHARA


 PRIYA M D GHSS PURATHUR
 MOHAMMED JASIM K DHOHSS POOKKARATHARA
 ABDUL MAJEED C GHSS PATTIKKAD
 VARUN C S PMSAMAHSS CHEMMANKADAVU
 ROSHID P K M E S HSS MAMPAD
2

CHAPTER 1 – REVIEW OF C++ PROGRAMMING

Character set
Fundamental units of C++ Language. It consists of letters, digits, special characters, white
spaces etc
Tokens
Fundamental building blocks of a program. Tokens are classified into keywords, identifiers,
literals , punctuators and operators
Keywords
Reserved words in C++ . it convey a specific meaning to the language compiler.
Eg : break , long , for etc
Identifiers
Name given to different program elements such as memory locations , statements etc.
Eg : n1 , sum , avg_ht etc
• Identifier is a sequence of letters , digits and underscore.
• The first character must be letter or underscore
• Keyword cannot be used as an identifier.
• Special characters or white spaces cannot be used
• Identifier for memory location is called variable.
• Identifier for a statement is called label.
• Identifier for group of statements is called function name.
Literals
Constant values used in programs. (Token that do not change their value during the program
run)
• Integer literals : Whole numbers Eg : 25 , -45 , +12 etc
• Floating point literals : Numbers having fractional parts Eg : 12.5 , -2.50 etc
• Character literals : A character in single quotes Eg: ‘A’ , ‘b’ , ‘8’ ,
(Escape sequences are character constants used to represent non graphic symbols. Eg: ‘\n’ , ‘\t’ etc
)
• String literals : One or more characters within double quotes. Eg: “A”, “break” , “123” etc
Punctuators
3

Special symbols used in program Eg : # , { , ( , ] etc

Operators
Symbols used to represent an operation Eg : + , < , * , && , ||
• Unary operator – operates on a single operand.
Eg : Unary + , Unary - , ++ (increment operator), -- (decrement operator), logical NOT (!)
• Binary operator – operates on two operans
Eg : Arithmetic operators ( + , - , * , / , % )
Relational operators ( < , <= , > , >= , == , != )
Logical operators ( Logical AND ( &&) , Logical OR ( ||)
Arithmetic assignment operator ( += , -= , *= , /= , %= )
• Ternary operator – operates on three operands
Eg: conditional operator ( ? : )
Data types
Used to identify the nature of data and set of operations that can be performed on data.
Fundamental data types in C++ are void, char, int , float and double
Variable
Identifier ( Name) given to memory location
• Variable name – the name given to memory location
• L value – the memory address
• R value – The value stored in the variable ( content)
Type modifiers
Used to modify the size of memory space and range of data
Type modifiers in C++ are signed , unsigned , long and short
Type conversion
The process of converting the current data type of a value into another type.
• Implicit type conversion ( Type promotion)
• Explicit type conversion (Type casting )
Expressions
Expressions are constituted by operators and required operands to perform an operation
• Arithmetic expression Eg : a+b , a*b
a. Integer expression Eg ; 5 + 4 , 10 * 5
b. Real expression Eg : 2.5 + 3.0 , 5.0 / 2.5
4

• Relational expression Eg : a <= b , a==5


• Logical expression Eg : ( a<=5 ) && ( b<3 )
Statements
Smallest executable unit of a C++ program. Every C++ statement end with semi colon (;)
• Declaration statement - Specifies the type of data that will be stored in a variable.
Syntax : data_type variable name ;
Eg : float n1;
• Input statement - Specifies an input operation.
Syntax : cin>>variable ;
Eg : cin>> n1;
• Output statement – Specifies an output operation
Synatax : cout << data ;
Eg : cout<< “Welcome” ;
cout << n1;
• Assignment statement – stores value to a variable
Syntax : variable = value;
Eg : n1 = 100 ;

Structure of a C++ program


#include < header file >
using namespace std;
int main ()
{
statements ;
....................
return 0 ;
}

Control Statements
Control statements are used to alter the normal flow of execution
1. Selection statements / Decision making statements -
if , if ..... else , if ...... else ...... if ladder , switch
2. Iteration statements / Looping statements
for , while , do .... while
Selection Statements / Decision making statements
Statements are selected for execution based on a condition.
5

Statement Syntax Example


if ( test expression )
{ if (mark>=18)
if statement
statement block; cout<<”Passed” ;
}
if ( test expression )
{
statement block 1; if (mark>=18)
if ...... else } cout<<”Passed” ;
statement else else
{ cout <<”Failed “ ;
statement block 2 ;
}
if ( test expression )
{
statement block 1;
}
if (mark>=80)
else if ( test expression 2 )
cout<<”A Grade”;
{
else if(mark>=60)
statement block 2 ;
cout<<”B Grade “ ;
}
if .... else ... if else if(mark>=40)
else if (test expression 3 )
ladder cout<<”C Grade”;
{
else
statement block 3 ;
cout<<”D
}
Grade”;
.........................
else
{
statement block n;
}
switch(variable / expression)
{
switch(n)
case constant_1 : statement 1;
{
break;
case 1 : cout<<”One”;
case constant_2 : statement 2;
break;
switch statement break;
case 0 : cout<<”Zero”
case constant_3 : statement 3;
break;
break;
default : cout<<”Invalid”;
.............................................
}
default : statement n;
}
Conditional Operator ( ? : )
It is a ternary operator of C++ . It is an alternative of if ..... else statement
6

Syntax : (test expression) ? True statement : false statement ;


Eg : (mark>=18) ? cout<<”Passed”:cout<<”Failed” ;

Iteration statements / Looping statements


Statements that allow repeated execution of a set of one or more statements.

Components of a Looping statement


• Initialisation
• Test expression / Condition
• Body of the loop
• Update expression

Iteration statements are classified into two: entry- controlled and exit-controlled.
In entry-controlled loop, test expression is evaluated before the execution of the loop-body.
Eg : for , while
In exit-controlled loop, condition is checked only after executing the loop- body.
Eg : do .... while

Statement Syntax Example


for (initialisation ; test expression ; update expression)
{ for (i=1;i<=10;++i)
for loop
Body of the loop; cout<<i;
}
Initialisation; i=1 ;
while (test expression) while (i<=10)
{ {
while loop
Body of the loop; cout<<i;
Update expression ; ++i;
} }
Initialisation; i=1 ;
do do
{ {
do....while loop
Body of the loop; cout<<i;
Update expression ; ++i;
}while(test expression); }while(i<=10);

Jump Statements
Jump statements are used to transfer the program control from one place to another.
C++ provides four jump statements
7

• goto – transfer the program control to a label


• break – break transfer the program control outside the loop or switch
• continue - continue transfer the program control to the next iteration
• return - used to transfer control back to the calling program or to come out of a function.

Sample questions
1. A ............... statement in a loop forces the termination of the loop.
2. The insertion operator in C++ is ............
3. The operator which is used to find the remainder during arithmetic division is ...........
4. ............. is an exit controlled loop (while, for, do ...... while , break)
5. The operator which is an alternative of if ....... else statement.
6. Define type modifiers in C++ . List type modifiers in C++.
7. Compare break and continue statements in C++.
8. What are the main components of a loop
9. Explain switch statement with example.
10. Explain implicit and explicit conversions.
11. Write the output of the following code
for(i=1; i<=5 ; ++i)
{
cout<<’\t’<<i;
if(i==3) break;
}
12. Rewrite the following code using for loop
sum=0;
i=0;
while(i<10)
{
sum=sum+i;
i++;
}
cout<<”sum=”<<sum;
13. Rewrite the code using switch statement
cin>>pcode;
if(pcode==’c’)
cout<<”computer”;
8

else if(pcode==’m’)
cout<<”mobile phone”;
else if(pcode==’l’)
cout<<”laptop”;
else
cout<<”invalid”;
14. Rewrite the following code using for loop
int x =1;
start :
cout << x;
x=x+5;
if(x<=50)
goto start;

CHAPTER 2 – ARRAYS
9

Array
Array is a collection of elements of same type placed in contiguous memory location
Eg : A[10] , NUM[20]
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 N[10] ;
float A[5] ;
char name[25] ;

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} ;
float A[5]={10.5,12.0,5.75,2.0,14.5} ;
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:
The number of bytes needed to store the array int A[10] is 4 x 10=40 bytes.
The number of bytes needed to store the array float P[5] is 4 x 5 = 20 bytes.
The memory needed to store the array char S[25] is 1 x 25 is 25 bytes.
The memory needed to store the array int Num[ ]={25,65,14,24,27,36} is 4 x 6 =24
bytes.

Array traversal operation


Accessing each element of an array at least once in a program is called array traversal.
• C++ statement to display the elements of an array N[10]
for(i=0 ; i<10 ; ++i)
cout<<N[i] ;
• C++ statement to input 10 numbers into an array N[10]
10

for(i=0 ; i<10 ; ++i)


cin>>N[i] ;
Write a C++ program to input 10 numbers into an array and display the sum of numbers
#include<iostream>
using namespace std;
int main()
[
int N[10], i , s=0 ;
cout<<”Enter 10 numbers “;
for(i=0 ; i<10 ; ++i)
{
cin>>N[i] ;
s=s+N[i] ;
}
cout<<”Sum of 10 numbers is “<<s;
return 0;
}

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.

Memory allocation for strings


The memory required to store a string will be equal to the number of characters in the string
plus one byte for null character.

Input/Output operations on strings


By using input operator >> , 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] ;
11

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).
Eg :
char str[10] = "friends";
puts("hello");
puts(str);
The output of the above code will be as follows:
hello
friends

Sample questions
1. ................. character is stored at the end of the string
2. Accessing each element of an array at least once to perform any operation is called ..........
3. How many bytes will be allocated for the following array
int ar[ ]={3,7,8,2};
4. Find the value of sore[4] based on the following declaration statement
int score[5]={98,87,92,89,75};
5. Consider the following statement arr[5]={1,5,8,3,19};
a)Write the value of arr[3]?
b)Write the value of arr[4] – 5
6. Write C++ statement to initialize an array named ‘MARK’ with values 70,80,85,90
7. Define Array.
(1) Declare an array of size 20 to store a string
(2) Write C++ statement to store the string “welcome” in that array
8. How many bytes are required to store the string “HELLO WORLD”
9. Consider the C++ statement char first [ ] = “School”;
Write the output of the following
(a) cout<< first ;
(b) cout <<first[1] ;
(c) Find the size of the array first [ ]
10. Consider the following code
12

a) char str[20];
cin>>str ;
cout<<str;
b) char str[20];
gets(str);
cout<<str;
what will be the output if we input “NEW DELHI” . Justify your answer

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

Merits of Modular programming


• Reduce the size of the program
• 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.
main() is an essential function in C++ program . The execution of the program begins in main().
Two types of functions
• Predefined functions / built-in functions - ready to use programs
• User defined functions

Arguments / Parameters
The data required to perform the task assigned to a function. They are provided within the pair
of parentheses of the function name.

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

Built-in functions

1. Console functions for character I/O


• getchar( ) - used to input a character
Header file : cstdio
Syntax : char variable=getchar( ) ; OR getchar(char variable) ;
Eg: char ch=getchar( ) ; // the character input through the keyboard is stored in the
variable ch
• putchar( ) - used to display a character
Header file : cstdio
Syntax : putchar ( variable / character constant )
Eg: char ch = 'B' ;
14

putchar(ch) ; // displays B
putchar('C'); // displays C

2. Stream functions for input / output operations


• get( ) - used to input a single character or stream of characters
Header file : iostream
Syntax : cin.get(variable) ; cin.get(array name , size) ;
Eg: cin.get(ch) ; // accepts a single character
cin.get( str10) ; // accepts a string of maximum 10 characters
• 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
cin.getline(str,10,'c') ; // accepts a string or maximum 10 characters or a string up to the
character 'c'
• put( ) - used to display a character
Header file : iostream
Syntax : cout.put(variable or character constant) ;
Eg : char ch='B' ;
cout.put(ch) ; // displays B
cout.put('P') ; // displays P
• write( ) - used to display a string
Header file : iostream
Syntax : cout.write(arraymame , len) ;
Eg : char str[20]=”HELLO FRIENDS” ;
cout.write(str,5) ; // displays HELLO

3. String functions
• strlen( ) - used to find the length of the string ( number of characters)
Header file : cstring
Syntax : int strlen(string) ;
Eg: strlen(“COMPUTER”) ; // displays 8
• strcpy( ) - used to copy a string to another
Header file : cstring
Syntax : strcpy( string1,string2) ;
15

Eg: char str[20];


strcpy( str, “welcome”) ; // the string “welcome” will be stored in the variable str
• strcat( ) - used to append one string to another (join two strings)
Header file : cstring
Syntax : strcat(string1,string2) ;
Eg: cout<<strcat(“Welcome ” , “to C++”) ; // displays Welcome to C++
• strcmp( ) - used to compare two strings . The result will be 0 if two strings are same
Header file: cstring
Syntax : strcmp(string1,string2) ;
Eg: cout<<strcmp(“Hello”,”Hello”); // displays 0
• 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
• abs( ) - used to find the absolute value of a number
Header file : cmath
Syntax : int abs( int) ;
Eg : cout<<abs(-5) ; // displays 5
• sqrt( ) - used to find the square root of a number
Header file : cmath
Syntax : double sqrt(double) ;
Eg : cout<<sqrt(16) ; // displays 4
• 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.
Header file : cctype
Syntax : int isupper (char) ;
Eg : cout<<isupper('A') ; // displays 1
16

cout<<isupper('d') ; // displays 0
• 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
cout<<islower('d') ; // displays 1
• 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('8') ; // displays 1
cout<<isdigit('b') ; // 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('a') ; // 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


The syntax of a function definition is given below:
data_type function_name(argument list)
{
17

statements in the body;


}
The data_type is any valid data type of C++. The function_name is a user defined word (identifier).
The argument list is a list of parameters, i.e. a list of variables preceded by data types and
separated by commas.

Example 1 Example 2 Example 3 Example 4


int sum(int a , int b) void sum(int a , int b) void sum(i) int sum(i)
{ { { {
int s=a+b ; int s=a+b ; cin>>a>>b; cin>>a>>b;
return s; cout<<”Sum=”<<s; int s=a+b ; int s=a+b ;
} } cout<<”Sum=”<<s; return s ;
} }

Prototype of functions
A function prototype is the declaration of a function
Syntax : data_type function_name(argument list);
Eg : int sum( int , int ) ;
void sum( ) ;
int sum( ) ;

Arguments of functions
• Arguments or parameters are the means to pass values from the calling function to the called function.
• 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 (original) arguments.

Methods of calling functions


• Call by value (Pass by value) method - a copy of the actual argument is passed to the function.
• Call by reference (Pass by reference) method - the reference of the actual argument is
passed to the function.

Difference between 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
parameters. formal parameters.
• Actual parameters may be constants, • Actual parameters will be variables
variables or expressions. only.
• Exclusive memory allocation is • Memory of actual arguments is
18

required for the formal arguments. shared by formal arguments.


• The changes made in the formal • The changes made in the formal
arguments do not reflect in actual arguments do reflect in actual
arguments. arguments.

Scope and life of variables and functions


Local variable - declared within a function or a block of statements.
Global variable - declared outside all the functions.
Local function - declared within a function or a block of statements and defined after the
calling function.
Global function - declared or defined outside all other functions.

Sample Questions
1. The variables used in the function definition are called ...............
2. The data required for a function to perform the task assigned to it are called as _________.
3. The process of breaking large program into smaller sub programs is called ...............
4. What will be the result of following C++ statements ?
(a) Strlen (“Application”); (b) Pow (5, 3);
5. Briefly explain, how call by value method is different from call by reference method.
6. ............. function is send to check whether a character is alpha numeric
7. Name the mathematical function which returns the absolute value of an integer number
8. a. Define modular programming
b. Explain the merits of modular programming
9. Explain any two built-in functions in C++ that are used for string manipulation.
10. .................... function is used to append one string to another string in C++.
11. Identify the built in function for the following
a. to convert -25 to 25
b. compare ‘computer’ and ‘COMPUTER’ ignoring cases
c. to check given character is digit or not
d. to convert the character ‘B’ to ‘b’
e. to find the square root of a number
12. Pick the character function from the following
abs(), isdigit() , strcpy()
13. Differentiate actual arguments and formal arguments
14. Write the output of the following C++ code segment
19

char s1[10]=”Computer”;
char s2[15]=”Application”;
strcpy(s1,s2);
cout <<s2;
15. Explain two stream functions for input operations with example
16. Consider the following code
char s1[10] = "hello" , s2[10];
strcpy (s2, sl);
cout << s2;
What will be the output ?
17. Consider the following code
char s1[10] = "hello" , s2[10]=”HELLO”;
int n=strcmpi(s1 , s2) ;
cout << n;
What will be the output ?
18. Consider the following code
char S1[20]= "welcome ";
char S2[20] = “ to C++” ;
strcat(S1,S2);
cout<<S1;
What will be the output ?

CHAPTER 4 – WEB TECHNOLOGY

Website
• A 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. Communication on the web can be classified as:

1. Client to web server communication


20

• 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. Here, Web server of online shopping
website send confidential information to bank web server and vice versa.
Payment gateway is a server that acts as a bridge between merchant server and bank server and
transfers money in an encrypted format whenever an online payment is made.
Web server
• A web server is a powerful computer that hosts websites.
• It consists of a server computer that runs a server operating system and a web server software.
• Eg. for server operating system: Ubuntu, Microsoft Windows Server
• Eg. for web server software: Apache Server, Microsoft Internet Information Server (IIS)
Data center
• A data center is a dedicated physical location where organisations house their servers and networking
systems. It is equipped with redundant power supplies, cooling systems, high speed networking
connections and security systems.
Software ports
• A software port is used to connect a client computer to a server to access its services like HTTP, FTP,
SMTP, etc.
• To distinguish the ports, the software ports are given unique numbers. It is a 16-bit number.
• Some well-known ports and the associated services are:
Default Port No. Service
20 & 21 File Transfer Protocol (FTP)
22 Secure Shell (SSH)
25 Simple Mail Transfer Protocol (SMTP)
53 Domain Name System (DNS) service
80 Hypertext Transfer Protocol (HTTP)
110 Post Office Protocol (POP3)
443 HTTP Secure (HTTPS)

DNS (Domain Name System) servers


• DNS server returns the IP address of a domain name requested by the client computer.
How the DNS resolves the IP address?
When we type the domain name (eg:- www.keralapolice.org) in our browser,
– The browser first searches its local cache memory for the corresponding IP address.
– If it is not found in the browser cache, it checks the operating system's local cache.
– If it is not found there, it searches the DNS server of the local ISP.
21

– If it is not found there, the ISP's DNS server initiates a recursive search starting from the
root server till it receives the IP address.
– The ISP's DNS server returns this IP address to the browser.
– The browser connects to the web server using the IP address.
Web designing
• Web designing is the process of designing attractive web sites.
• Any text editor can be used to design web pages.
• Several softwares are also available for designing web pages.
• Eg:- Bluefish, Bootstrap, Adobe Dreamweaver, Microsoft Expression Web, 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. Development requires programming skills.

Scripts
• Scripts are program codes written inside HTML pages.
• Script are written inside <SCRIPT> and </SCRIPT> tags.
Types of scripting languages
• Scripting languages are classified into two:
1. Client side scripts Eg:- JavaScript, VB script.
2. Server side scriptsEg:- Perl, PHP, ASP, JSP, etc.

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.
Users can block. Users cannot block.
Browser dependent Not browser dependent

Scripting languages
JavaScript
• It is a client side scripting language.
• Works in every web browser.
• JavaScript file has the extension ‘.js’.
Ajax
22

• Ajax stands for Asynchronous JavaScript and Extensible Markup Language (XML).
• It helps to update parts of a web page, without reloading the entire web page.
VB Script
• Developed by Microsoft.
• It can be used as client side/server side scripting language.
PHP
• PHP stands for 'PHP: Hypertext Preprocessor'.
• It is a server side open source scripting language.
• It support database programming.
• PHP file has the extension ‘.php’.
Active Server Pages (ASP)
• It is a server-side scripting environment developed by Microsoft.
• Uses VBScript or JavaScript as scripting language.
• ASP files have the extension .asp.
• It provides support to a variety of databases.
Java Server Pages (JSP)
• It is a server side scripting language developed by Sun Microsystems.
• JSP files have the extension .jsp.
Cascading Style Sheet (CSS)
• It is a style sheet language used to define styles for webpages. (colour of the text, the style of fonts,
background images, etc.)
• CSS can be implemented in three different ways:
◦ Inline - the CSS style is applied to each tag.
◦ Embedded - CSS codes are placed within the <HEAD> tag.
◦ Linked CSS - external CSS file linked with the webpage.
Advantages of using CSS
• We can reuse the same code for all the pages.
• It reduces the size of the web page.
• Easy for maintenance.
HTML (Hyper Text Markup Language)
• HTML is the standard markup language for creating Web pages.
• The commands used in HTML are called tags.
• The additional information supplied with HTML tags are called attributes.
Eg:- <BODY Bgcolor = "Yellow">
23

Here, <BODY> is the tag, Bgcolor is the attribute, Yellow is the value of this attribute.
• HTML file is to be saved with an extension .html or .htm
The basic structure of an HTML document
<HTML>
<HEAD>
<TITLE> ....... title of web page......... </TITLE>
</HEAD>
<BODY>
...............contents of webpage..........................
</BODY>
</HTML>

Container tags and empty tags


• Tags that requires opening tag and closing tag is called container tag.
Eg: <HTML> and </HTML>
• Tags that requires only opening tag is called empty tag.
Eg: <BR>, <IMG>
Essential HTML tags
Tags Use Attributes Values & Purpose
To specify the direction of the text. Values: ltr
Dir
To Start an HTML (left-to-right), rtl (right-to-left).
<HTML>
document To specify the language.
Lang
“En” for English, “Hi” for Hindi
<HEAD> To specify head Section of the web page
<TITLE> Text to be displayed in the title bar of a web browser.
To specify the background colour of the
Bgcolor webpage.
Eg:- <BODY Bgcolor = "grey">
To set an image as back ground of web page.
Background
Content to be displayed in Eg:- <BODY Background = "Sky.jpg">
<BODY>
the browser window. To specify the colour of the text content.
Text
Eg:- <BODY Text = "yellow">

Link To specify colour of unvisited hyperlink.


24

Alink To specify colour of active hyperlink.


Vlink To specify colour of visited hyperlink.
To leave some blank area on the left side of the
Leftmargin
document.
To leave some blank area on the top edge of the
Topmargin
document.

Some common tags


Tags Use Attributes Values & Purpose
Values: left, right, center
<H1>, <H2>, Different Levels of Headings.
Eg:-
<H3>, <H4>, <H1> - biggest Align
<H1 Align= "left"> This is a
<H5> & <H6> <H6> - smallest
Heading type 1 </H1>
Values: Left, Right, Center,
<P> To create a paragraph. Align
Justify.
<BR> To break current line of text. No attributes.
Size To specify the thickness of the line
Width To specify the width of the line.
<HR> To draw a horizontal line. Align To specify the alignment of the line
Color To specify colour of the line.
Noshade To avoid shading to the line.
To bring the content to the centre
<CENTER> No attribute.
of the browser window.

Text Formatting Tags


These tags are used to format text in a web page. These are container tags.

Tags Use
<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
25

<Q> To enclose the text in “double quotes”


<BLOCKQUOTE> To indent the text

Some other Tags

Tags Use Attributes Values & Purpose


<PRE> To display pre-formatted text.
Eg:- <ADDRESS>
SCERT,<BR>
To display address of author of a
<ADDRESS> Poojappura,<BR>
document.
Thiruvananthapuram,<BR>
</ADDRESS>
Height To set the height of the marquee.
Width To set the width of the marquee.
To specify the direction of scrolling.
Direction
To scroll a text or image. Values: left, right, up, down
To specify the style of scrolling.
Eg:- scroll : normal scrolling
Behavior
<MARQUEE Height= "20" slide : scroll and stay
<MARQUEE> Bgcolor="yellow" alternate : bidirectional scrolling
Direction="right"> This will To specify time delay between each
Scrolldelay
scroll from left to jump.
right</MARQUEE> Scrollamount To specify the speed.
To specify how many times the
Loop
marquee should scroll.
To specify the background color for
Bgcolor
marquee.
Sets the horizontal alignment.
Align
Values: left, right, center, justify.
Defines a section in the document
<DIV> Id Assigns a unique id for the tag.
with separate alignment and style.
To render the content in terms of
Style
colour, font, etc.
<FONT> To change the size, style and Color To set the text colour.
colour of the text. Face To set the font face like Arial,
Courier New, etc.
26

Size To set the font size.


Eg:- <FONT Size="6"
Face="Courier New"
Color="red">This text is red To specify the file name of the
Src
image
To specify alignment of the image.
To insert image in a web page. Align
Values: Bottom, Middle, Top
<IMG> Width To specify the width of image.
Eg:- <IMG Src=”Flower.jpg”
Height To specify the height of image.
width=”50%” height=”60%”>
To display a text if the browser
Alt
cannot display the image.
Border To set a border around the image.

Comments in HTML document


• Comments help us to understand the code.
• HTML comments are placed within <!-- --> tag.
• Comments are not displayed in the browsers.
• Eg:- <!-- This is a comment -->

Sample Questions
1. Expand DNS.
2. A Domain Name System returns the .................. of a domain name.
3. Expand HTTPS.
4. Compare static and dynamic webpages.
5. What are the differences between client side and server side scripts ?
6. What is a Script ? Name any two server side scripting languages.
7. Name two technologies that can be used to develop dynamic web pages.
8. A JavaScript file has the extension .............
9. The number of bits in a software port number is ..............
a. 8 b. 16 c. 32 d. 64
10. Write the port number for the following web services.
(i) Simple Mail Transfer Protocol (ii) HTTP Secure (HTTPS)
11. Write the service associated with the following software port number.
27

Port Number Service


25
80
443
12. List the different ways of implementing CSS.
13. What is the expanded form of HTML ?
14. Who developed HTML?
15. Write the basic structure of HTML document.
16. What is a container tag ? Write an example.
17. The type of tag that requires only a starting tag but not an ending tag is called ..................
18. Write the use of the following tags.
(a) <B> (b) <I> (c) <U> (d) <Q>
19. Classify the following into tags and attributes :
(a) BR (b) WIDTH (c) LINK (d) IMG
20. Write the purpose of <B> Tag and <U> Tag.
21. Name some of the text formatting tags.
22. Write the names of any three attributes of <BODY> tag.
23. Name any two attributes of <FONT> Tag.
24. For scrolling a text, we use ................ tag.
25. What are the main attributes of <MARQUEE> tag?
26. .................. is the main attribute of <IMG> tag.
28

CHAPTER 5 – WEB DESIGNING USING HTML

Lists in HTML
• There are three kinds of lists in HTML – Unordered lists, Ordered lists and Definition lists.

1. Unordered lists
• Unordered lists or bulleted lists display a bullet in front of each item in the list.
• <UL> tag: To create Unordered list.
• <LI> tag: To add items in the list.
• Attribute of UL tag: Type. (Values: Disc, Square, Circle.)
Eg: <UL Type= "Square">
<LI> RAM </LI>
<LI> Hard Disk </LI>
<LI> Mother Board </LI>
</UL>

2. Ordered lists
• Ordered lists or numbered lists present the items in some numerical or alphabetical order.
• <OL> tag: To create Ordered list.
• <LI> tag: To add items in the list.
• Attributes:
(1) Type: Values: “1”, “I”, “i”, “a” and “A”.
(2) Start: To specify the starting number.
Eg: <OL Type= "A" Start= "5">
<LI> Registers </LI>
<LI> Cache </LI>
<LI> RAM </LI>
</OL>

3. Definition lists
• Definition List is a list of terms and its definitions.
• <DL> tag: To create Definition list.
• <DT> tag: To specify the term, <DD> tag: To add its definition.
Eg: <DL>
<DT>Spam :</DT>
<DD> ............Definition of Spam ..............</DD>
29

<DT>Phishing :</DT>
<DD> ........... Definition of Phishing.......... </DD>
</DL>
Nested lists
• A list inside another list is called nested list.
• Eg: an unordered list inside another unordered list, an unordered list inside an ordered list, etc.
Creating links
• A hyperlink is a text/image that links to another document or another section of the same document.
• The <A> Tag (Anchor tag) is used to create Hyperlinks.
• Attribute: Href, Value is the URL of the document to be linked.
• Eg: <A Href= "http://www.dhsekerala.gov.in">Higher Secondary Education</A>.
There are two types of linking – internal linking and external linking.
1. Internal linking
• Link to a particular section of the same document is known as internal linking.
• The Name attribute is used to give a name to a section of the web page. We can refer to this section
by giving the value of Href attribute as #Name from another section of the document.
2. External linking
• The link from one web page to another web page is known as external linking.
• Here, the URL / web address is given as the value for Href attribute.
URL
• URL stands for Uniform Resource Locator, and it means the web address.
Creating graphical hyperlinks
• We can make an image as a hyperlink using <IMG> tag inside the <A> tag.
• Eg:- <A Href= "https://www.wikipedia.org"><IMG Src= "wiki.jpg"></A>
e-mail linking
• We can create an e-mail hyperlink to a web page using the hyperlink protocol mailto:
• Eg:- <A Href= mailto: "[email protected]">Mail SCERT Kerala </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: To play a background music while the page is viewed.
30

Creating tables in a web page


Tags Use Attributes Values & Purpose
Border To specify the thickness of the table border.
Bordercolor To assign colour to the table border.
Align To specify position of the table.
Bgcolor To set the background colour of the table.
<TABLE> To create a table.
Background To assign a background image for the table.
Cellspacing To specify the space between cells.
To specify space between cell border and
Cellpadding
its content.
To specify the horizontal alignment of text.
Align
(Values: left, right. center).
To specify the vertical alignment of text.
<TR> To create rows in a table Valign
(Values: Top, Middle, Bottom).
To specify background colour to a particular
Bgcolor
row.
To specify horizontal alignment of text within
Align
a cell.
<TH> To specify vertical alignment of text within a
To define heading cells. Valign
cell.
The text will be bold.
Bgcolor To specify background colour for a cell.
To span a cell over 2 or more columns in a
To define data cells. Colspan
<TD> row.
To span a cell over 2 or more rows in a
Rowspan
column.
<CAPTION> To provide heading to a table.

Eg: <TABLE Border= "3" Align= "left" >


<TR>
<TH>Roll No</TH>
<TH>Name</TH>
</TR>
<TR>
<TD>1</TD>
<TD>Aliya</TD>
</TR>
<TR>
<TD>2</TD>
31

<TD>Arun</TD>
</TR>
</TABLE>

Dividing the browser window


• The browser window can be divided into two or more panes to accommodate different pages
simultaneously.

Tags Use Attributes Values & Purpose


To specify the number of vertical
Cols
frames
To partition the browser
To specify the number of horizontal
<FRAMESET> window into different frame Rows
frames
sections.
To specify thickness of border for
Border
the frames.
To specify the page to be loaded
To define the frames inside the Src
<FRAME> into the frame.
<FRAMESET>.
Name To give a name to the frame.
<NOFRAMES> To display some text in the window if browser does not support frames.

Eg:
<FRAMESET Rows= "30%, *"> [Horizontally divides the window into two frames]
<FRAME Src= "sample1.html">
<FRAME Src= "sample2.html">
</FRAMESET>

Nesting of Framesets
• Inserting a frameset within another frameset is called nesting of frameset.
Forms in web pages
• HTML Forms are used to collect data from the webpage viewers.
• A Form consists of two elements: <FORM> container and Form controls (like text fields, drop-down
menus, radio buttons, etc.)

Tags Use Attributes Values & Purpose


<FORM> To create a Form. To specify URL of the form handler to
Action
process the received data.
Method To mention the method used to upload data.
32

Values: Get, Post


To specify the type of control. Values are:
Text: Creates a textbox.
Password: Creates a password box.
Checkbox: Creates a checkbox.
Type
Radio: Creates a radio button.
To make form controls Reset: Button to clear the entries in the form.
such as Text Box, Radio Submit: Button to submit all the entries to
<INPUT>
Button, Submit Button the server.
etc. Name To give a name to the input control.
Value To provide an initial value to the control.
To specify the width of the text box and
Size
password box.
To specify the number of characters that can
Maxlength
be typed into the text box and password box.
Name To give a name to the control.
To create multi-line text
<TEXTAREA> Rows To specify the number of rows in the control.
box.
Cols To specify the number of characters in a row.
Name To give a name to the control
To create a drop-down To specify whether it is a list box or combo
<SELECT> Size
list. box. Value 1 for combo box.
Multiple To allow users to select multiple items.
To add items in the
<OPTION> Selected To indicate default selection.
SELECT list.
<FIELDSET> To group related controls in the Form.
<LEGEND> To give a caption for FIELDSET group.

Sample Questions
1. What are the different types of lists in HTML?
2. Which are the attributes of <OL> tag ? Write their default values.
3. Write the names of tags used to create an ordered and un-ordered list.
4. Write HTML code to get the following output using ordered list.

III. PRINTER
IV. MONITOR
V. PLOTTER
33

5. Write the HTML code to display the following using list tag:
(i) Biology Science
(ii) Commerce
(iii) Humanities
6. What is a definition list ? Which are the tags used to create definition list ?
7. What is a hyperlink ? Which is the tag used to create a hyperlink in HTML document ?
8. Sunil developed a personal website, in which he has to create an e-mail link. Can you suggest the protocol
used to achieve this link.
9. Name any two associated tags of <TABLE> tag.
10. Write HTML program to create the following webpage :

11. Write any two attributes of <TR> tag.


12. Choose the odd one out:
a. TABLE b. TR c. TH d. COLSPAN
13. Which among the following is an empty tag?
(a) <TABLE> (b) <FRAMESET> (c) <FRAME> (d) <FORM>
14. What is the use of frame tag in HTML ?
15. Write the names and use of three attributes of <FORM> tag.
16. List out any 4 important values of TYPE attribute in the <INPUT> tag
17. Write any three attributes of <INPUT> tag.
18. Write the name of tag used to group related data in an HTML form.
34

CHAPTER 6 – CLIENT SIDE SCRIPTING USING JAVASCRIPT


JavaScript
• JavaScript is the most commonly used scripting language at the client side. JavaScript was developed
by Brendan Eich for the Netscape Browser. JavaScript is supported by all web browsers.
<SCRIPT>Tag
• <SCRIPT>tag is used to include scripting code in an HTML page. Scripts are programming codes
within HTML page. Language attribute specifies the type of scripting language used.
Eg:- <SCRIPT Language=”javascript”>
.............................................................
.............................................................
</SCRIPT>
How to design a web page using Java Script
<HTML>
<HEAD> <TITLE>Javascript - Welcome</TITLE> </HEAD>
<BODY>
<SCRIPT Language= "JavaScript">
document.write("Welcome to JavaScript.");
</SCRIPT>
</BODY>
</HTML>
This program is saved with .html extension.
Creating functions in JavaScript
• A function is a group of instructions with a name that can perform a specific task. JavaScript has a lot
of built-in functions that can be used for different purposes. In Javascript a function can be defined
with the keyword “function”. Normally functions are placed in the <HEAD> Tag of <HTML>.
• A function has two parts: function Header and function body(enclosed within { })
Eg. function print( )
{
document.write(“Welcome to JavaScript”);
}
Calling a function
• A function can be called using its name. Eg. print( )

Data types in JavaScript


(1) Number: All numbers fall into this category. Eg: 100, 9.8, -1.6, +10001
(2) String: Any combination of characters enclosed within double quotes.
35

Eg: “Hai”, “45”, “true”, “false”


(3) Boolean: Only two values fall in this type. They are True and False.
Variables in JavaScript
• var keyword is used to declare all type of variables. In JavaScript, declaring a variable does not
define the variable. It is complete only when it is assigned a value. JavaScript understands the type of
variable when a value is assigned to the variable.
Eg:- var x,y;
x=10;
y= “KERALA”;
Here, the variable x is of number type and y is of String type.
typeof() function: Used to find the datatype of a variable.
Eg :- typeof( ” Hello ” ) // returns String
typeof( 3.14 ) // returns Number
typeof( false) // returns Boolean
var p ;
typeof( p ) // returns Undefined

Operators in JavaScript
Category Operators Eg:- Result
+ 10 +5 15
- 10 - 5 5
Arithmetic Operators * 10 * 5 50
/ 10 /5 2
% 10 %5 0
< 10<5 false
> 10>5 true
<= 10<=5 false
Relational Operators
>= 10>=5 true
== 10==5 false
!= 10!=5 true
|| OR 10<5||10== 5 false
Logical Operators && AND 10<5 &&10 == 5 false
! NOT !(10==5) true
Increment and decrement ++ x++ x=x+1

Operator -- x-- x=x-1


36

Arithmetic assignment +=,- =, * =,/=and %=


Operator x+=10 means x=x+10

String addition + “Java” +“Script” result will be JavaScript

Control structures in JavaScript


Control
Syntax Eg:-
structure
if(condition) if(mark>17)
{ {
Simple if statements; alert(“passed”);
} }
if(condition) if(mark>17)
{ {
statements; alert(“passed”);
} }
if.. else
else else
{ {
statements; alert(“failed”);
} }
switch(expression) switch(letter)
{ {
case value1: statements; case 'a': alert(“apple”);
break; break;
case value2: statements; case 'b': alert(“ball”);
switch
break; break;
. case 'c': alert(“Cat”);
. break;
default: statements; default: alert(“Enter letter a-c”);
} }
var i,s=0;
for(initialisation;condition;updation) for(i=1;i<10;i++)
{ {
for loop
body of the loop; s=s+i;
} }
alert(s);
while loop Initialisation; var i=1,s=0;
while(condition) while(i<10)
{ {
body of the loop; s=s+i;
37

i++;
updation;
}
}
alert(s);

Built-in functions in JavaScript


1. alert() : This function is used to display a message on the screen
Eg: alert (“Welcome to JavaScript”);
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 (“65”) ---> False
isNaN (“ Big ”) ---> True
3. toUpperCase() : This function returns the upper case form of the given string
Example :-
var a , b ;
a =” abcd ”;
b = a.toUpperCase ( );
document . write ( b );
Output : ABCD
4. toLowerCase() : This function returns the lower case form of the given string.
Eg:- var x;
x=“JAVASCRIPT”;
alert(x.toLowerCase());
Output : javascript
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 (0); will return H
6. length property : length property returns the length of the string.
Eg:- var x;
x=“JavaScript”;
alert(x.length)); display 10
7. Number () function : Return value of a numeric string.
Example : Number (“65”) --> 65
38

Accessing values in a textbox using JavaScript


num = document.frmSquare.txtNum.value;
Here document refers the body section of the web page. frmSquare is the name of the Form
we have given inside the body section. txtNum is the name of the text box within the frmSquare and value
refers to the content inside that text box.
document.frmSquare.txtSqr.value = ans;
The above line assigns the value of the variable ans in the text box.

<INPUT Type= "button" Value= "Show" onMouseEnter= "showSquare()">


The function will be called for execution when you move the mouse over the button.

onMouseEnter , onClick , onMouseEnter , onMouseLeave , onKeyDown , onKeyUp are some of the


commonly used events where we can call a function for its execution.

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 <BODY> section in html
We can place the scripts inside the <BODY> tag. the scripts will be executed while the contents of
the web page is being loaded. The web page starts displaying from the beginning of the document. When
the browser sees a script code in between, it renders the script and then the rest of the web page is
displayed in the browser window.

b. Inside <HEAD> section in html


We can place the script inside <HEAD> section. It helps to execute scripts faster as the head
section is loaded before the BODY section. But the scripts that are to be executed while
loading the page will not work .

c. As External JavaScript file


Scripts can be placed into an external file ,saved with .’js’ extension. It can be used by multiple
HTML pages and also helps to load pages faster. The file is linked to HTML file using the <SCRIPT>
tag.
39

Eg: <SCRIPT Type=”text/JavaScript” src=”sum.js”>

Sample Questions
1. Which tag is used to include script in an HTML page?
2. What are the Data Types in Javascript?
3. Explain the operators in javascript.
4. What are the different methods for adding Scripts in an HTML Page?
5. Explain some common JavaScript events.
6. Explain Built - in Functions in JavaScript
7. The keyword used to declare a variable in Javascript is .............
40

CHAPTER 7 – WEB HOSTING


Web Hosting
• Web hosting is the service of providing storage space in a web server to serve files for a website.
• The companies that provide web hosting services are called web hosts.

Types of Web hosting


Three types of web hosting are:
1. Shared hosting
2. Dedicated hosting
3. Virtual Private Server

1. Shared hosting
This is the most common type of web hosing. It is referred to as shared because many different
websites are stored on one single web server and they share resources like RAM and CPU.

2. Dedicated Hosting
Dedicated web hosting is the hosting where the client leases the entire web server and all its
resources. Dedicated hosting is ideal for websites that require more storage space and more bandwidth
and have more visitors. This is the most expensive web hosting method.

3. Virtual Private Server


This type of hosting is suitable for websites that require more features than that provided by shared
hosting, but does not require all the features of dedicated hosting. Each website has its own RAM,
bandwidth and OS. VPS is cheaper than dedicated hosting but more expensive than shared hosting.

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.
• If the web pages contain programming content, we need a supporting technology in the
web server.
Domain name registration
• Domain names are used to identify a website in the Internet.
• After finalising a suitable domain name for our website, we have to check whether this
domain name is available for registration .
• The websites of the web hosting companies or web sites like www.whois.net provide
41

an availability checker facility where we can check this.


• These websites check the database of ICANN that contains the list of all the registered
domain names
• If the domain name entered is available, we can proceed with the registration.
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.

Free hosting
• Free hosting provides web hosting services free of charge. The service provider displays
advertisements in the websites hosted to meet the expenses. Only allow you to upload very small
files. Also audio and video files are not allowed.
• Free hosting companies offer two types of services for obtaining a domain name:
1. Directory Service: -
Company Address / Our Address (www.example.com/oursite)
2. Sub Domain: - Our Address.Company Address (oursite.example.com)

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 the custom of building a website suitable to work onevery device and every
screen size.
• Responsive web design can be implemented using flexible grid layout, flexible images and media
queries.
• Flexible grid layouts set the size of the entire web page to fit the display size of the device.
• Flexible images and videos set the image/video dimensions to the percentage of display size of the
device.
• Media queries provide the ability to specify different styles for individual devices.
42

Sample Questions
1. Explain the different types of Web Hosting.
2. What is Content Management System ?
3. Explain the need for applying responsive web design while developing websites
4. Briefly explain about FTP client softwares.
5. What is free hosting?
43

CHAPTER 8 – DATABASE MANAGEMENT SYSTEM


Concept of Database
Conventional file management system has many drawbacks
• Need more copies for different applications (Duplication)
• Inconsistent change
• Data retrieval is difficult
• Only a password mechanism for security
• No standardization on data

Need of Database
• Database is an organized collection interrelated data
• The software Database Management System (DBMS) is a set of programs which deals the storage,
retrieval and management of database

Advantages of Database
• Controlling Data redundancy
• Efficient Data access
• Data Integrity
• Data security
• Sharing of data
• Enforcement of standards
• Crash recovery

Components of DBMS Environment


• Hardware
• Software
• Data
• Users
• Procedure
Data is organized as fields, records and files
Fields: smallest unit of stored data
Record: collection of related fields
File: Collection of same type of records
44

Data abstraction and data independence


• Physical level
• Logical level (Conceptual level)
• View level

Physical level
• Lowest level of abstraction
• Describes how data is actually stored in secondary storage devices

Logical level
• Next higher level
• Describes what data stored in the database and relationship among those data
• Database Administrators decide what information to keep in database

View level
• Highest level
• closest to the users
• Describes user interaction with database system

Data independence
The ability to modify the schema definition (structure) in one level without affecting the schema
definition at the next higher level is called data independence

Two levels
1. Physical data independence
2. Logical data independence

Physical data independence


The ability to modify the schema followed at the physical level without affecting the schema
followed at the conceptual level

Logical data independence


The ability to modify the conceptual schema without affecting the schema followed at view level.

Users of database
• Database administrator (DBA)
• Application Programmers
• Sophisticated Users
• Naive users
45

Database administrator
• Control the whole database
• Responsible for many critical task
 Design of the conceptual and physical schema
 Security and authorization
 Data availability and recovery from failures

Application Programmers
• Computer professionals who interact with DBMS through application programs
• Application programs are written in any programming languages

Sophisticated users
• Includes engineers, scientists, business analyst who are thoroughly familiar with the facilities of
DBMS
• Interact with database with their own queries (request to the database)

Naïve users
• Interact with the database by running an application program that are written previously
• They are not aware of the details of database
• eg: Bank clerk, billing clerk in a super market

Relational Data Model


• Database represented as a collection of tables called relation
• Both data and relationship among them represented in tabular form
• The database products based on relational model are known as Relational Database Management
system (RDBMS)
• Popular RDBMS are Oracle, Microsoft SQL Server My SQL, DB2, Informix etc..
• Offer a query language that offers Structured Query Language (SQL), Query-by-Example (QBE) or
Datalog

Terminologies in RDBMS
Entity
• It’s a person or a thing in the real world. e.g. student, school etc.

Relation
• Collection of data elements organized in terms of rows and columns
• A relation is also called table
46

Tuple
• The row (records) of a relation is called tuples
• A row consists of a complete set of values to represent a particular entity

Attributes
• The row (records) of a relation is called tuples
• A row consists of a complete set of values to represent a particular entity

Degree
• The number of attributes in a relation

Cardinality
• The number of rows or tuples in a relation

Domain
• It’s a pool of values from which actual values appearing in a given column

Schema
• The structure of database is called the database schema
• In RDBMS the schema for a relation specifies its name, name for each column and the type of each
column
• e.g. STUDENT
( Admno : integer
RollNo:Integer
Name: Character(15)
Batch: Character(15) )
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 collection of attributes in a relation that uniquely distinguishes each tuples
from other tuples in a relation
• If a key consists of more than one attribute then it is called composite key

Candidate key
It is the minimal set of attributes that uniquely identifies a row in a relation
Admno Roll Name Batch
101 12 Sachin Science
109 17 Rahul Humanities
47

108 21 Shaji Commerce


• In the above relation ‘Admno’ can uniquely identify a row (tuple)
• So ‘Admno’ can be considered as a candidate key
• A candidate key need not be just one single attribute
• It can be a composite key (Admno + Roll)

Primary key
• One of the candidate key chosen to be the unique identifier for that table by the database designer
• It cannot contain null value and duplicate value

Alternate Key
• A candidate key that is not a primary key is called an alternate key

Foreign key
• A key in a table called foreign key if it is a primary key in another table
• used to link two or more table
• Also called reference key

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
 The fundamental operations are
SELECT, PROJECT, UNION, INTERSECTION, SET DIFFERENCE, CARTESIAN PRODUCT

SELECT Operation
• Select rows from a relation that satisfies a given condition
• Denoted using sigma ()

General Format
 condition (Relation)
• Uses various comparison operators
• <, >, <=, >=, <>
• Logical operators V (OR) , ˄ (AND), ! (NOT)

Admno Roll Name Batch Mark Result


101 24 Sachin Science 480 EHS
102 34 Joseph commerce 385 EHS
48

103 45 Rahul humanities 300 NHS


STUDENT
  Result=“EHS” (STUDENT)

Admno Roll Name Batch Mark Result


101 24 Sachin Science 480 EHS
102 34 Joseph commerce 385 EHS

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

Admno Roll Name Batch Mark Result


101 24 Sachin Science 480 EHS
102 34 Joseph commerce 385 EHS
103 45 Rahul humanities 300 NHS
STUDENT

 Name, Mark, Result (STUDENT)

Name Mark Result


Sachin 480 EHS
Joseph 385 EHS
Rahul 300 NHS

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’

Admno Name Batch code


101 Sachin S2
103 Fathima H2
110 Vivek C1
132 Nevin C1
49

ARTS Relation
Admno Name Batch code
102 Rahul C2
103 Fathima H2
105 Nelson H2
108 Bincy S2
164 Rachana S1
SPORTS Relation
Admno Name Batch code
101 Sachin S2
103 Fathima H2
110 Vivek C1
132 Nevin C1
102 Rahul C2
105 Nelson H2
108 Bincy S2
164 Rachana S1
ARTS U SPORTS

INTERSECTION Operation
• Returns a relation containing tuples appearing in both of the two specified relations
• Denoted by 
• Two relations must be union compatible

Admno Name Batch code


101 Sachin S2
103 Fathima H2
110 Vivek C1
132 Nevin C1
ARTS

Admno Name Batch code


102 Rahul C2
103 Fathima H2
105 Nelson H2
108 Bincy S2
164 Rachana S1
SPORTS
50

Admno Name Batch code


103 Fathima H2
ARTS  SPORTS

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
Admno Name Batch code
101 Sachin S2
103 Fathima H2
110 Vivek C1
132 Nevin C1
ARTS

Admno Name Batch code


102 Rahul C2
103 Fathima H2
105 Nelson H2
108 Bincy S2
164 Rachana S1
SPORTS

Admno Name Batch code


101 Sachin S2
110 Vivek C1
132 Nevin C1
ARTS - SPORTS

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

Admno Roll Name Batch Mark Result


51

101 24 Sachin Science 480 EHS


102 34 Joseph commerce 385 EHS
103 45 Rahul humanities 300 NHS
STUDENT

TechrId Name Dept


1001 Shekar English
1002 Meenakshi Computer
TEACHER

Admno Roll Name Batch Mark Result TechrId Name Dept


101 24 Sachin Science 480 EHS 1001 Shekar English
101 24 Sachin Science 480 EHS 1002 Meenakshi Computer
102 34 Joseph commerce 385 EHS 1001 Shekar English
102 34 Joseph commerce 385 EHS 1002 Meenakshi Computer
103 45 Rahul humanities 300 NHS 1001 Shekar English
103 45 Rahul humanities 300 NHS 1002 Meenakshi Computer
STUDENT X TEACHER
Sample Questions
1. The number of attributes in the renal model is called .…
2. Enter the name of the database user who interacts with the database through a pre-written
application program
3. If the cardinality of table S1 is 9 and the cardinality of table S2 is 7
What is the maximum cardinality of S1 U S2?
What is the maximum cardinality of S1  S2?
4. Define Data Independence. What are the two levels of Data Independence?
5. Define the following keys in relational model
(a) Primary key (b) Alternate key
6. Define the following
(a) Entity (b) Relation
7. Describe the 3 levels of Data Abstraction in DBMS
8. What is a Key? Describe the two types of key in RDBMS
9. Define the following
(a) Field (b) Record
10. Describe any 3 operators used in Relational Algebra
52

CHAPTER 9 - STRUCTURED QUERY LANGUAGE


Structured Query Language (SQL) is designed for managing data in relational database management
system (RDBMS)

Features of SQL
• It’s a relational database language not a programming language
• Simple, Flexible, Powerful
• It provides commands to create and modify tables, insert data into tables, manipulate data in the table
etc.
• It can set different type of access permissions to user
• It provides concept of views

Components of SQL
Three Components
1. Data Definition Language (DDL)
2. Data Manipulation Language (DML)
3. Data Control Language (DCL)

Data Definition Language (DDL)


• DDL Commands deals with the structure of the RDBMS
• Used to create, modify and remove database objects like Tables, Views and Keys
• Common commands are CREATE, ALTER and DROP

Data Manipulation Language (DML)


• DML Commands are used to Insert data into tables, retrieve existing data, delete data from table and
modify the stored data
• Common commands are SELECT, INSERT, UPDATE and DELETE

Data Control Language (DCL)


• Used to control access to the database
• Commands for administering privileges and committing data
• Common commands are GRANT and REVOKE
• GRANT – Allow access privileges to the user
• REVOKE – Withdraws user’s access privileges

Opening MySQL
• We use the following command in the terminal window to start MySQL
53

mysql -u root -p
• To exit from MySQL, Give the command QUIT or EXIT

Creating Database
• We use the command CREATE DATABASE for creating a database in MySQL
Syntax:
CREATE DATABASE <database_name>;
Example:
CREATE DATABASE School

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 SQL


• Classified into three
• Numeric, String (text), Date and Time
• “India”, -124, 34.45, 01-01-2016, 12:15:34

Numeric Data Types


The most commonly used Numeric data types in MySQL are INT or INTEGER and DEC or
• INT OR INTEGER
Integers are whole numbers without fractional part

• DECIMAL
• Numbers with fractional part can be represented by DEC or DECIMAL
• Standard form DEC (size, D) or DECIMAL (size, D)
• ‘size’ indicate the total number of digits in the number
• ‘D’ represents the number of digits after the decimal point
• Eg: DEC (3,2)

String (Text) Data types


• Most commonly used data types are CHARACTER or CHAR and VARCHAR
54

CHAR or CHARACTER
• Includes Letters, Digits, Special symbols etc.
• syntax: CHAR (x), where ‘x’ is the maximum number of characters
• The value of ‘x’ can be between 0 and 255
• if the number of characters less than the size, remaining positions filled by white spaces
• Default size is ‘1’

VARCHAR
• Represents the variable length strings
• Similar to CHAR
• Space allocated for the data depends only on the actual data

DATE and TIME


• DATE used to store date type values
• TIME used to store time values

DATE
• Represents date values in “YYYY-MM-DD” format
• Eg: 2013/04/23, 2015-04-16, 20160722

TIME
• Standard format is HH:MM:SS

SQL Commands
Creating Tables
• We use CREATE TABLE command for creating a table
• DDL Command
Syntax:
CREATE TABLE <table_name>
( <Column Name> <data_types> [<constraints>]
[, <Column Name> <data_types> <constraints>,]
.................................................................................
................................................................................. );

• <table_name> represents the name of the table


• <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 what we can set on the values of a column
55

• All columns are defined with in a pair of parentheses and seperated 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
Example:
Slno Attributes Description
1 Admission Number Integer value
2 Name String of 20 character long
3 Gender A single character
4 Date of Birth Date type
5 Course String of 15 character long
6 Family income Integer value

CREATE TABLE student


( adm_no INT,
Name VARCHAR(20),
Gender CHAR,
dob DATE,
Course VARCHAR(15),
f_income INT );

Constraints
• Rules enforced data that are entered into the column of a table
• Two types column level and table level
Column constraints
1. NOT NULL
• Specifies that column can never have NULL values
2. 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
56

3. UNIQUE
• Ensures that no two rows have the same value in the column specified with this constraint
4. PRIMARY KEY
• Declares a column as the primary key
• Can be applied only to one column or a combination of columns
5. DEFAULT
• A default value can be set for a column, in case the user does not provide a value for that column of a
record
Example:
CREATE TABLE student
( admno INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(20) NOT NULL,
gender CHAR DEFAULT ‘M’,
dob DATE,
course VARCHAR(15),
fincom INT
);

Table constraints
• Similar to column constraints
• Applied on a group of columns of a table
Example:
CREATE TABLE stock
(
icode CHAR(2) PRIMARY KEY AUTO_INCREMENT,
iname VARCHAR(30) NOT NULL,
dt_purchase DATE,
rate DECIMAL(10,2),
qty INT,
UNIQUE (icode, iname)
);

Viewing the structure of a table

➢ Use DESCRIBE command


57

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(1001, ’alok’ , ’m’ , ‘1998/12/17’ , ‘science’ , 24000);

INSERT INTO student (name, dob, course, f_income)


VALUES(‘Nikitha’ , ‘1998/12/17’ , ‘science’ , 35000);

• Ensure the data type of the value and column matches


• follow the constraints
• 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

Inserting several rows with a single INSERT


Syntax:
INSERT INTO <table_name> VALUES(………), (……..), ….. ;
Example:
INSERT INTO student (name, dob, course, f_income)
VALUES (‘Bharath’ , ‘1999/01/01’ , ‘commerce’ , 45000),
(‘Virat’ , ‘1998/01/01’ , ‘science’ , 35000);

Retrieving information from tables


Syntax:
58

SELECT <column_name>[,<column_name>, <column_name>,…………] FROM <table_name>;


Example:
SELECT name, course FROM student;
SELECT name FROM student;
SELECT * FROM student; (select all the data from the table student)

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

Selecting specific rows using WHERE clause


• SQL enables us to impose some selection criteria for the retrieval of records with WHERE
clause of SELECT command
Syntax:
SELECT <column_name> [, <column_name>,………..]
FROM <table_name>
WHERE <condition>;
➢ The condition are expressed with the help of relational operators and logical operators

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

Example:
SELECT * FROM student
WHERE gender=‘F’;
59

• The above query returns all female students data from the student table

SELECT name, course, fincome FROM student


WHERE course=‘science’ AND fincome<25000;
• The above query returns the name, course and financial income of the students whose course is
‘science’ and financial income is lass than 25000
• The ‘AND’ operator is used to combine two different conditions

SELECT name, course, fincome FROM student


WHERE NOT course=‘science’;
• The above query returns name, course and financial income of the students whose course is other
than science
Condition based on a range of values
• The SQL operator BETWEEN...AND is used to specify the range.
Example:
SELECT name, fincome FROM student WHERE fincome BETWEEN 25000 AND 45000;
• The above query list the student details whose income fall in the range of Rs 25000/- to Rs 45000/-

Condition based on a list of values


Example:
SELECT * FROM student WHERE course IN(‘commerce’, ‘humanities’);
• The IN operator checks whether the values in the specified column of a record matches any of the
values in the given list

Condition based on pattern matching


• We use the operator LIKE for this purpose
• 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
60

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 fincome IS NULL;
• If we want to retrieve the records containing non-null values in the fincome column, the below
query can be used
SELECT name, course FROM student WHERE fincome IS NOT NULL;

Sorting results using 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
Examples:
SELECT * FROM student ORDER BY name; (For ascending order the keyword ‘ASC’ is not necessary)

SELECT * FROM student ORDER BY name DESC;

SELECT name, course, fincome FROM students WHERE course =’science’ ORDER BY fincome 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
Examples:
SELECT MAX(fincome), MIN(fincome), AVG(fincome) from student;
SELECT COUNT(*) from student;

Grouping of records using GROUP BY clause


• The GROUP BY clause used to group rows of a table based on a column value
61

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
Syntax:
UPDATE <table_name>
SET <column_name>=<value> [,<column_name>=<value>……]
[ WHERE <condition> ];

Examples:
UPDATE student SET fincome=27000 WHERE name=‘virat’;
• We can set expressions to column values
UPDATE student SET fincome=fincome+1000 WHERE name=“virat”;

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

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 gracemark INT AFTER dob, ADD regno INT;
62

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 regno INT UNIQUE;

Removing column from a table


• We can use DROP clause along with ALTER TABLE command
• Syntax:
• ALTER TABLE <table_name> DROP <column_name>;

• Example:
• ALTER TABLE student
• DROP gracemark;

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 student123;

Deleting Rows from a Table


The DML command DELETE used to remove individual or set of rows from a table
Syntax:
DELETE FROM <table_name> [WHERE <condition>];
Example:
DELETE FROM student WHERE admno=101;
63

Removing table from a databases


• We can remove a table from database using DROP TABLE command
syntax:
DROP TABLE <table_name>;
Example:
DROP TABLE student;
Concept of 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>];

Example:
CREATE VIEW studentview AS SELECT name, course FROM student WHERE fincome<25000;
• Can use all the DML commands with the view
• Changes reflect in the base tables
• We can remove a view with DROP VIEW command
Example:
DROP VIEW studentview;

Sample Questions
1. In SQL, which is the keyword used to eliminate duplicate values in a column ?
2. Which DML command is used to retrieve information from specified column in a table
3. Write the name and use of any three column constraints in SQL
4. List and explain any three aggregate functions in SQL
5. Write any three DML Commands
6. Define the following
(a) DDL
(b) DML
64

(c) DCL
7. Consider the following table “Student” :
No. Name Mark Class
1 Kumar 430 COM
2 Salim 410 CS
3 Fida 520 BIO
4 Raju 480 COM
5 John 490 COM
6 Prakash 540 BIO

Write SQL statements for the following


(a)To display all the details in the table.
(b) To display the details of students in the class “COM”
(c) To count the number of students in the “BIO” Class
(d) Remove the column “Marks” from the table “Student”
(e) Insert a column “Percentage” in the table
8. Consider the table student with attribute admno, Name, course, percentage.
Write the SQL statements to do the following :
(a) Display all the student details.
(b) Modify the course Commerce to Science
(c) Remove the student details with percentage below 35

CHAPTER 10 – ENTERPRISE RESOURCE PLANNING


• ERP combines all the requirements of a company and integrated to central database so that various
departments can share information and communicate with each other more easily.
• ERP consist of single database and a collection of programs to handle the database hence handle the
enterprise efficiently and hence enhance the productivity.

Functional units of ERP


• Financial Module:
This module is used to generate financial report such as balance sheet,trial balance,financial
statement……
65

• Manufacturing Module:
This module provide freedom to change manufacturing and planing methods whenever
required.
• Production Planning Module
This module ensure the effective use of resources and help the enterprise to enhance the maximize
production and minimum loss.
• HR Module
This module ensures the effective use of human resources and human capital.
• Inventory Control Module:
This module manages the stock requirement of an organization.
• Purchasing Module:
This module is responsible for the availability of raw materials in the right time at the right price.
• Marketing Module:
It is used to handle the orders of customers.
• Sales and distribution Module:
This module will help to handle the sales enquirers,order placement and scheduling,dispatching and
invoicing.
• Quality Management Module:
This module help to maintain the quality of product. It deals with quality planning, inspection
and control.
Business Process Re-Engineering
• It is the series of activities such as rethinking and redesign of the process to enhance the enterprise's
performance such as reducing the cost ,improve the quality, prompt and speed service.

Different Phases of ERP Implementation


• Pre evaluation screening
• Package selection
• Project planing
• Gap analysis
• Business Process Reengineering
• Installation and Configuration
• Implementation team training
• Testing
• Going live
• End user training
66

• Post implementation

Examples for ERP packages


Oracle :
• Provides strong finance and accounting module.
• Provide Customer relationship Management(CRM) and Supply chain management(SCM).
• Efficient product analysis and human resource management.
SAP :
• Stands for System Application and Products.
• Develop ERP for both small and large organizations.
• Provide Customer relationship Management(CRM) ,Supply chain management(SCM) and Product
Life Cycle Management(PLM).
Odoo :
• Open source ERP Package.
• It was formerly known as Open ERP.
• It can be customized based the requirements of an organization.

Microsoft Dynamics :
• ERP for mid sized company.
• This ERP is user friendly.
• Provides Customer Relationship Management(CRM).

Tally ERP :
• Indian company located in Bangalore.
• Provide ERP solution for accounting,inventory and payroll.

Benefits of ERP
1. Improved resource utilization: - Installing ERP can reduce the wastage of resources and
resource utilization can be improved.
2. Better Customer Satisfaction:- Introduction of web based ERP, a customer can place orders and
make payments from home.
3. Provides Accurate Information:-Provide right information at the right time will help the
company to plan and manage the future cunningly.
4. Decision Making Capability:-Accurate and relevant information helps to make better decision for a
system.
67

5. Increased Flexibility: -ERP will help the company to adopt good things as well as avoid bad
things rapidly.
6. Information Integrity:-Integrate various departments in to single unit.

Risk of ERP
1. High cost
2.Time consuming
3. Requirement of additional trained staff.
4.Operational and maintenance issues

ERP and Related technologies


1. Product Life Cycle Management(PLM)
• It consist of programs to increase the quality and reduce the price by the efficient use of resources.
2. Customer Relationship Management(CRM)
• It consist of programs to enhance the customers relationship with the company.
3. Management Information System(MIS)
• It will collect relevant data from inside and outside of a company. Based upon the information
produce reports and take appropriate decisions.
4. Supply Chain Management(SCM)
• This is deals with moving raw material from suppliers to the company as well as finished goods
from company to customers.
5. Decision Support System(DSS)
• It is a computer based systems that takes input as business data and after processing it produce
good decision as output that will make the business easier.

Sample Questions
1. ERP Stands for………………………
2. ………… module of ERP focus on human resource and human capital.
3. Give the significance of Marketing module in an ERP package.
4. Explain any three benefits of ERP system.
5. Explain functional units of ERP in detail.
6. Write short notes regarding ERP package companies.
7. Write short note about CRM?
8. Explain in detail the ERP packages and related technologies?
68

CHAPTER 11

Trends and issues in ICT

Mobile communication services


• Short Message Service (SMS):- It allows transferring short text messages containing up to 160
characters between mobile phones
• Multimedia Messaging Service (MMS):-It allows sending multimedia content (text,picture,audio
and video file) using mobile phones.
• Global Positioning System (GPS) :-It is a satellite navigation system that is used to locate a
geographical position anywhere on earth ,using its longitude and latitude. it is used in vehicles of
transport companies to monitor the movements of their goods.
• Smart card :-It is a plastic card embedded with a computer chip that stores and transacts data. It is
secure,intelligent and convenient.

Generation in Mobile communication


1. First Generation network(1G):- Developed around 1980,only voice transmission was
allowed.
2. Second Generation network(2G):- It allows voice and data transmission picture message and
MMS

(i) Global System for Mobile(GSM)


• Most successful stranded
• It allows simultaneous calls
• It uses GPRS and EDGE

(ii) Code Division Multiple Access(CDMA)


• Multiple access
• It provide better security

3. Third Generation network(3G):- Allows high data transfer rate for mobile devices and offer
high speed wireless broadband services combining voice and data.

4. Fourth Generation network(4G):- It offers Ultra broadband Internet facility. Also offers good
quality image and videos.
5. Fifth Generation network(5G):- Next generation network. It is more faster and cost effective than
other four generations.
69

Mobile Operating System


It is an OS used in hand held devices such as smart phone,tablets,etc….It manages the
hardware ,multimedia function,Internet connectivity….
Eg: Android from Google, iOS from Apple.
Android mobile OS:- It is a Linux based OS for Touch screen devices such as smart phones and
tablets. The interface of Android OS is based on touch input like swiping, tapping, pinching …..

Information security
The most valuable to a company is their database it must be protected from the unauthorized access
by unauthorized persons.
Intellectual Property Right
Some people spends lots of money,time, body and mental power to create some products albums,
discoveries, inventions, software… these types of intellectual properties must be protected from unauthorized
access by law. This is called Intellectual Property Rights.

Intellectual Property is divided into two categories

A) Industrial property: It ensures the protection of industrial inventions,designs,Agricultural


products….from unauthorized copying or creation or use.
• Patents: Protect a product from unauthorized copying or creation with out the permission of creator
by law. Validity of the right is up to 20 years.
• Trademark : Unique,simple and memorable sign to promote a brand. It must be registered. The
period of registration is for 10 years and can be renewed.
• Industrial designs: A product or article is designed so beautifully to attract the customers. This types
of designs is called industrial designs .
• Geographical indication: Some products are well known by the place of its origin. Eg:kozhikkodan
halwa,aranmula kannadi

B) Copyright: It is the property right that arises automatically when a person creates a new work by
his own and by law it prevents the others from the unauthorized copying of this without the permission of the
creator ,for 60 years after the death of the authour.

Infringement(Violation)
• Patent Infringement: It prevents others from the unauthorized or intentional copying or use of
patents with out the permission of creator.
• Piracy: It is the unauthorized copying, distribution and use of creation with out the permission of
creator.
70

• Trademark Infringement: It prevents others from the unauthorized or intentional copying or use of
Trademark with out the permission of creator.
• Copy Right Infringement: It prevents others from the unauthorized or intentional copying or use of
Copy rights with out the permission of creator.

Cyber Crime
It defines as a criminal activity in which computer or computer network as a tool, target or a place
of criminal activity.

Cyber crimes against individuals


• Identity theft -The various information such as personal details,credit/Debit card details Bank details
are the identity of a person. Stealing these information by acting as the authorized person without the
permission of a person is called identity theft.
• Harassment-It means posting humiliating comments focusing on gender,race,religion,nationality at
specific individuals in chat rooms,social media…
• Impersonation and cheating-Fake accounts are created in social media and act as the original one
for the purpose of cheating others.
• Violation of privacy-Trespassing in to another persons life and try to spoil the life. Hidden cameras
is used to capture the video or picture and blackmailing them.
• Dissemination of obscene material-The Internet has provided a medium for the facilitation of crimes
like pornography. The distribution and posting of obscene material is one of the cyber crimes today.

Cyber crimes against Property:


• Credit card fraud- Stealing the details such as credit card number,company name,cvv,password etc.
• Intellectual property thefts- The violation of intellectual property right of Copy
right,Trademark,Patent.
• Internet time theft: This is deals with the misuse of WiFi Internet facility.

Cyber crimes against government:


• Cyber terrorism- It is deals with the attack against very sensitive computer network like computer
controlled atomic energy power plants,Gas line controls...
• Website defacement- It means spoil or hacking websites and posting bad comments about the Govt.
• Attack against e- governance Websites: Due to this attack the web server forced to restart and this
result refusal of services to the genuine users.

Infomania
71

It is the infatuation for acquiring knowledge from various modern sources like Internet, Email,Social
media,Whatsapp and smart phones. Due to this the person may neglect daily routine such as
family,friends,food,sleep etc. hence they get tired. They give first preference to Internet than others.

Sample Questions
1. ……………. is a standard way to send and receive message with multimedia content using
mobile phone.
2. A person committing crimes and illegal activities with the use of computer over Internet. this
crime is included as …………….crime.
3. Explain the features of Android OS?
4. Write short note on GPS?
5. Explain cyber crimes against individuals?
6. What is copy right? How does it differ from patent?
7. Explain different categories of cyber crimes in detail.
8. “Infomania has became a psychological problem” Write your opinion?
9. What you mean by infringement?
10. How do trademark and industrial design differ?
72

You might also like