Page 1 :
VIJAYABHERI, MALAPPURAM DISTRICT PANCHAYATH, EDUCATIONAL PROJECT 2021-22, , STEP-UP, COMPUTER APPLICATIONS, (COMMERCE), CLASS - XII, (Supporting Material for Higher secondary)
Page 3 :
Contents, 1, , Review of C++ Programming, , 4, , 2, , Arrays, , 11, , 3, , Functions, , 15, , 4, , Web Technology, , 22, , 5, , Web Designing Using HTML, , 31, , 6, , Client Side Scripting Using JavaScript, , 38, , 7, , Web Hosting, , 44, , 8, , Database Management System, , 47, , 9, , Structured Query Language, , 57, , 10, , Enterprise Resource Planning, , 71, , 11, , Trends and Issues in ICT, , 76, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 3
Page 4 :
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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 4
Page 5 :
Punctuators, 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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 5
Page 6 :
b. Real expression, , Eg : 2.5 + 3.0 , 5.0 / 2.5, , •, , 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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 6
Page 7 :
Selection Statements / Decision making statements, Statements are selected for execution based on a condition., , Statement, , Syntax, , Example, , if ( test expression ), {, statement block;, }, , if (mark>=18), cout<<”Passed” ;, , if ...... else, statement, , if ( test expression ), {, statement block 1;, }, else, {, statement block 2 ;, }, , if (mark>=18), cout<<”Passed” ;, else, cout <<”Failed “ ;, , if .... else ... if, ladder, , if ( test expression ), {, statement block 1;, }, else if ( test expression 2 ), {, statement block 2 ;, }, else if (test expression 3 ), {, statement block 3 ;, }, ........................., else, {, statement block n;, }, , if statement, , switch(variable / expression), {, case constant_1 : statement 1;, break;, case constant_2 : statement 2;, switch statement, break;, case constant_3 : statement 3;, break;, ............................................., default : statement n;, }, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , if (mark>=80), cout<<”A Grade”;, else if(mark>=60), cout<<”B Grade “ ;, else if(mark>=40), cout<<”C, Grade”;, else, cout<<”D, Grade”;, , switch(n), {, case 1 : cout<<”One”;, break;, case 0 : cout<<”Zero”, break;, default :, cout<<”Invalid”;, }, , 7
Page 8 :
Conditional Operator ( ? : ), It is a ternary operator of C++ . It is an alternative of if ..... else statement, 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, , for loop, , while loop, , Syntax, , Example, , for (initialisation ; test expression ; update expression), {, for (i=1;i<=10;++i), Body of the loop;, cout<<i;, }, Initialisation;, while (test expression), {, Body of the loop;, Update expression ;, }, , Initialisation;, do, {, do....while loop, Body of the loop;, Update expression ;, }while(test expression);, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , i=1 ;, while (i<=10), {, cout<<i;, ++i;, }, i=1 ;, do, {, cout<<i;, ++i;, }while(i<=10);, , 8
Page 9 :
Jump Statements, Jump statements are used to transfer the program control from one place to another., C++ provides four jump statements, •, , 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++;, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 9
Page 11 :
CHAPTER 2, , Arrays, 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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 11
Page 12 :
•, , 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], 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;, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 12
Page 13 :
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)., 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”, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 13
Page 15 :
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, , •, , 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, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 15
Page 19 :
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), {, 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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 19
Page 20 :
•, , 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, parameters., Actual parameters may be constants,, variables or expressions., Exclusive memory allocation is, required for the formal arguments., The changes made in the formal, arguments do not reflect in actual, arguments., , •, •, •, •, , Reference variables are used as, formal parameters., Actual parameters will be variables, only., Memory of actual arguments is, shared by formal arguments., The changes made in the formal, arguments do reflect in actual, 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, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 20
Page 21 :
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, 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 ?, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 21
Page 22 :
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, •, , 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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 22
Page 23 :
•, , Some well-known ports and the associated services are:, Default Port No., 20 & 21, 22, 25, 53, 80, 110, 443, , Service, File Transfer Protocol (FTP), Secure Shell (SSH), Simple Mail Transfer Protocol (SMTP), Domain Name System (DNS) service, Hypertext Transfer Protocol (HTTP), Post Office Protocol (POP3), 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., – 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., Never use databases., Directly run on the browser., Easy to develop., , Content and layout may change., Uses database., Runs on the server., Development requires programming skills., , Scripts, •, , Scripts are program codes written inside HTML pages., , •, , Script are written inside <SCRIPT> and </SCRIPT> tags., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 23
Page 24 :
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, Executed in the client browser., Used for validation of client data., Users can block., Browser dependent, , Server side scripting, Executed in the web server., Used to connect to databases., Users cannot block., 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, •, , 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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 24
Page 25 :
•, , 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">, , 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>, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 25
Page 26 :
Essential HTML tags, Tags, , <HTML>, , <HEAD>, , Use, , Attributes, , To Start an HTML, document, , Values & Purpose, To specify the direction of the text. Values:, , Dir, , ltr (left-to-right), rtl (right-to-left)., To specify the language., , Lang, , “En” for English, “Hi” for Hindi, , 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, , Background, , page., Eg:- <BODY Background = "Sky.jpg">, To specify the colour of the text content., , Text, <BODY>, , Eg:- <BODY Text = "yellow">, , Content to be displayed, in the browser window., , Link, , To specify colour of unvisited hyperlink., , Alink, , To specify colour of active hyperlink., , Vlink, , To specify colour of visited hyperlink., , Leftmargin, Topmargin, , To leave some blank area on the left side of, the document., To leave some blank area on the top edge, of the document., , Some common tags, Tags, , Use, , Attributes, , Values: left, right, center, , <H1>, <H2>, Different Levels of Headings., <H3>, <H4>, <H1> - biggest, , Align, , <H5> & <H6> <H6> - smallest, <P>, , To create a paragraph., , Values & Purpose, Eg:<H1 Align= "left"> This is a, Heading type 1 </H1>, , Align, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , Values: Left, Right, Center,, Justify., 26
Page 27 :
<BR>, , To break current line of text., , No attributes., To specify the thickness of the, , Size, , line, , Width, <HR>, , <CENTER>, , To draw a horizontal line., , To bring the content to the, centre of the browser window., , To specify the width of the line., To specify the alignment of the, , Align, , line, , Color, , To specify colour of the line., , Noshade, , To avoid shading to the line., , No attribute., , 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>, <U>, , To make the text italics, 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, , <Q>, , To enclose the text in “double quotes”, , <BLOCKQUOTE>, , To indent the text, , Some other Tags, Tags, , Use, , <PRE>, , To display pre-formatted text., , Attributes, Eg:-, , <ADDRESS>, , To display address of author of, a document., , Values & Purpose, , <ADDRESS>, SCERT,<BR>, Poojappura,<BR>, Thiruvananthapuram,<BR>, </ADDRESS>, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 27
Page 28 :
Height, , To set the height of the marquee., , Width, , To set the width of the marquee., To specify the direction of, , Direction, To scroll a text or image., , scrolling., Values: left, right, up, down, To specify the style of scrolling., , Eg:<MARQUEE Height= "20", , scroll : normal scrolling, Behavior, , <MARQUEE> Bgcolor="yellow", , alternate : bidirectional, , Direction="right"> This will, scroll from left to, right</MARQUEE>, , slide : scroll and stay, scrolling, , Scrolldelay, , To specify time delay between, each jump., , Scrollamount To specify the speed., Loop, Bgcolor, , To specify how many times the, marquee should scroll., To specify the background color, for marquee., Sets the horizontal alignment., , Defines a section in the, <DIV>, , document with separate, alignment and style., , Align, , justify., Id, Style, , To change the size, style and, colour of the text., <FONT>, , Eg:- <FONT Size="6", , Values: left, right, center,, , Color, Face, , Assigns a unique id for the tag., To render the content in terms of, colour, font, etc., To set the text colour., To set the font face like Arial,, Courier New, etc., , Face="Courier New", Color="red">This text is red, , Size, , To set the font size., , </FONT>, <IMG>, , To insert image in a web page., Eg:- <IMG Src=”Flower.jpg”, , Src, Align, , width=”50%” height=”60%”>, , To specify the file name of the, image, To specify alignment of the, image., Values: Bottom, Middle, Top, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 28
Page 29 :
Width, , To specify the width of image., , Height, , To specify the height of image., , Alt, Border, , To display a text if the browser, cannot display the image., To set a border around the, image., , Comments in HTML document, •, , Comments help us to understand the code., , •, , HTML comments are placed within <!--, , •, , Comments are not displayed in the browsers., , •, , Eg:-, , --> tag., , <!-- 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., Port Number, , Service, , 25, 80, 443, 12. List the different ways of implementing CSS., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 29
Page 30 :
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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 30
Page 31 :
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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 31
Page 32 : Eg:, , <DL>, <DT>Spam :</DT>, <DD> ............Definition of Spam ..............</DD>, <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>, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 32
Page 33 :
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., , Creating tables in a web page, Tags, , Use, , Attributes, Border, , <TABLE>, , To create a table., , Align, , To specify position of the table., , Bgcolor, , To set the background colour of the table., , Cellpadding, Align, , table, , Valign, Bgcolor, Align, , <TH>, , To define heading, cells. The text will be, bold., , <TD>, , To define data cells., , border., To assign colour to the table border., , Cellspacing, , To create rows in a, , To specify the thickness of the table, , Bordercolor, , Background, , <TR>, , Values & Purpose, , Valign, Bgcolor, Colspan, Rowspan, , To assign a background image for the, table., To specify the space between cells., To specify space between cell border and, its content., To specify the horizontal alignment of, text. (Values: left, right. center)., To specify the vertical alignment of text., (Values: Top, Middle, Bottom)., To specify background colour to a, particular row., To specify horizontal alignment of text, within a cell., To specify vertical alignment of text, within a cell., To specify background colour for a cell., To span a cell over 2 or more columns in a, row., To span a cell over 2 or more rows in a, column., , <CAPTION> To provide heading to a table., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 33
Page 34 :
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>, <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, Cols, , To partition the browser, <FRAMESET> window into different frame Rows, sections., Border, , <FRAME>, , To define the frames inside, the <FRAMESET>., , Src, Name, , Values & Purpose, To specify the number of, vertical frames, To specify the number of, horizontal frames, To specify thickness of border, for the frames., To specify the page to be loaded, into the frame., 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>, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 34
Page 35 :
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, Action, , <FORM>, , To create a Form., Method, , Values & Purpose, To specify URL of the form handler to, process the received data., To mention the method used to upload, data. Values: Get, Post, To specify the type of control. Values, are:, Text: Creates a textbox., Password: Creates a password box., , Type, , form., , such as Text Box,, , Submit: Button to submit all the entries, , Radio Button, Submit, Button etc., , Radio: Creates a radio button., Reset: Button to clear the entries in the, , To make form controls, <INPUT>, , Checkbox: Creates a checkbox., , to the server., Name, , To give a name to the input control., , Value, , To provide an initial value to the control., , Size, , To specify the width of the text box and, password box., To specify the number of characters that, , Maxlength, , can be typed into the text box and, password box., , Name, <TEXTAREA>, , To create multi-line, , Rows, , text box., Cols, , To give a name to the control., To specify the number of rows in the, control., To specify the number of characters in a, row., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 35
Page 36 :
Name, <SELECT>, , <OPTION>, , To create a drop-down, list., To add items in the, SELECT list., , Size, , To give a name to the control, To specify whether it is a list box or, combo box. Value 1 for combo box., , Multiple, , To allow users to select multiple items., , Selected, , To indicate default selection., , <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, 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., Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 36
Page 37 :
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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 37
Page 38 :
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”);, }, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 38
Page 39 :
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., 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, , Arithmetic Operators, , Relational Operators, , Operators, , Eg:-, , Result, , +, , 10 +5, , 15, , -, , 10 - 5, , 5, , *, , 10 * 5, , 50, , /, , 10 /5, , 2, , %, , 10 %5, , 0, , <, , 10<5, , false, , >, , 10>5, , true, , <=, , 10<=5, , false, , >=, , 10>=5, , true, , ==, , 10==5, , false, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 39
Page 40 :
!=, , 10!=5, , true, , 10<5||10== 5, , false, , && AND, , 10<5 &&10 == 5, , false, , ! NOT, , !(10==5), , true, , Increment and decrement, , ++, , x++, , x=x+1, , Operator, , --, , x--, , x=x-1, , ||, Logical Operators, , OR, , Arithmetic assignment, , +=,- =, * =,/=and %=, , Operator, , x+=10 means x=x+10, , String addition +, , “Java” +“Script” result will be JavaScript, , Control structures in JavaScript, Control, , Syntax, , structure, , Simple if, , if.. else, , Eg:-, , if(condition), {, statements;, }, if(condition), {, statements;, }, else, {, statements;, }, switch(expression), , if(mark>17), {, alert(“passed”);, }, if(mark>17), {, alert(“passed”);, }, else, {, alert(“failed”);, }, switch(letter), , {, , {, case value1: statements;, , case 'a': alert(“apple”);, , break;, , break;, , case value2: statements;, , case 'b': alert(“ball”);, , break;, , break;, , ., , case 'c': alert(“Cat”);, , ., , break;, , default: statements;, , default: alert(“Enter letter a-c”);, , switch, , }, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , }, , 40
Page 41 :
for loop, , for(initialisation;condition;updation), {, body of the loop;, }, Initialisation;, while(condition), , while loop, , {, , var i,s=0;, for(i=1;i<10;i++), {, s=s+i;, }, alert(s);, var i=1,s=0;, while(i<10), {, s=s+i;, , body of the loop;, updation;, }, , i++;, }, 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., Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 41
Page 42 :
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, , 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, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 42
Page 43 :
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., 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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 43
Page 44 :
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., , 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. FTP client software requires a username and password, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 44
Page 45 :
and also the domain name. This is to be provided in the Site Manager dialogue box. FTP, sends username and password to the server as plain text which is unsecure. Therefore, nowadays, SSH FTP (SFTP) protocol which encrypts and sends usernames, passwords and, data to the web server is used in the FTP software. SFTP uses Secure Shell (SSH) protocol, which provides FTP Login facilities for secure file transfer. 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. The Fewer hosting services are, available on free hosting. 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.The user can select the templates available for, download in some websites..CMS is economical and now many organisations, bloggers,, etc. use it for their websites. Some of the popular CMS software are WordPress, Drupal and, Joomla!, , Responsive web design, •, , Today we browse web pages using various devices like desktops, laptops, tablets and, mobile phones. All these devices have different screen sizes. In earlier days, a separate, website was created for the purpose of viewing in mobile devices. These websites contained, web pages whose size matched the screen size of these devices. But maintaining two, websites for a single organisation created issues. It would be better if the web page was able, to adjust itself to the screen size of the device. This type of web page designing is called, responsive web design. The term 'responsive web designing' was coined by Ethan Marcotte,, an independent designer and author, to describe a new way of designing for the everchanging Web., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 45
Page 46 :
•, , Screen sizes always vary - from a wearable device, mobile phones, tablets to laptops,, desktops and televisions. Therefore, it is important that websites are designed to adapt to the, screen size of the device., , 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?, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 46
Page 47 :
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, ➢ Duplication of data is known as data redundancy, ➢ Leads to higher cost in storage and data access, ➢ Database system do not maintain redundant data, ➢ Data consistency, ➢ Data redundancy leads to data inconsistency, ➢ various copies of data shows different values in different files, ➢ Data consistency can be obtained by controlling data redundancy, ➢ Efficient Data access, ➢ Use variety of techniques to store and retrieve data, ➢ Data Integrity, ➢ The overall completeness, accuracy and consistency of data in the database, ➢ This can be maintained through the use of error checking and validity routines, ➢ Data security, ➢ Protection of data, ➢ Setting access rights, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 47
Page 48 :
➢ Sharing of data, The data in the database can be shared among different users or programs, ➢ Enforcement of standards, Database Administrator (DBA) enforces standards, ➢ Crash recovery, Provides data recovery mechanism, , Components of DBMS Environment, Hardware, Software, Data, Users, Procedure, Hardware, It is the computer system used for storage and retrieval, Software, Consists of the actual DBMS, application programs and utilities, DBMS is the software that interacts with the user, application programs and utilities, Application programs are used to access data, Utilities are the software tool used to manage database, Data, Most important component, Contains operational data and meta data (data about data), The actual data and programs that uses data are separated from each other, For effective storage and retrieval, 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, Users, The persons who can access data on demand using application programs, Database administrator (DBA), Application programmers, Sophisticated users, Naïve users, Procedures, Instructions and rules that is used for the design and use of database, , Data abstraction and data independence, Programmers hide the complexity from the users through several levels of abstraction, Database users are not computer trained, Three levels, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 48
Page 49 :
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, 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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 49
Page 50 :
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, 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 Columns of a relation is called tuples, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 50
Page 51 :
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, , 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), , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 51
Page 52 :
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, , 103, , 45, , Rahul, humanities, STUDENT, , 300, , NHS, , , , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 52
Page 56 :
Admno, , Roll, , Name, , Batch, , Mark, , Result, , 101, , 24, , Sachin, , Science, , 480, , EHS, , 102, , 34, , Joseph, , commerce, , 385, , EHS, , 103, , 45, , Rahul, humanities, STUDENT, , 300, , NHS, , TechrId, 1001, 1002, , Name, Shekar, Meenakshi, TEACHER, , Dept, English, Computer, , 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, , 102, , 34, , Joseph, , commerce, , 385, , EHS, , 1001, , 102, , 34, , Joseph, , commerce, , 385, , EHS, , 1002, , 103, , 45, , Rahul, , humanities, , 300, , NHS, , 1001, , 103, , 45, , Rahul, , humanities 300, NHS, STUDENT X TEACHER, , 1002, , Meenakshi Computer, Shekar, , English, , Meenakshi Computer, Shekar, , English, , Meenakshi Computer, , 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, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 56
Page 57 :
CHAPTER 9, , Structured Query Language, ➢ Structured Query Language (SQL) is designed for managing data in relational database, management system (RDBMS), ➢ Developed in the 1970’s by Donald D Chemberlin and Raymond F Boyce, ➢ Originally called Structured English Query Language (SEQUEL), ➢ In 1986 American National Standard Institute (ANSI) published SQL standard, , 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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 57
Page 58 :
➢ 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, , MySQL, Open Source, ➢ Provides high security, ➢ Portable, works with many operating systems and programming languages like PHP,, PERL, C, C++, JAVA etc., ➢ Highly compatible with PHP, Opening MySQL, ➢ We use the following command in the terminal window to start MySQL, 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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 58
Page 59 :
Numeric Data Types, ➢ The most commonly used Numeric data types in MySQL are INT or INTEGER and, DEC or DECIMAL, ➢, , Integers are whole numbers without fractional part, , ➢ 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, 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, , ➢, , Save memory space, , ➢, , Did not append spaces, , 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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 59
Page 60 :
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, ➢ 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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 60
Page 61 :
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, ➢ Only one AUTO_INCREMENT column per table is allowed, 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),, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 61
Page 63 :
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:, 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, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 63
Page 64 :
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’;, ➢ 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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 64
Page 65 :
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, 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;, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 65
Page 66 :
➢, , 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, , Example:, SELECT course, COUNT(*) FROM student, GROUP BY course;, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 66
Page 67 :
➢, , 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>];, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 67
Page 68 :
➢ 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;, , 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>;, Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 68
Page 69 :
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;, , 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;, , Nested Queries, ➢ Nested means one inside another, ➢ Here the result of one query dynamically substituted in the condition of another, Example:, , Outer query, , SELECT name, course FROM student, WHERE fincome=(SELECT MAX(fincome) FROM student);, , Inner query or sub query, ➢ The query that contains the sub query is called outer query, , 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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 69
Page 70 :
➢ 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, (c) DCL, 7. Consider the following table “Student” :, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 70
Page 71 :
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, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 71
Page 72 :
CHAPTER 10, , ERP (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……, , •, , 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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 72
Page 73 :
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, , •, , 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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 73
Page 74 :
•, , 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., 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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 74
Page 75 :
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?, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 75
Page 76 :
CHAPTER 11, , Trends and issues in ICT, Mobile communication services, 1. Short Message Service (SMS):- It allows transferring short text messages containing up to, 160 characters between mobile phones, 2. Multimedia Messaging Service (MMS):-It allows sending multimedia content, (text,picture,audio and video file) using mobile phones., 3. 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., 4. 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., Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 76
Page 77 :
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., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 77
Page 78 :
•, , Piracy: It is the unauthorized copying, distribution and use of creation with out the, permission of creator., , •, , 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..., , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 78
Page 79 :
•, , 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, 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?, , Vijayabheri, Malappuram Dist. Panchayat Educational Project, , 79