0% found this document useful (0 votes)
11 views

XII-Computer-Science-Quick-Notes_CS (2)

The document provides a comprehensive overview of Object-Oriented Programming concepts, data structures, and web technology. It covers definitions and operations related to objects, classes, stacks, queues, and linked lists, along with algorithms for various operations. Additionally, it discusses web server communication, scripting languages, and HTML elements and attributes.

Uploaded by

bhadec05
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

XII-Computer-Science-Quick-Notes_CS (2)

The document provides a comprehensive overview of Object-Oriented Programming concepts, data structures, and web technology. It covers definitions and operations related to objects, classes, stacks, queues, and linked lists, along with algorithms for various operations. Additionally, it discusses web server communication, scripting languages, and HTML elements and attributes.

Uploaded by

bhadec05
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

COMPUTER SCIENCE PLUS TWO QUICK NOTES Object Oriented Programming Concepts:- step 5: Else

Chapter One Object:-is an identifiable entity with some characteristics and behavior. step 6: Print “Stack Overflow”
Structures and Pointers Class:-is a group of objects that shares common properties and relationships. step 7: End of If
Structures-is an example of derived data type. It is an organized collection of logically related fields that are class class_name step 8: stop
referenced by a common name. {private: variable declarations; Algorithm for POP operation from a STACK :
syntax: function declarations; Consider STACK[N] is an array, N is the maximum size, TOS is the variable indicates the top of the stack and VAL is
struct structure_tag public : variable declarations; the data item to be deleted into the stack.
{data_type variable1; function declarations; step 1: start
…………………}structure_variable; }; step 2: If (TOS<-1) Then
struct date Object is an instance of a class and class is the blueprint of an object. step 3: VAL = STACK[TOS]
{ Message passing means calling member function of an object from another object. step 4 : TOS=TOS-1
int day; int Data Abstraction:-The act of representing essential features without including the background details or step 5: Else
month;int explanations. step 6: Print “Stack Underflow”
year; Encapsulation:-The wrapping up of data and functions into a single unit. step 7: End of If
}dob; Modularity:-The process of partitioning a big program into several smaller modules. step 8: stop
The dot operator (.)connects a structure variable with a structure element. Inheritance:-The process of deriving a new class(derived class ) from an existing class(base class). Queue:- It is a linear data structure in which insertion will take place at one end called rear end and deletion will take
syntax: structure_variable.element_name; class derived_class: AccessSpecifier base_class place at other end called front end of the queue. Here the organizing principle is FIFO(First In First Out).The process
Nested Structure- One structure contains another structure. { of adding new elements into a queue is called insertion and the process of removing of removing elements from a
Array Vs Structure }; queue is called deletion. The process of adding new elements into a full queue is called Queue Overflow and the
SlNo Array Structure The Access Specifiers are private, public or protected. process of removing elements from an empty queue is called Queue Underflow.
1 Derived data type User defined data type Polymorphism:-ability to express different forms Algorithm for INSERTION operation in a QUEUE :
2 Collection of same type of data Different types of data 1. Compile time(Early Binding) (Static Polymorphism):-Ability of a compiler to bind a function call with function Consider QUEUE[N] is an array, N is the maximum size, the variables FRONT and REAR keep track of the front and
3 Elements are referenced with subscripts Referenced by using dot operator definition during compilation time. rear positions of the queue and VAL is the data item to be inserted into the queue.
4 one array contains another array is One structure contains another structure is nested a. Function Overloading: Functions with same name but different signatures can act differently. step 1: start
multidimensional array structure b. Operator Overloading: The concept of giving new meaning to an existing C++ operator. step 2: If (REAR==-1) Then
5 Array of structure is possible Structure can contain arrays as elements 2. Run Time(Late Binding) (Dynamic Polymorphism):- Ability of a compiler to bind a function call with function step 3: FRONT=REAR=0
Pointers:-A variable which holds the address of another variable. Pointer concept was introduced by Harold definition during run time. It uses the concepts of pointers and inheritances. step 4 : QUEUE[REAR]=VAL
Lawson. Chapter Three step 5: Else If(REAR < N) Then
Declaration: datatype *variable; Data Structures and Operations step 6: REAR=REAR+1
Address of operator(&)-to get the address of a variable. Data Structure:-Particular way of organizing similar or dissimilar logically related data items which can be step 7: QUEUE[REAR]=VAL
Value at operator(indirection) (dereference)(*)-retrieves the value at a particular location. processed as a single unit. step 8: Else
Static Memory allocation- Memory allocation which can be done at compilation time. 1. Simple Data Structure:-Arrays and Structures step 9 : Print “Queue Overflow”
2. Compound Data Structures: Simple Data Structures are combined together to form complex data structures. step 10: End of If
Dynamic memory allocation-Memory allocation which can be done at run time.
1. new- creates dynamic memory space a. Linear:-The elements are arranged in a linear format.1. Stack 2. Queue 3. Linked list Algorithm for DELETION operation from a QUEUE :
syntax1 : pointer_variable=new datatype; b. Non Linear:-Tree and Graph Consider QUEUE[N] is an array, N is the maximum size, the variables FRONT and REAR keep track of the front and
syntax2: pointer_variable=new datatype(value); Operations of Data Structures: rear positions of the queue and VAL is the data item to be removed from the queue.
delete pointer_variable; - deletes the dynamic memory space. 1. Traversing:-visiting each element in a data structure. step 1: start
Memory leak: If the dynamically allocated unwanted memory is not de allocated by using the delete operator ,a 2. Searching:- finding the location of a particular element . step 2: If (FRONT > -1 AND FRONT < REAR ) Then
wastage of memory is occurred. This situation is memory leak. 3. Inserting:- adding a new element . step 3: VAL =QUEUE[FRONT]
Pointers can be incremented or decremented. Among the six relational operators , only equality(==) and non 4. Deleting:- removing an existing element. step 4 : FRONT = FRONT + 1
equality(!=) are used with pointers. 5. Sorting:- arranging the elements in a specified order. step 5: Else
Dynamic Array: Array which is created at run time by using “new” operator. 6. Merging:-combining the elements of two data structures and to form a third one. step 6: Print “Queue Underflow”
pointer_variable=new datatype[size]; Stack: It is a linear data structure in which the insertion and deletion takes place at one end of the stack called top of step 7: End of If
Structure pointer and an element is connected using arrow operator(->) the Stack. The organizing principle is LIFO(Last In First Out).The process of adding new elements into a stack is called step 8: If (FRONT > REAR ) Then
Self referential structure: A structure in which one of the element is a pointer to the same structure. Pushing. The process of adding new elements into a full stack is called Stack Overflow. The process of removing step 9 : FRONT=REAR=-1
Chapter Two existing elements from a stack is called Popping. The process of removing elements from an empty stack is called step 10: End of If
Concepts of Object Oriented Programming Stack Underflow. step 10 : stop
Programming Paradigm: the way in which program is organized. C++ is a multiple paradigm language. It supports Algorithm for PUSH operation in a STACK : Circular Queue: A queue in which two end points meet.
both procedural paradigm as well as object oriented paradigm. Consider STACK[N] is an array, N is the maximum size, TOS is a variable indicates the top of the stack and VAL is the Linked List:-a collection of nodes, where each node consists of a data and a link – a pointer to the next node.
Limitations of POP: data item to be added into the stack. Operations on Linked List
1. Data is under valued
step 1: start 1. Creation of Linked list
2. Adding new data element may require modifications to all/many functions. step 2: If (TOS<N) Then 2. Traversing a linked list
3.Creating new data types(Extensibility) is difficult. step 3: TOS=TOS+1 3. Insertion in a linked list
4. Provides poor real world modeling. step 4 : STACK[TOS]=VAL 4. Deletion from a linked list

Pae 1 Pae 2 Pae 3

Chapter Four 8. topmargin:-topside margin. border(thickness of the border line),bordercolor,align,bgcolor,background,cellspacing(amount of space between
Web Technology 5.Heading Tags:-<h1></h1>,<h2></h2>,<h3></h3>,<h4></h4>,<h5></h5>,<h6></h6>. Attribute align – values are - the cells),cellpadding(amount of space between the cell border and content),width,height,frame(void-no
Communication the Web left,right and center. border,above-top border,below-bottom border,hsides-top and bottom borders,vsides-right and left borders,lhs-
a. Client to Web Server Communication 6. <P> Tag:-paragraph tag. Attribute align- values are – left,right,center or justify. left side border,rhs-right side border,box & border-border on all sides),rules(values - none,cols,rows,groups,all)
b. Web Server to Web Server Communication 7.<br>:-inserting line breaks. NOTE: When both bgcolor and background are specified , the background will override the bgcolor.
Web Server :-1. A server computer that hosts web sites. 2. A web server software that is installed in a server 8. <hr>:-produces horizontal line. Attributes size,width,color,noshade Attributes of <tr> Tags:-
computer . 9.<center>:- brings the content to the center . align(values- left,right,center),valign-vertical alignment( values - top,middle,bottom,baseline(aligns the baseline of
Web Server Packages 10.<b>:- making the text bold. the text across the cells in the row))
Apache Server, MicroSoft Internet Information Server (IIS), Google Web Server(GWS),nginx 11. <i>:-Italicizing the text . Attributes of <th> and <td> Tags:-align,valign,bgcolor,rowspan(number of rows to be spanned by the
Software Ports:-FTP(20 & 21),SSH(22),SMTP(25),DNS(53),HTTP(80),POP3(110),HTTPS(443) 12. <u>:- Underlining the text. cell),colspan(number of columns to be spanned by the cell)
NASA:-National Aeronautics and Space Administration 13. <s> and <strike> :- Striking through the text. <caption> Tag:-we can provide a heading to a table.
ICANN:-Internet Corporation for Assigned Names and Numbers 14.<big>:- Making the text big sized.
SlNo Static Web Page Dynamic Web Page 15.<small>:-Making the text small sized. <frameset> Tag:- Used for dividing the browser window. Attributes are cols,rows,border,bordercolor
1 The content and layout is fixed The content and layout may change during run time. 16.<strong>:-Making the text bold text. <frame> Tag:- Attributes are src,scrolling(displays whether a scrollbar or not-values are
2 Never use databases Database is used 17.<em>:- Emphasizing the text yes,no,auto),noresize(prevents the resizing behaviour),marginwidth,marginheight,name(gives a name to a frame).
3 Directly run on the browser. Runs on the server side application programs 18. <sub>:-creating subscripts.
4 They are easy to develop. Development requires programming skills. 19. <sup>:-creating super scripts. Forms in Web pages:-
Scripts:-Scripts are program codes written inside html pages. A script is written inside the <SCRIPT> and 20.<q>:-used for short quotations <form> Tag:- Used for creating a form with various form controls. Attributes are action(specifies the
</SCRIPT> tags . 21. <blockquote>:-used for long quotations URL),method(get method and post method),target(specifies the target window).
SlNo Client Side Scripting Server Side Scripting 22. <pre>:- Displaying preformatted text. Form Controls:-
1 Script is copied to the client browser It remains in the Web Server 23. <address>:- Displaying the address 1) <input> Tag. Attributes are a) type :- Values are text, password, checkbox, radio, reset, submit, button
2 Executed in the client browser Executed in the Web Server 24. <marquee>:-Displaying the text in a scrolling marquee. b) name:- used to give a name to the control.
3 Mainly used for validation of data Used to connect to databases and return data from the Attributes of <marquee>:- c) value:-used to provide an initial value.
web server height,width,direction(up,down,left,right),behaviour(scroll,slide,alternate),scrolldelay,scrollamount,loop,bgcolor, d) size:- sets the width of the input texts.
4 Users can block Client side scripting. Server side scripting cannot be blocked by the user hspace(horizontal space),vspace(vertical space). e) maxlength:-specifies the maximum size.
5 Features of the webserver affects the coding Features does not affects the coding. 25.<div>:-defining a section. Attributes are align,id(identifier),style. 2) <textarea> Tag:- Used for creating a multiline entry text box. Attributes are name,rows,cols.
26.<font>:-specifying the font characteristics. Attributes are color,face(type of the font),size(values ranges from 1 3) <select> Tag:- Used to create a drop down list box . Attributes are name,size,multiple.
Scripting Languages:
to 7,default value is 3) 4) <fieldset> Tag:- Used for grouping related data in a form.
A . JavaScript: Developed by Brendan Eich. Ajax(Asynchronous JavaScript and Extensible Markup Language )
27. <img> Tag:- To insert images in HTML pages. Attributes are Chapter Six
technology is used in JavaScript.
src(source),width,height,vspace,hspace,align(bottom,middle,top),border(border line around the image) Client Side Scripting Using JavaScript
B. VBScript: Developed by Microsoft Corporation.
HTML ENTITIES FOR RESERVED CHARACTERS:-1) &nbsp; -non breaking space,2) &quot; - Double quotation mark <script> Tag:- This tag is used to include scripting code in an HTML page.
C. PHP:-Stands for “PHP-Hyper text Preprocessor”, developed by Rasmus Lerdorf.
3) &apos; - Single quotation mark 4) &amp; - Ampersand 5) &lt; - Less than 6) &gt; - Greater than 7) &copy; - Copy <script Language=”JavaScript”>
D. ASP:-Stands for Active Server pages.
right Symbol 8) &trade; – Trade mark symbol 9) &reg; – Registered Symbol </script>
E. JSP:-Stands for Java Server Pages
Comments in HTML:- HTML comments are placed within <! --------- > tag. Functions in JavaScript:-
F.CSS:-Stands for Cascading Style Sheets.
Chapter Five function function_name()
Basic Structure of an HTML Document
Web Designing using HTML {
<html><head><title></title></head><body></body></html>
Lists in HTML body of the function;
Container Tags:-requires pair tags – i.e opening tag and closing tag. Eg. <html></html>,<head></head>
1).Ordered list(<ol><li></li></ol>):- Attributes – start and type(Arabic Numerals,Upper Case Alphabets,Lower Case }
Empty Tags:-Used opening tags only. Eg. <br>,<hr>,<img>
Alphabets,Roman Numeral Upper,Roman Numeral Lower). Data types in JavaScript:-Number(All positive and negative numbers),String(Characters enclosed within double
Attribute:-Parameters included within the opening tag. Eg <body bgcolor = ” red ”>
2).Unordered list(<ul><li></li></ul>):-Attributes - type(disc,circle,square) quotes),Boolean(true and false values)
Important Tags and Attributes
3).Definition List(<dl><dt></dt><dd></dd></dl>)[dl-definition list,dt- definition term,dd- definition description] variables:-In JavaScript , variables can be declared by using the keyword var.
1. <html> Tag:- a). dir-specifies the direction of the text to be displayed on the web page. Two values ltr(left to
Creating Links var x,y;
right) and rtl(right to left).
1).Internal Linking:-Link within the same document.<A>(anchor tag) is used. Name attribute is used for the target x=25;
b).lang:-specifies the language used within the document. Different lang values are en- english, fr- french,de-
specification and href – (means hyper reference)(# symbol is essential) attribute is used for linking purpose. y=”Kerala”;
german, it-italian,el-greek,es-spanish,ar-arabic,ja-japanese,hi-hindi and ru-russian.
2).External Linking:-Link from one web page to another web page. .<A>(anchor tag) and href attribute is used. Operators in JavaScript:-
2. <head>:-declares the head section.
URL:-Uniform Resource Locator 1) Arithmetic Operators(+,-,*,/,%,++,--)
3.<title>:-mentions the document title.
1).Relative URL :- <a href=”http://www.scertkerala.gov.in”> - represents the complete path. 2) Assignment Operators(= ,+ =,- =,*=,/=,%=)
4.<body> Tag: specifies the document body section.
2).Absolute URL:- <a href=”image.html”> - represents the specified file name only. 3) Relational Operators(<,<=,>,>=,==,!=)
1. background:-sets a background image. The important attributes are
Creating email linking:-We can create an email hyperlink to a web page using the hyper link protocol “mailto:” . 4) Logical Operators(&&(AND),|| (OR),NOT(!))
2. bgcolor:-specifies the background colour.
eg:-<a href=”mailto: [email protected]”>scert </a> 5) String Addition Operator(+)
3.text:-specifies the foreground colour.
<embed> tag is used for Inserting Music and Video:-Attributes are src,height,width,align. Control Structures in JavaScript:-
4. link:-colour of the hyperlink that are not visited by the viewer. Default colour is blue.
<bgsound> tag is used for inserting audio files only. Attributes are src,loop. 1) if(test_expression)
5.alink:-specifies the colour of the active hyperlink. Default colour is green.
<table>tag and its attributes:- {statements;
6.vlink:-specifies the colour of the hyperlink which is already visited by the viewer. Default colour is purple.
}
7.leftmargin:-leftside margin.

Pae 4 Pae 5 Pae 6


2) if(test_expression) Responsive Webdesign:-It is the custom of building a website suitable to work on every devise and every screen d) Attribute:-The columns of a relation.
{statement1;} size. The term Responsive Web design was coined by Ethan Marcotte. e) Degree:- The number of attributes in a relation.
else ICANN:-Internet Corporation for Assigned Names and Numbers f) Cardinality:- The number of rows or tuples in a relation.
{statement2; WHOIS:- It is a domain name availability checker platform. g) Domain:- a pool of values from which actual values appearing in a given column are drawn.
} Chapter Eight h) Keys:-An attribute or a collection of attributes in a relation that uniquely distinguishes each tuple from
3) switch(expression) Database Management System other tuples in a given relation.
{case value 1:statement1; Database: An organized collection of inter related data items stored together with minimum redundancy. 1) Candidate key:- The minimal set of attributes that uniquely identifies a row in a relation.
break; DBMS(Database Management System):-A system which has some set of rules and relationships which allows for 2) Primary key:- one of the candidate keys chosen to be the unique identifier for a table by the database
case value2:statement2; the definition, creation, retrieval, updation, maintenance and protection of the databases. designer.
break; Advantages:- 3) Alternate keys:- A candidate key that is not the primary key .
default: statement3; 1) Database reduces data redundancy. 4) Foreign keys:- A candidate key which is the primary key of another table.
} 2) Database can control data inconsistency. Relational Algebra:-
4) for(initialization;test_expression;updation) 3) Efficient data access. 1) SELECT(σ) Operation: Unary operator . Selects rows from a relation that satisfies a given
{statements; 4) Data integrity can be maintained. predicate(condition).
} 5) Data security can be ensured. 2) PROJECT(π):- Unary operator. Selects certain attributes from the table and forms a new relation.
5) while(test_expression) 6) Database facilitates the sharing of data. 3) UNION(U):- Binary operator. Combines two relations.
{statements; 7) Enforces the necessary standards. 4) INTERSECTION(∩) : Binary operator. It returns the common elements only.
} 8) Offers a facility to do the backup and recovery. 5) SET DIFFERENCE(-):- Binary operator. It returns a relation containing the tuples appearing in the first
Built in Functions :- Components of DBMS environment:- relation but not in the second.
1) alert():-Used to display a message on the screen. 1) Hardware:- The actual computer system used for the storage and retrieval of the database. 6) CARTESIAN PRODUCT(×):- returns a relation consisting of all possible combinations of tuples from two
2) isNaN():- Used to check whether a value is number or not. 2) Software:- consists of the actual DBMS, Application Programs and Utilities. relations.
3) toUpperCase():-Converts a lowercase character to an upper case. 3) Data:-The operational data and the meta- data(data about data). Chapter Nine
4) toLowerCase():-Converts an uppercase character to a lower case. a) Fields:- The smallest unit of stored data. Structured Query Language(SQL)
5) charAt():- returns the character at a particular position. The counting starts at zero. b) Record:-A collection of related fields. The original version of SQL was developed in the 1970’s by Donald D Chamberlin and Raymond F Boyce at IBM’s
6) length property:-This property returns the length of the string. c) File:-A collection of all occurrences of the same type of data. San Jose Research Laboratory(now Almanden Research Centre). It was originally called Sequel(Structured
For accessing values in a Textbox, JavaScript uses the following format:- 4) Users:- English Query Language) and later its name was changed to SQL.
document.form_name.textbox_name.value a) Database Administrator(DBA):-Person who is responsible for the control of the centralized and shared Components of SQL:-
The various JavaScript Events are: database. a) Data Definition Language(DDL):-CREATE TABLE,ALTER TABLE,DROP TABLE.
1) onClick:- It occurs when the user clicks over an object. b) Application Programmer:-Computer professionals who interact with the DBMS through application b) Data Manipulation Language(DML):-SELECT,INSERT INTO,UPDATE,DELETE FROM.
2) onMouseEnter:-It occurs when the mouse pointer is moved onto an object. programs. c) Data Control Language(DCL):-GRANT,REVOKE.
3) onMouseLeave:-It occurs when the mouse pointer is moved out of an object. c) Sophisticated users:- person who interact with the DBMS through their own queries. Creating database:- CREATE DATABASE <database_name>;
4) onKeyDown:-It occurs when the user is pressing a key on the keyboard. d) Naive Users:-who interact with the DBMS through application programs that were written previously. Opening database:-USE <database_name>;
5) onKeyUp:-It occurs when the user releases a pressed key. 5) Procedures:-refers to the instructions and rules that govern the design and use of the database. DATA TYPES IN SQL:-
External JavaScript file:- We can place the scripts into an external file and then link to that file from within the HTML Data Abstraction:- The developers hide the complexity of the database from users through several levels of 1) TINY INT ,SMALL INT,MEDIUM INT,INT,BIG INT
document. This file is saved with the extension ‘.js’ . The file can be linked to HTML file using the<script> tag.The type abstraction. They are 2) FLOAT(M,D),DOUBLE(M,D),DECIMAL(M,D)
attribute specifies that the linked file is a JavaScript file and the src attribute specifies the location and file name of 1) Physical Level:- The lowest level of database abstraction. This level describes that how the data are actually [M means maximum size and D means the number of digits to the right of the decimal point]
external JavaScript file. stored on the storage devices. 3) CHAR(SIZE),VARCHAR(SIZE):- includes letters, digits and special symbols. CHAR is a fixed length character
Chapter Seven 2) Logical Level:-The next higher level of database abstraction. This level describes that what data are actually data type. It consumes the declared size. VARCHAR represents variable length strings. It consumes only
Web Hosting stored in the database. the actual size of the string, not the declared size.
Web Hosting:- The service of providing storage space in a web server. 3) View Level:-The highest level of database abstraction. This level is concerned with the way in which data 4) DATE:-Used to store dates. The YYYY-MM-DD is the standard format. The supported range is from
1) Shared Hosting:-Multiple websites are shared on a single web server. Cheaper and easy to use. But heavy traffic are viewed by individual users. 1000-01-01 to 9999-12-31.
slows the webserver. Schema: Overall design of the database. 5) TIME:-displays the current time in the format HH:MM:SS.
2) Dedicated Hosting:-Uses a single , powerful web server for hosting. Advantage are very speed and performance Instances:-Collection of information stored in the database at a particular moment. SQL COMMANDS
is stable. But it is highly expensive. Data Independence:- The ability to modify the schema followed at one level without affecting the schema followed a. DATA DEFINITION LANGUAGE (DDL COMMANDS)
If the client is allowed to place their own purchased web server in the service providers facility, then it is called co- at the next higher level. 1. CREATE TABLE COMMAND:-
location . a) Physical Data Independence:- The ability to modify the schema followed at physical level without affecting CREATE TABLE <table_name>(<column1> < data_type1> (size)*<constraint>+,… ...... );
3) Virtual Private Server:-It is a physical server that is virtually partitioned into several servers using the virtualization the schema followed logical level. Constraints:- rules enforced on data that are entered into the column of a table.
technology. Some popular server virtualization software’s are VMware,Virtualbox,FreeVPS,User mode Linux, b) Logical Data Independence:- The ability to modify the schema followed at logical level without affecting a) Column constraints:-are applied only to individual columns.
Microsoft Hyper-V. the schema followed view level. 1) NOT NULL:- Specifies that a column can never have null values.
FTP Client Software’s :-It transfers files from one computer to another on the internet. The popular FTP Client RDBMS:-Relational Database Management System.- invented by Edgar Frank Codd. 2) AUTO_INCREMENT:-Performs an automatic increment feature.
Software’s are FileZilla,CuteFTP,SmartFTP. Terminologies in RDBMS:- 3) UNIQUE:-It ensures that no two rows have the same value .
Free Hosting:-provides web hosting services free of charge. a) Entity:-a person or a thing in the real world that is distinguishable from others. 4) PRIMARY KEY:-This constraint declares a column as the primary key of the table.
Content Management System:- Refers to a web based software system which is capable of creating, administering b) Relation(Table):- collection of data elements organized in terms of rows and columns. 5) DEFAULT:-a default value can be set for a column.
and publishing web sites. c) Tuple:- The row(records) of a relation. b) Table Constraints:-It can be used not only on individual columns, but also on a group of columns.

Pae 7 Pae 8 Pae 9

2. ALTER TABLE ADD COMMAND:- break;


ALTER TABLE <table_name> ADD <column_name> <data_type>[<size>] [<constraint>] [FIRST] / AFTER default: statement3;
<column_name>>]; Chapter Ten }
3. ALTER TABLE MODIFY COMMAND:- Server Side Scripting Using PHP
ALTER TABLE <table_name> MODIFY <column_name> <data_type> [<size]> [<constraint>]; Loops in PHP
4. ALTER TABLE DROP COMMAND:- Rasmus Lerdorf : Father of PHP 1) while(expression)
ALTER TABLE <table_name> DROP <column_name>; Development Environment of PHP {statements;
5. ALTER TABLE RENAME COMMAND:- 1) WAMP:-Windows,Apache,MySQL,PHP }
ALTER TABLE <table_name> RENAME TO <new_table_name>; 2) LAMP:-Linux,Apache,MySQL,PHP 2) do
6. DROP TABLE COMMAND 3) XAMPP:-X –OS,Apache,MySQL,PHP and PERL(Practical Extraction and Report Language) {
DROP TABLE <table_name>; The php scripting should begin with “<?php>” and ends with “?>”. The php files are saved with the extension .php. statements;
b. DATA MANIPULATION LANGUAGE COMMANDS(DML):- Comments in PHP:-Single line Comment(//),Multi line Comment(/* */) }while(expression);
1. INSERT INTO COMMAND:- Output statements in PHP 3) for( initialization ; condition; increment)
INSERT INTO <table_name> (<column1>,<column2>,….) VALUES(<value1><value2>,….); a) echo and print:- Both are used to display output on a webpage. echo permits more than one parameter {
2. SELECT FROM COMMAND:- and print allows only one parameter. statements;
SELECT <column1>,<column2>,…. FROM <table_name> WHERE <condition>; b) var_dump():- used to display both data type and value of variables. }
The DISTINCT keyword is used for avoiding the duplicate values. Variables:- A variable name starts with $ sign , followed by the name of the variable. 4) break :- breaks the execution of a loop.
MySQL provides a variety of operators or clauses attached with SELECT command. $var_name=value; 5) continue:-skips the current iteration and moves to the next iteration.
SLNO OPERATOR MEANING/RESULT Data types:-A) Core Data types-integer,Float/Double,String,Boolean. Arrays in PHP:-
1 = Equal to relational operator B) Special Data types:-Null,Array,Object,Resources. 1) Indexed Array:- Arrays with numeric index.
2 < > or != Not Equal to relational operator Operators in PHP $array_name=array(value1,vlue2,..);
3 < Less than relational operator a) Assignment Operator(=) 2) Associative array:- Arrays with named keys.
4 <= Less than or equal to relational operator b) Arithmetic Operators(+,-,*,/,%) array(key=>value1,key=>value2,…);
5 > Greater than relational operator c) Relational Operators(<,<=,>,>=,==,!=) foreach loops
6 >= Greater than or equal to relational operator d) Logical Operators(and,or,&&,||,xor,!) 1) foreach ($array as $value)
7 NOT True when condition is False e) String operators - .(concatenating operator), .= (concatenating assignment operator) {
8 AND True if both the conditions are True f) Combined Operators(+=,-=,*=,/=,%=, .=) statements;
9 OR True if either of the condition is True g) Increment and Decrement Operators(++value, value++,- -value, value- -) }
10 BETWEEN…AND Used to specify a range including lower and upper values h) Escape Sequences( \” (double quote), \’ (single quote), \n (new line), \t (tab), \r (carriage return), 2) foreach ($array as $key=>value)
11 IN It provides a list of values \$ (dollar sign), \\ (backslash)) {statements;
Control Structures in PHP:- }
12 IS retrieves NULL values with this operator
a) if(expression) Functions in PHP:-
13 LIKE It is a pattern matching operator. % (percentage )and _(under
{statements; 1) User defined Functions
score ) are used with this keyword
} function function_name()
14 ORDER BY It is used for sorting ascending (ASC) or descending(DESC)
b) if(expression) {
15 GROUP BY used to form groups
{statement1; body of the function;
16 HAVING specifies conditions and it is used along with GROUP BY clause
} }
Aggregate Functions:- 2) Built in Functions
else
1) SUM():-Calculates the sum of a specified column. a) Date():-displays the current date.
{statement2;
2) AVG():-Calculates the average value in a specified column. b) String functions:-ch() – returns a character,strlen() – returns the length of the string,strpos() – finds the
}
3) MAX():-Calculates the maximum value. position of the first occurrence of a string,strcmp() – compares two strings.
c) if(expression1)
4) MIN():-Finds the minimum value. PHP Global variables:-$GLOBALS,$_SERVER,$_GET,$_POST,$_REQUEST,$_FILES,$_SESSION,$_COOKIE
{statement1;
5) COUNT():-Counts the number of non null values. SLNO GET POST
}
3. UPDATE COMMAND 1 Data remains visible in the address bar Data is not visible
elseif(expression2)
UPDATE <table_name> SET <column_name>=<value> WHERE <condition>;
{statement2; 2 Page link can be book marked Page link can never be book marked
4. DELETE FROM COMMAND
} 3 Data is submitted as part of the URL Data is submitted as part of HTTP Request
DELETE FROM <table_name> WHERE <condition>;
else 4 Data sending is fast but not secure Data sending is slow but secure.
Nested Query:- One query contains another query is called nested query. Then the inner most query is called sub
{statement3; 5 Can send only 2000 characters No limit
query and the outer most query is called outer query.
} Connecting PHP to MySQL database
VIEWS:- A view is a virtual table that does not really exist in the database, but is derived from one or more tables.
d) switch(expression) 1) Open a connection to MySQL.
CREATE VIEW <viewname> AS SELECT <column1>,<column2>,… FROM <table_name> WHERE <condition>;
{ 2) Specify the database we want to open.
A view can be removed by
case result1:statement1; 3) Retrieve data from or insert data into database.
DROP VIEW <viewname>;
break; 4) Close the connection.
case result2:statement2;

Pae 10 Pae 11 Pae 12


Chapter Eleven and transparent manner. 3) e-Learning:- The use of electronic media and ICT in education.
Advances in Computing Types of interactions in e-governance A) e-Learning Tools:-
Distributed Computing Paradigms:- A) Government to Government(G2G):-Electronic sharing of data and information between two govt. 1) Electronic Books Reader(e-Books):- Portable computer devices that are loaded with digital book
1) Distributed Computing:-Method of computing in which large problems can be divided into many small agencies. content via communication interfaces is called electronic book reader.
problems. B) Government to Citizens(G2C):-interaction between a govt. and a citizen. 2) e-Text : Textual information available in electronic format is called e-Text.
C) Government to Business(G2B):-interaction between a govt. and a business community. 3) Online chat: It is a real time exchange of text messages between two or more persons over the
Merits:-Economical,Speed,Reliability,Scalabilty D) Government to Employee(G2 E):- Interaction between a govt. and an employer. internet.
DeMerits:-Complexities,Security,Network Reliance e-G overnance Infrastructure:- 4) e-content: - e-learning materials in different multimedia formats like videos, presentations,
2) Parallel Computing:-Many calculations are carried out simultaneously. 1) State Data Centre(SDC):-It combines the various services, applications and infrastructure and provide graphics, animations etc.
3) Grid Computing:-computational power is readily available like electric power. Used in disaster electronic delivery. 5) Educational TV Channels :- Eg: Doordarshan’s ‘VYAS’ and Kerala Governments ‘VICTERS(Versatile
management,weather forecasting,market forecasting, bio – informatics. 2) Kerala State Wide Area Network(KSWAN):- network spread across the state which connects 3 districts ICT Enabled Resource for Students)’ channels.
4) Cluster Computing:- Group of personal computers and storage devices are worked like a single (Thiruvananthapuram, Kochi and Kozhikode) as its hubs, 14 districts and 152 block Panchayats. Useful e-learning websites:-
computer. 3) Common Service Center(CSC):- Various services are 1. www.ignouonline.ac.in: Website for Indira Gandhi National Open University
5) Cloud Computing:- Uses the internet and central remote servers to maintain data and applications. 1) Online payment of electricity, telephone and water bills. 2. www.ncert.nic.in: Website for National Council of Education al Research and Training
email service is an example. 2) Submission of Online Applications and Generation and Distribution of Certificates. 3. www.nptel.com : Website for National Programme on Technology Enhanced Learning
Cloud Service Models:- 3) Agriculture Services www.spoken_tutorial.org: Website for spoken tutorials.
1) Software as a Service(SaaS):-The provider gives subscribers access to both resources and 4) Education and training services Information Security:-
applications. 5) Health Services 1. Intellectual Property Right(IPR):-IPR refers to the exclusive right given to a person over the creation of
2) Platform as a Service(PaaS):-The provider gives subscribers access to the components that they 6) Rural Banking and insurance services his/her mind for a period of time.
require to develop and operate applications over the internet. 7) Entertainment services a) Patent:- exclusive right granted for an invention.
3) Infrastructure as a Service(IaaS):-It provides basic storage and computing capabilities as 8) Commercial services b) Trade Mark:- distinctive sign that identifies certain goods or services produced or provided by an
standardized services over the internet. Eg: Akshaya Centres : Akshaya centres were initially launched in the year 2002 in the Malappuram district in individual or a company.
Artificial Intelligence(AI):-Alan Turing was considered as the Father of Artificial Intelligence. Artificial Intelligence Kerala. It was introduced by Kerala State Information Technology Mission(KSITM) . c) Industrial Designs:-refers to the ornamental or aesthetic aspects of an article.
comprises the following capabilities:- Benefits of e-Governance: d) Copyright:-legal right given to the creators for an original work, for a limited period of time.
1) Natural Language Processing(NLP) • leads automation of govt. services Infringement:- Unauthorized use of intellectual property rights such as patents, copyrights, and trademarks .
2) Knowledge Representation • strengthens the democracy Cyber space:- a virtual environment created by computer systems connected to the internet.
3) Machine Learning • ensures more transparency Cyber Crimes:- It is a criminal activity in which computers or computer networks are used as a tool, target or a
4) Computer Vision • makes every gov. department responsible place of criminal activity.
5) Robotic Activities • saves time and money A. Cyber crimes against individual:-
Computational Intelligence Paradigms: Challenges to e- Governance: 1. Identity Theft:-
1) Artificial Neural Networks:- The aim is to acquire human brain like activities through a computer. • People who lives in remote area with low e-literacy will face difficulty. 2. Harassment
2) Evolutionary Computation:- Its main objective is to mimic processes from natural evolution. It has been • Security measures are highly required. 3. Impersonation and Cheating
successfully used in real world applications like data mining, fault diagnosis, classification, scheduling etc . • Huge initial investment and planning are required. 4. Violation of Privacy
3) Swarm Intelligence:- It is originated from the study of colonies or swarms of social organisms. • Sharing of personal information may create troubles. 5. Dissemination of obscene material
4) Fuzzy systems:-It provides approximate reasoning. Mainly used in gear transmission and raking systems in B. Cyber Crime against Property
• Integrity of various govt. departments are very much essential.
vehicles, controlling lifts, home appliances , controlling traffic signals etc. 1. credit card fraud
Useful e-Governance websites:-
Application of Computational Intelligence:- 2. intellectual property theft
1. www.dhsekerala.gov.in
1) Biometrics:-refers to measurements related to human characteristics and traits. 3. internet time theft
2. www.edistrict.kerala.gov.in
2) Robotics:-scientific study associated with the design, fabrication , theory and application of robots. C. Cyber Crime against Government
3. www.incometaxindia.gov.in
3) Computer Vision:- The construction of explicit , meaningful descriptions of the structure and the properties 1. Cyber Terrorism
4. www.spark.gov.in
of the 3 –dimensional world from 2 – dimensional images. 2. Website Defacement
2) e-Business:- means the sharing of business information, maintaining business relationships and conducting
4) Natural Language Processing(NLP):- focused on developing systems that allow computers to communicate 3. Attack against e-governance websites
business transactions by means of the ICT application.
with people using any human language. Cyber Laws:- refers to the legal regulatory aspects of the internet.
Electronic Payment Systems(EPS):- credit card, debit card, electronic cheque
5) Automatic Speech Recognition(ASR):- It allows a computer to identify the words that a person speaks into Information Technology Act 2000(Amended in 2008):- In May 2000, the Indian Parliament passed Information
Advantages of e-Business:-
a microphone or telephone and convert it into written text. Eg : Siri(Apple iOS),Cortana(Microsoft Technology Bill and it is known IT Act 2000.
1. It overcomes geographical limitations.
Phone),Google Now(Android) Cyber Forensics:- It is the process of using scientific knowledge for identifying, collecting, preserving, analyzing and
2. It reduces the operational cost.
6) Optical Character Recognition and Hand Written Character Recognition Systems 3. It minimizes travel time and cost presenting evidence to the courts .
7) Bioinformatics:- Application of computer technology to the management of biological information. Infomania:- It is the state of getting exhausted with excess information.
4. It remains open all the time.
8) Geographic Information System(GIS)
5. We can locate the product quicker from a wider range of choices.
Chapter Twelve
Useful e-business websites:-
ICT and Society
1. www.irctc.co.in – Indian Railway Catering and Tourism Corporation Limited website.
ICT means Information and Communication Technology.
2. www.amazon.com
ICT Services:-
3. www.keralartc.com
1) e-Governance:- Application of ICT for delivering government services to citizens in a convenient, efficient,
www.bookmyshow.com

Pae 13 Pae 14 Pae 15

You might also like