0% found this document useful (0 votes)
5 views15 pages

Short Notes (Eng)

The document provides a comprehensive overview of C++ programming, covering fundamental concepts such as tokens, data types, operators, control statements, arrays, functions, and web technology. It explains the rules for naming identifiers, types of literals, and various operators, as well as the structure and syntax of arrays and functions. Additionally, it introduces HTML structure and elements, including text formatting tags and attributes for web development.

Uploaded by

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

Short Notes (Eng)

The document provides a comprehensive overview of C++ programming, covering fundamental concepts such as tokens, data types, operators, control statements, arrays, functions, and web technology. It explains the rules for naming identifiers, types of literals, and various operators, as well as the structure and syntax of arrays and functions. Additionally, it introduces HTML structure and elements, including text formatting tags and attributes for web development.

Uploaded by

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

Chapter 1

Review of C++ Programming


Tokens: It is the basic building blocks of a program.
Different Type of Tokens: Keywords, Identifiers, Literals, Operators, Punctuators
Keywords: Reserved words having specific meaning. e.g. for, if
Identifiers: Names given to variables, arrays and functions. e.g.sum, x
Rules to name an Identifier
 It is the combination of letters, digits and underscore
 It should not start with digit
 Keywords are not allowed
 Special characters and whitespaces are not allowed
Literals: Constants that never change their value during the execution of a program.
Different types of Literals:
 Integers: Numbers without fractional part. e.g. 3
 Floating Point Literals: Numbers with fractional part. e.g. 3.14
 Character Literal: A single character enclosed in single quotes. e.g. ‘a’
 String Literal: One or more characters enclosed in double quotes. e.g. “a”
Escape Sequence: Represents non-graphical characters. It contains a backslash followed by one or two
characters. e.g. Newline (‘\n’), Tab (‘\t’), Backspace (‘\b), Alert Bell (‘\a’)
Data Types Type Modifiers
char 1 Byte Character short 1 Byte Short integer
int 4 Bytes Integer long 4 Bytes Long integer
float 4 Bytes Floating Point Number long 10 Large double precision
double Bytes float number
double 8 Bytes Double Precision Floating signed 4 Bytes Signed integer
Point Number
void 0 Byte Null data unsigned 4 Bytes Unsigned integer
Depending upon the no. of operands, there are 3 types of Operators
Unary Operator Operator with one operand e.g. ++, --
Binary Operator Operator with two operands e.g. +, -
Ternary Operands Operator with three operands e.g. ?:

Arithmetic Operators Relational Operators Logical Operators


+ Addition > Greater Than && Returns true if both of
- Subtraction < Less Than its operands are true
* Multiplication >= Greater Than or Equal to || Returns true if any of its
/ Division <= Less Than or Equal to operand is true
% Modular Division = Equal to ! Returns true if operand
!= Not equal to is false and vice versa
Input Operator (>>) or Get from Operator or Extraction Operator- used to input data. e.g. cin>>a;
Output Operator (<<) or Put to Operator or Insertion Operator- used to output data. eg. cout<<a;
Assignment Operator (=): used to assign a value to a variable. e.g. a=b; (value of b to a)
Increment Operator (++): increments the value by 1. e.g. a++ (a=a+1)
Decrement Operator (--): decrement s the value by 1. e.g. a-- (a=a-1)
Arithmetic Assignment Operators: +=, -=, *=, /= and %=. e.g. x+=5; (equal to x=x+5).
Expression: It is composed of operator and operands.
 Arithmetic Expression: An expression contains arithmetic operator e.g. a+b
 Relational Expression: An expression contains relational operator only. e.g. a>b
 Logical Expression: An expression contains logical operator e.g. (a>b) && (a>c)
Statement: It is the smallest executable unit of a program
 Declaration Statement: it is used to declare variables. e.g int a;
 Assignment Statement: It is used to assign a value to a variable e.g. x=5;

Prepared by Abhilash TS Page: 1


 Input Statement: It is used to input data e.g. cin>>x;
 Output Statement: It is used to output data e.g. cout<<a;
const: Access modifier to define symbolic constants.
e.g. const int x=5; (value of x cannot be changed during execution).
Variable Initialisation: It is assigning value to a variable at the time of its declaration.
e.g. int a=5;
Control Statements
 Selection Statement: Statements executed based on a condition. eg. if, switch
 Looping Statements: Statements executed repeatedly. e.g. while, do-while, for
If statement: If statement is executed based on a condition.
4 types: Simple if, if else, else if ladder, nested if
e.g. if(a>b) switch(code)
Largest=a; {
else case 1:
Largest=b; cout <<”One”;
break;
switch statement case 2:
 It is a multi-branching statement. eg. cout<<”Two”;
 Four keywords in switch are switch, case, break;
break, default default:
 break is used to exit from switch cout<<”Invalid”
 If any of the conditions are not met, }
default block is executed
else if ladder switch
Evaluates any relational or logical expression Evaluates equality relational expression
When no match is found, else block is executed When no match is found, default block is executed
Control automatically goes out break is used to exit
Looping Statement: Different Elements
 Initialisation: Here the control variable is intialised.
 Test expression: Here the value of the control variable is tested.
 Updation: Here the value of the control variable is updated
 Body of Loop: statements that are to be executed repeatedly
Different Looping Statements
while loop do…while loop for loop
e.g. i=1; e.g. i=1; e.g.
while(i<=100) do for(i=1;i<=100;i++)
{ { cout<<i;
cout<<i; cout<<i;
i++; i++;
} } while(i<=100);

Entry Controlled Loop Exit Controlled Loop


Condition is tested before the loop body Condition is tested after the loop body
Loop body may never be executed Loop body will be executed at least once
e.g. while , for e.g. do…while
Conditional Operator (?:): It is a ternary operator used as an alternative to if..else statement.
e.g.largest= (a>b)? a:b;
Jump Statements: break, continue, goto, return
 break: it terminates a loop.
 continue: It forces the next iteration of the loop.
 goto: Trasfer program control from one place to another.

Prepared by Abhilash TS Page: 2


Chapter 2 – Arrays
Array
 Array is used to store more than one data items of same data type.
 Each data item stored in an array is called element.
 The total number of elements stored in an array is called its size.
 The elements are stored in continuous memory locations.
 Each element is identified by its positional value called Subscript or Index.
 The value of the subscripts ranges from “0” to “size-1”.
Array Declaration
Syntax: <data type><array name>[<size>];
e.g. int num[10];
Here num is array with 10 elements, index of first element is 0, index of the last element is 9
Accessing elements of the Array
Accessing each elements of the array is called traversal.
This is done by specifying the index in bracketsalong with array name.
e.g. Read elements of an array num[10] Display elements of an array num[10]
for(i=0;i<9;i++) for(i=0;i<9;i++)
cin>>num[i]; cout<<num[i];
String Handling
String is a group of characters. Hence it can be handled by using a character array.
e.g. char str[10];
This array can store 9 characters. Further a null character (’\0’) is stored at the end of the string
automatically to act as a string terminator.

Input / Output operation on Strings


gets () : Using cin, it is not possible to input strings containing spaces. Space is treated as string delimiter.
Therefore a function gets () is used to input string including white spaces.
e.g. gets(str);
puts(): It is used to display the string.
e.g. puts(str);
The gets() and puts() function is defined in cstdio.

Prepared by Abhilash TS Page: 3


Chapter 3- Functions
Modular Programming- Advantages: Reduces the size of the program, less chance of error occurrence,
reduces programming complexity, improves reusability
Arguments: The data given to the function for performing the task are called arguments (parameters).
The arguments used in the function calling statement (calling function) are known as actual arguments.
The arguments used in the function header (called function) are known as formal arguments.
Type Built- In Use Example
Functions
Console getchar() Read a character ch=getchar();
Functions putchar() Display a character putchar(ch);
(Header File:
cstdio)
Stream get() Read a character or a string cin.get(ch);
Functions getline() Read a string cin.getline(str,10);
(Header File: put() Display a character cout.put(ch);
iostream) write() Display a string cout.put(str,10);
String strlen() Find the length of a string strlen(str);
Functions strcpy() Copy string to another string strcpy(str1,str2);
(Header File: strcat() Concatenates (appends) 2 strings strcat(str1,str2);
cstring) strcmp() Compare 2 strings. Returns 0, if two strings strcmp(str1,str2);
are equal.
strcmpi() Compare 2 string by ignoring cases strcmpi(str1,str2);
Mathematical abs() Finds absolute value of a number e.g. abs(-5) : 5
Functions sqrt() Finds square root of a number e.g. sqrt(25) : 5
(Header File: pow() Finds the power of a number. eg. pow(x,y) : find xy
cmath)
Character Type isdigit() Check whether a character is digit or not. If digit returns 1, else 0.
Functions isalpha() Check whether a character is alphabet or If alphabet returns 1,
(Header File: not else 0.
cctype) isalnum() Check whether a character is alphanumeric If alphanumeric returns1,
or not else 0.
islower() Check whether a character is lower case or If lowercase returns1,
not else 0.
isupper() Check whether a character is upper case or If uppercase returns1,
not else 0.
tolower() Convert a character to lower case. tolower(ch);
toupper() Convert a character to upper case. toupper(ch);

Function Calling Methods (Parameter Passing Techniques)


Call By Value Call By Reference
Ordinary variables are used as formal arguments Reference variables are used as formal arguments
Actual arguments can be variables, constants or Actual arguments can be variables only.
expressions
Separate memory locations for actual and formal Same memory location is shared by actual and
arguments formal arguments

Local Variable Global Variable


Variable declared within a function Variable declared outside all the functions
It can only be accessed within a function. It can be accessed by all the functions.
Its life time is function execution time. Its life time is program execution time.

Prepared by Abhilash TS Page: 4


Chapter 4
Web Technology
Static Web Page Dynamic Web page
Content is fixed Contents are changed frequently
It never uses databases. Database is used
Easy to design. Requires programming skills
Client side scripting languages are used to create client side scripts .e.g. JavaScript, VB Script
Server side scripting languages are used to create server side scripts .e.g. ASP, JSP, PHP

Client Side Script Server Side Script


Processed by the client machine Processed by the server machine
Used for data validation Used to access and manipulate the databases
Users can block client side scripts. Users cannot block server side scripts.
Software Ports: 20, 21- FTP, 25- SMTP, 53- DNS, 80- HTTP, 110- POP, 443- HTTPS
Structure of an HTML program
An HTML program contains two sections
 Head Section: contains basic information including title. (between <HEAD> and </HEAD>)
 Body Section: Actual contents. (Between <BODY> and </BODY>
Container Tag: Tag with both opening tag and closing tag.
eg. <HTML>, <TITLE><BODY> etc.
Empty Tag: Tag with only opening tag.
eg. <BR>, <HR><IMG> etc.
<BODY>
Attributes Meaning
BGCOLOR background colour
BACKGROUND background image
TEXT colour of the text
LEFTMARGIN left margin of the webpage.
TOPMARGIN top margin of the webpage.
LINK colour of the hyperlink. Default colour is blue.
ALINK colour of the activated link. Default colour is green.
Heading Tags :
 <H1>, <H2>, <H3>, <H4>, <H5> and <H6>are known as Heading Tags,
 used to display headings in different sizes.
 <H1> displays the biggest heading,<H6> displays the smallest heading.
 Attribute is ALIGN : It specifies the alignment of the heading; values are; left, right or center.
e.g. <H1 ALIGN=“center”> Govt. H.S.S Thirunalloor</H1>

<P>: It specifies the paragraph.Attribute is ALIGN: It specifies the alignment of the paragraph. Values
are; left right , center or justify.
e.g. <P ALIGN=”center”>India is my country</P>
<BR>: line break.
<HR>: draws a horizontal line.

Attributes Meaning
SIZE thickness of the line.
WIDTH length of the line
ALIGN alignment of the line.
COLOR colour of the line.
NOSHADE draw the line without any shading effect. It has no value.

Prepared by Abhilash TS Page: 5


Text Formatting Tags
Tag Description Example Output
<B> displays the text in bold. <B>Kerala</B> Kerala
<I> displays the text in italics. <I>Kerala</I> Kerala
<U> displays the text with underline. <U>Kerala</U> Kerala
<S> displays the text in strike through style. <S>Kerala</S> Kerala
<SUB> displays the text as subscript. H<SUB>2</SUB> H2O
<SUP> displays the text as superscript. x<SUP>3</SUP> x3
<Q> displays the text in double quotation <Q>Kerala</Q> “Kerala”
marks (small quotations)
<BIG> displays the text in font size bigger than <BIG>Kerala</BIG> Kerala
the normal text size
<SMALL> displays the text in font size smaller than <SMALL>Kerala Kerala
the normal text size </SMALL>
<STRONG> used as a phrase tag to specify an <STRONG>Kerala Kerala
important text. (same as <B>) . </STRONG>
<EM> used to emphasise a text. (same as <I>). <EM>Kerala</EM> Kerala

<BLOCKQUOTE> used to indent a content. (large <BLOCKQUOTE> Knowledge is the best


quotations) weapon to conquer this world.
<BLOCKQUOTE>
<CENTER> used to display the content centrally <CENTER>All the best </CENTER>
aligned.

<MARQUEE>:It displays a text or an image scrolling either horizontally or vertically.


Attributes Meaning
DIRECTION direction of the scrolling. values left, right, up or down.
BEHAVIOUR behaviour of the scrolling. values; scroll, slide or alternate.
SCROLLDELAY time delay between two successive scrolling.
SCROLLAMOUNT speed of the scrolling.
LOOP how many times the element should scroll in a web page. Default value is infinite.

<IMG>:It displays an image. It is an empty tag.


Attributes Meaning
SRC file name of the image.
HEIGHT height of the image.
WIDTH width of the image.
ALIGN alignment of the picture with respect to a text. Values: Top, Middle or Bottom.
ALT It specifies the alternative text to be displayed if the browser cannot display the image.
e.g.<IMG SRC=”kerala.jpg” HEIGHT=300 WIDTH=300>

<FONT>:It specifies the font settings for a text in a webpage.


Attributes Meaning
FACE Font name
SIZE Font size
COLOR Font colour.
e.g.<FONT FACE=“verdana” SIZE=5 COLOR=“green”> Speed thrills; but kills;</FONT>

Prepared by Abhilash TS Page: 6


Chapter 5
Web Designing using HTML
Hyperlink: Text or an image that links to another webpage or another part of the same webpage
<A>(anchor tag) is used to specify hyperlinks in a webpage. Its attribute HREF specifies the URL or file
name of webpage to which the hyperlink is referenced.
External links are hyperlinks to another webpage
e.g. <A HREF=“address.html”> Contact Details </A>
Internal links are hyperlinks to another part of the same webpage.
<A HREF=“#kerala”> Kerala State </A>

ORDERED LIST
<OL> and <LI> is used to display ordered list in a webpage.
<OL>:It specifies an order list.AttributeTYPE specifies the type of the ordered list.
<LI> : It specifies each item in an ordered list.
TYPE=“1”(Default value) 1 English <OL>
2 Hindi <LI>English</LI>
3 Malayalam <LI>Hindi</LI>
<LI>Malayalam</LI></OL>
TYPE=“a” a English <OL TYPE=”a”>
b Hindi <LI>English</LI>
c Malayalam <LI>Hindi</LI>
<LI>Malayalam</LI></OL>
TYPE=“A” A English <OL TYPE=”A”>
B Hindi <LI>English</LI>
C Malayalam <LI>Hindi</LI>
<LI>Malayalam</LI></OL>
TYPE=“i” i English <OL TYPE=”i”>
ii Hindi <LI>English</LI>
iii Malayalam <LI>Hindi</LI>
<LI>Malayalam</LI></OL>
TYPE=”I” I English <OL TYPE=”I”>
II Hindi <LI>English</LI>
III Malayalam <LI>Hindi</LI>
<LI>Malayalam</LI></OL>

UNORDERED LIST
<UL> and <LI> is used to display unordered list.
<UL>: It specifies an unordered list. AttributeTYPE specifies the type of the unordered list
<LI> : It specifies each item in an unordered list.
TYPE=”disc” (Default value)  English <UL>
 Hindi <LI>English</LI>
 Malayalam <LI>Hindi</LI>
<LI>Malayalam</LI>
</UL>
TYPE=“circle” o English <UL TYPE=”circle”>
o Hindi <LI>English</LI>
o Malayalam <LI>Hindi</LI>
<LI>Malayalam</LI>
</UL>
TYPE=“square”  English <UL TYPE=”square”>
 Hindi <LI>English</LI>
 Malayalam <LI>Hindi</LI>
<LI>Malayalam</LI>
</UL>

Prepared by Abhilash TS Page: 7


DEFINITION LIST
<DL>, <DT> and <DD> is used to display definition list.
 <DL> : It specifies a definition list
 <DT>: It specifies each term in a definition list.
 <DD>: It specifies the definition of each term.
e.g.
CPU <DL>
Central Processing Unit <DT>CPU </DT>
ALU <DD>Central Processing Unit</DD>
Arithmetic and Logical Unit <DT>ALU </DT>
RAM <DD>Arithmetic and Logical
Random Access Memory Unit</DD>
<DT>RAM </DT>
<DD>Random Access Memory</DD>
</DL>

TABLE
<TABLE>, <TR>, <TH> and <TD> are used to display tables.
<TABLE>:It specifies table in a webpage
BORDER It specifies the border of the table
BGCOLOR It specifies the background colour of the table
BACKGROUND It specifies a background picture for a table
ALIGN It specifies alignment of the table (values are left, right or center)
HEIGHT It specifies the height of the table (usually it is given in pixels)
WIDTH It specifies the width of the table (usually it is given in percentage)
CELLSPACING It specifies the space difference between two adjacent cells of the table
CELLPADDING It specifies the space difference between the cell border and its data

<TR> <TH> <TD>


It specifies each row in a It specifies heading cells of a table It specifies data cells of a table.
table. Data are displayed in bold face Data are displayed in normal face
Alignment is center by default Alignment is left by default
Attributes of <TR>, <TD> and <TH>
ALIGN: It specifies the horizontal alignment (values are left, right and center)
VALIGN: It specifies the vertical alignment (values are top, middle and bottom)
BGCOLOR: It specifies the background colour.
<TABLE >
<TR>
<TH>Roll No</TH>
<TH>Name</TH>
<TH>Total</TH>
</TR>
<TR>
Roll No Name Total <TD>1</TD>
1 Arjun 546 <TD>Arjun</TD>
2 Bindu 466 <TD>546</TD>
</TR>
<TR>
<TD>2</TD>
<TD>Bindu</TD>
<TD>466</TD>
</TR>
</TABLE>
Prepared by Abhilash TS Page: 8
Form
Form is used to collect data from the user and submit it to the server machine.
An HTML form contain different controls such as
 Text Box  Radio Button  Submit Button
 Password Box,  Check Box  Reset Button
 Text Area  Select Box
<INPUT>: It is used to display different controls.
<INPUT TYPE=“text”> text box. To enter data in single line
<INPUT TYPE=“password”> password box. To enter password
<INPUT TYPE=“radio”> radio button. To select an option from multiple options
<INPUT TYPE=“checkbox”> check box. To select one or more options
<INPUT TYPE=“submit”> submit button Submits the data to the server machine.
<INPUT TYPE=“reset”> reset button Clears the data entered in a form.

<TEXTAREA>: Displays text area through which user can enter multiple line of text.
<SELECT> and <OPTION>: It is used to display the select box (drop down box)

Chapter 6
Client Side Scripting using JavaScript
Brendan Eich: Developer of JavaScript
<SCRIPT>: It is used to include JavaScript codes in an HTML page. Its attribute “language” to specifies the
name of the scripting language.
Data types
• Number: It represents numbers
• String: It represents string
• Boolean: It represents a data item that has two values; either true or false.
Variable Declaration
In Javascript, variables are declared by using the keyword var.
e.g. var x, y;
It only specifies the names of variables. It does not specify their data types. The definition of a variable
is completed only when it is assigned a value.
Undefined Data Type
If a variable is declared, but it is not assigned a value, then JavaScript engine cannot understand its
data type. Hence it is assigned as undefined data type.
Operators: Arithmetic, Relational, Logical, Assignment, Increment, decrement operators (similar to C++)
Control structures: if, switch, while, for (similar to C++)

String Addition Operator (+)


“+” operator behaves differently according to the type of operands. If both the operands are numbers,
then it will add the numbers. If both the operands are strings, then it will concatenate the strings.

Built-in Functions
• Number() : converts a string data to a number.
• alert() : displays a message in a message window.
• isNaN():checks whether a value is number or not. Returns true if the value is not a number.
• toUpperCase():converts a string to upper case.
• toLowerCase():converts a string to lower case.
• charAt():returns a character at a particular position.charAt(0) returns the first character.
• length: It is a property that returns the length of a string.

Prepared by Abhilash TS Page: 9


Chapter 7
Web Hosting
Web Hosting
It is the service of providing storage space in a web server to store websites in order to avail that site on
the internet.
Web Hosts: Companies that provide web hosting services are called web hosts

Types of web hosting: Shared Hosting, Dedicated Hosting, Virtual Private Server
Shared Hosting: In shared hosting, different websites are stored in a single server.
Advantages
• Servers are cheap & easy to use
• Security issues are taken care by the web host
Disadvantages
• If any of the website has a large volume of traffic, it will slow down the remaining websites.
• Not suitable for websites that require huge storage space, huge bandwidth.
Dedicated Hosting
In dedicated hosting, the web server and all its resources are exclusively used by a single client.
Advantages
• Client has the complete freedom to choose the hardware and software requirements
• Websites can be accessed quickly.
Disadvantages
• It is expensive
Virtual Private Server (VPS)
In this case, the server machine is virtually partitioned into a number of virtual servers using
virtualization softwares. Each virtual server is assigned with specific amount of storage space & memory,
and other softwares.
Advantages
• It provides almost all the services of dedicated hosting at lesser cost.
• It provides dedicated bandwidth to each website on the server.
• Users are permitted to install and configure any software on their VPS.
Virtualisation Softwares : - VMware, VirtualBox, Microsoft Hyper-V
Free Hosting
• Provides web hosting free of charge.
• Displays advertisements in the websites to meet the expenses.
• Size of the files that can be uploaded is limited.
• Audio/ video files may not be permitted.
e.g. yola.com
FTP Client Software
The FTP Client Software is used to transfer the files of the websites from our computer to the web
server. The software requires a user name and a password to connect to the web server. The software
uses SFTP protocol that encrypts and sends data to the server machine.
eg. Cute FTP, Smart FTP, FileZilla

CMS (Content Management System)


• It is a web based software system for designing and publishing websites.
• Different templates are available to design websites.
• Web designing and programming knowledge is not needed.
e.g. Wordpress, Drupal, Joomla

Responsive Web Designing


• It is designing web sites suitable to work on every device by adjusting itself to the screen size.
• It is implemented by using flexible grid layout, flexible images and media queries.
Prepared by Abhilash TS Page: 10
Chapter 8
Database Management System
DBMS
DBMS (Database Management System) is for defining, constructing and manipulating databases.
e.g. Oracle, MySQL, MS SQL Server, MS Access

Advantages of DBMS
• It controls data redundancy (duplication of data).
• It avoids data inconsistencycy
• It allows sharing of data.
• It provides data security.
• It ensures data integrity(correctness of the data).
• It ensures data recovery.
Components of DBMS
• Hardware: Computer system used to store and manage database
• Software: Programs and utilities to manage the database
• Database: Organised collection of related data
• User: Users access and manage the database
• Procedures: Commands or rules to access and manipulate the databases
Structure of the Database
• A File is a collection of related records
• A Record is a collection of related fields.
• A Fieldis the smallest unit of data.
Data Abstraction: Representing important details of the database by hiding its complex storage and
management details.
Levels of Data Abstraction
• Physical Level: It specifies how the data is actually stored in the storage medium.
• Logical Level: It specifies the data stored and the relationship among the data.
• View Level: It specifies how user views and accesses the data.
Schema: Structure of the database
Instance: Content of the database
Metadata: Data about the data
Data Independence: Ability to modify the schema definition in one level without affecting the schema
definition in higher levels. 2 types of data independence.
• Physical Data Independence: Ability to modify the schema definition in physical level without
affecting the schema definitions in logical level and view level.
• Logical Data Independence: Ability to modify the schema definition in logical level without
affecting the schema definitions in view level.
Users of the Database
• Database Administrator (DBA): Person having centralised control over the database.
• Application programmer: Programmers access the database through application programs.
• Sophisticated users: Doctors, engineers, accountants etc. access the database through queries.
• Naïve users: Ordinary users access database through programs written previously.
Duties of Database Administrator
 Defining and maintaining physical level and logical level.
 Creating other users and granting them permission to access the database.
 Ensuring data recovery from system crashes or failures.
Terminologies in Relational Data Model
 Entity: Entity is an object or a concept that has certain characteristics.
 Relation: Relation refers to a table in which data are arranged in rows and columns.
 Tuple: Each row in a table is called Tuple.
 Attribute: Columns of a relation are called attributes.
 Cardinality: Number of tuples in a relation is called cardinality.
Prepared by Abhilash TS Page: 11
 Degree: Number of attributes in a relation is called degree.
 Domain: It is the set of all the possible values that can be assigned to an attribute.
Key
 Primary Key: It is an attribute that uniquely identifies each tuple in a relation
 Candidate Key: It is an attribute which are candidates to select as a primary key.
 Alternate Key: A candidate key which is not selected as the primary key is called alternate key.
 Foreign Key: It is an attribute in a relation which is a primary key in another relation.
Relational Algebra
It defines the set of operations performed on relations. Different operations are
 Select (σ )  Intersection (∩)
 Project (π)  Set Difference (-)
 Union (U)  Cartesian Product (X)
Select (σ ): It is a unary operation that selects tuples of a relation satisfying a certain condition.
e.g. Display the details of students in Commerce batch
Ans:σ BATCH=“Commerce”(STUDENT)
Project (π):It is a unary operation that projects certain attributes of a relation.
e.g. Display roll number and name of all the students
Ans: πROLLNO, NAME (STUDENT)
Union (∪): R1UR2 is a relation containing tuples of both R1 and R2 without repetition.
Intersection (∩):R1∩R2 a new relation with common tuples of R1 and R2.
Set Difference (-): R1-R2 is a new relation with all the tuples of R1, but not in R2.
e.g. consider the following 2 relations, R1 and R2
R1 R2
ROLLNO NAME BATCH ROLLNO NAME BATCH
1 Ajith Commerce 2 Anand Science
2 Anand Science 3 Bijoy Science
3 Aravind Commerce 4 Deepak Commerce
R1 U R2 R1 ∩ R2
ROLLNO NAME BATCH ROLLNO NAME BATCH
1 Ajith Commerce 2 Anand Science
2 Anand Science R1 - R2
3 Aravind Commerce ROLLNO NAME BATCH
3 Bijoy Science 1 Ajith Commerce
4 Deepak Commerce 3 Aravind Commerce

Cartesian Product: It is a binary operation that returns a relation containing all the possible
combinations of tuples of both the relations .
e.g. consider the following 2 relations, R1 and R2
R1 AdmNo Name R1 AdmNo Name PEN Teacher Subject
X 100 Mithun 4102 Pradeep Eco
100 Mithun
R2 100 Mithun 3456 Ajith Acc
102 Rahul 100 Mithun 2450 Arun Eng
102 Rahul 4102 Pradeep Eco
R2 PEN Teacher Subject 102 Rahul 3456 Ajith Acc
4102 Pradeep Eco 102 Rahul 2450 Arun Eng
3456 Ajith Acc
2450 Arun Eng
Let c1 and c2 be the cardinalities of R1 and R2 respectively, then the cardinality of R1 X R2 is c1 x c2.
Let d1 and d2 be the degrees of R1 and R2 respectively, then the degree of R1 X R2 is d1 + d2.

Prepared by Abhilash TS Page: 12


CHAPTER 9
Structured Query Language
Components of SQL
DDL (Data Definition Language): It provides commands to define and modify the structure of the
database.e.g. CREATE, ALTER, DROP
DML (Data Manipulation Language): It provides commands to manipulate the database such as adding
data, deleting data, modifying data and retrieving data.
e.g. INSERT, DELETE, UPDATE, SELECT
DCL (Data Control Language) :It provides 2 commands to control the accessing of database.
 GRANT: It gives the user the privileges to access the database.
 REVOKE: It withdraws the privileges already given to the user.
SQL Data Types
 INT or INTEGER :It specifiesinteger data
 DEC or DECIMAL: It specifies floating point data.
 CHAR or CHARACTER: It specifies fixed length strings.
 VARCHAR: It specifiesvariable length strings.
 DATE: It specifies date.
 TIME: It specifies time.
Difference between CHAR(n) and VARCHAR(n)
CHAR VARCHAR
It specifies fixed length strings. It specifies variable length strings.
It always allocates fixed bytes of memory. It allocates only sufficient bytes of memory
It can store a max of 255 characters It can store a max of 65535 characters
Constraints
 PRIMARY KEY: It specifies an attribute as primary key.
 NOT NULL: It specifies that an attribute should not contain any null value.
 UNIQUE: It specifies that an attribute should contain unique values.
 AUTO_INCREMENT: It automatically increments the value of an attribute.
 DEFAULT : It specifies a default value for an attribute
SQL Commands
• CREATE TABLE: Creates a table.
• ALTER TABLE: Modify the structure of a table.
• DROP TABLE: Deletes the table.
• DESCRIBE (DESC): Displays the structure of a table.
• INSERT: Adding rows to a table.
• SELECT: Displaying rows of a table.
• UPDATE: Modifying rows of a table.
• DELETE: Deleting rows of a table.
DISTINCT: used in SELECT statement to display values of an attribute without repetition.
WHERE: used in SELECT statement to display rows of a table based on a condition.
LIKE: Pattern matching operator
ORDER BY: Used in SELECT statement to display rows in ascending or descending order.
GROUP BY: used in SELECT statement to group the rows of a table based on an attribute.
HAVING: Used in SELECT statement with GROUP BY clause to specify the condition.
Aggregate Functions
 SUM: returns sum of values of an attribute.
 MIN: returns the minimum value of an attribute.
 MAX: returns the maximum value of an attribute.
 AVG: returns the average value of an attribute.
 COUNT: returns the total number of values of an attribute.

Prepared by Abhilash TS Page: 13


CHAPTER 10
ERP (Enterprise Resource Planning)
Enterprise Resource Planning (ERP): ERP combines all the business requirements of an enterprise
together into a single integrated software system that runs off a centralised database.
Functional Units of ERP
 Financial Module  HR Module  Marketing Module
 Manufacturing Module  Inventory Control  Sales & Distribution
 Production Planning Module Module
Module  Purchasing Module  Quality Management
Module
BPR (Business Process Re-engineering)
• It is restructuring and redesigning of business processes to achieve improvements in
performance such as cost, quality, service and speed of an enterprise.
• It includes identification of business processes, analysis of business processes, designing
of a revised process and implementation of the revised process.
Popular ERP packages
 Oracle ERP: It is an ERP package from Oracle Corporation, USA.
 SAP: SAP stands for Systems Applications and Products for Data Processing.
 Odoo: It is an open source ERP package (free software). It was formerly known as Open ERP.
 Microsoft Dynamics: It is an ERP package from Microsoft Corporation.
 Tally ERP: It is a business accounting software developed by Bangalore based Company.

Benefits of ERP
 Improved Resource Utilisation  Decision Making Capability
 Better Customer Satisfaction  Increased Flexibility
 Provides accurate information  Information Integrity
Risks of ERP
 High Cost
 Implementation is time consuming process
 Requirement of additional trained staff
 Operational and maintenance issues
ERP related Technologies
 Product Life Cycle Management (PLM)  Supply Chain Management (SCM)
 Customer Relationship Management (CRM)  Decision Support System (DSS)
 Management Information System (MIS)

CHAPTER 11
Trends and Issues in ICT
GPRS: GPRS (General Packet Radio Service): packet oriented data service.
EDGE (Enhanced Data rates for GSM Evolution): offers higher data transmission rates than GPRS.
Mobile Communication Services: SMS, MMS, GPS & Smart Card
SMS (Short Message Service)
• It is a text messaging service to send short text messages (up to 160 characters).
• It is SMS is sent through a Short Message Service Centre (SMSC)
• It is delivered by using the protocol called Signaling System No. 7 (SS7).
MMS (Multimedia Messaging Service)
• It is a standard way to send and receive multimedia messages by using mobile phones.
• An MMS server is used to store and forward the multimedia messages.
GPS (Global Positioning System)
• It is a satellite based navigation system used to locate a geographic position anywhere on earth.
• It consists of satellites, control and monitoring stations and receivers.
• It is used by transporting companies to track the movement of their vehicles.

Prepared by Abhilash TS Page: 14


Smart Card
• A small plastic card embedded with a chip that contains a memory and a processor.
• It can be used to store and process data.
• SIM (Subscriber Identity Module) is a type of smart card.
• Smart cards are also used as Credit Cards, Debit Cards etc.
Mobile Operating System
It is the operating system used in mobile devices such as smart phones, tablets etc.
eg. Android, iOS, Blackberry OS
Android Operating System (First version is Cupcake)
• It is a Linux based mobile operating system from Google.
• It was originally developed by Andy Rubin& his friends in 2003.
• Supports touch screen operations like swiping, tapping, pinching etc.
Big Data in Business: Large volume of data that comes from social media posts, digital pictures and
videos and transaction records which are related to a particular business.
Big Data Analytics: It is the process of examining big data to uncover market trends, customer
preferences and other useful business information.
Business Logistics
It is the management of the flow of goods in a business between the point of origin and point of
consumption. It ensures the availability of right product in the right quantity and condition, at the right
place and time for right customer, at the right cost.
RFID (Radio Frequency Identification) Technology
 It is used to identify, track or detect objects in logistics.
 It consists of a RFID tag and a reader.
 These tags are pasted or inserted on products or containers.
Intellectual Property Rights
Patent Trademark Copyright
Applies to invention of a Refers to Name, logo and Applies to Creative Intellectual
product or service symbols related to a product works
Registration is required, Registration is required, Not necessary to register
not renewable renewable
For a period of 20 years For a period of 10 years Until 60 years after the death of
the last surviving creator

Cyber Crime against Individuals


 Using another person’s identifying information to commit crimes
 Posting humiliating comments in chat rooms or social media.
 Impersonation and Cheating
Cyber Crime against Property
 Credit Card Fraud
 Intellectual Property Theft
 Internet Time Theft
Cyber Crime against Government
 Cyber terrorism against government computer networks.
 Hacking of government websites and posting antinational comments in it.
 DoS attack against e-governance websites.
Cyber Forensics: It is defined as a discipline to collect and analyse the data from computer systems,
networks and storage devices in a way that is admissible as evidence in a court of law.
Infomania
 It is the state of a person exhausted with excess information.
 It occurs due to the accumulation of information from internet and mobile phones
 Constantly checking e–mails, social networking sites etc. are symptoms of infomania.
Prepared by Abhilash TS Page: 15

You might also like