Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
50 views55 pages

II PUC CS Notes

Uploaded by

adityasingh34298
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)
50 views55 pages

II PUC CS Notes

Uploaded by

adityasingh34298
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/ 55

CHAPTER – 1

Typical Configuration of Computer System

Data: It is unprocessed raw items. Like- 16, computer, 3000rs, 20 units.


Information: It is computer processed data. Data will be combined and processed as
information.
User: The person who interact with computer.
Hardware: These are the physical components which can be see and touch.
Ex: monitor, keyboard, mouse.
Software: These are the set of instruction to hardware.
Ex: Microsoft, Nudi, Paint.

Functional components of Computer (Block diagram of Computer)


CPU
ALU
Input Unit Output Unit

CU

Memory Unit
Input unit: It takes data from user and produce to system.
Output unit: It takes data from the system and produce to user.
Memory: It stores the data and gives when required.
CPU: Central Processing Unit. Here all tasks will be performed.
A) ALU: Arithmetic Logic Unit. Here arithmetic operations like +, -, *, /, % and also
Logical operation like AND, OR, NOT takes place.
B) CU: Control Unit. It controls all the units of computer.

Introduction to Mother Board:


Mother board is the main printed circuit board inside computer. All the components of
computer communicate through the mother board.
Mother board can be characterized based on:
 Form factor: It refers the physical appearance like geometry, dimensions, etc...
 Chipset: It refers to the part which will transfer data between various components.
 Processor socket: It refers to the shape of socket where processor will be inserted.
Types of Mother Board:
1) XT Mother Board: (Extended Technology)
This consist of old model processor socket LIF (Low Insertion Force), 12 pin power
connector, RAM slot, DIMM slot (Dual In-line Memory Module) and ISA slot
(Industry Standard Architecture).
EX: Pentium I, Pentium II.
2) AT Mother Board: (Advanced Technology)
This consist of PGA socket (Pin Grid Array), 20 pin power connector, SDRAM slot,
ISA slot, PCI slot (Peripheral Component Interconnection).
EX: Pentium III.
3) Baby AT Mother Board:
It is the combination of XT and AT. It consist of slot type and PGA socket, 12 and 20
pin power connector, DDRRAM slot, PCI slot, ISA slot.
EX: Pentium III and Pentium IV.
4) ATX Mother board: (Advanced Technology Extended)
It is the latest mother board. It consist of MPGA socket (Micro Pin Grid Socket), 20
and 24 pin power connector, DDRRAM slot, PCI slot, AGP slot (Accelerated
Graphics Port).
EX: Pentium IV, Dual Core, Quad Core, i3,i5,i7 ...

Components of Mother Board:


 Processor (CPU)
 BIOS
 CMOS
 Slot
 Disk controller
 Port
 BUS
Processor: It is main component on the computer. It will process all the task. And it is called
Brain of the computer.
Microprocessor: It is the small Integrated Circuit (IC) chip consist of complete
computation process.

BIOS: (Basic Input Output System)


It is the small chip on mother board that hold instructions to load hardware components.
BIOS run when computer is switched on and perform Power On Self Test (POST).

CMOS: (Complementary Metal Oxide Semiconductor)


It is the memory chip to store date, time and system setup parameters. CMOS and BIOS are
kept powered by small Lithium Ion Battery.
Slot: It is a small opening on mother board to expand its capability. These are also called as
expansion slots.
Example:
 ISA slot: (Industry Standard Architecture) It is used to connect Modem and input
devices.
 PCI slot: (Peripheral Component Interconnection) It is used to connect Graphics card,
sound card and these are faster than ISA.
 AGP slot: (Accelerated Graphics Port) It provide faster access to Graphics cards.
 RAM slot: (Random Access Memory) It is used to insert RAM.
 Processor slot: It is used to insert processor, which is largest chip on mother board.

Disk Controllers: This is the circuit that will enable CPU to communicate with different
Disk like hard disk, floppy disk, etc...

Ports: These are used to connect external devices like printer, keyboard, monitor to the
Mother board. These are located back side of the Computer.
Types:
1. Serial port: These are used to connect communication devices like mouse and modem.
And it can transfer 1bit data at a time.
2. Parallel Port: These are used to connect input and output devices like printer and
scanner. And it can transfer 1Byte data at a time.
Example:
 IDE port: (Integrated Digital Electronic) it is used to connect IDE device like CD
drive and Hard disk drive.
 USB port: (Universal Serial BUS) It is easy to use also called plug and play port. It
supports 125 devices.
 VGA port: (Visual Graphics Adaptor) It is used to connect monitor and projectors.
 Power connector: used to connect power supply to the computer.

Bus: Bus is the set of wires that will carry data from one end to another end.
Types:
 Data Bus: It provides path to transfer data between CPU and memory.
 Address Bus: It provides path to transfer data between CPU and RAM.
 Control Bus: It is used to control the access of data.

Types of Memory:
 Primary Memory: This is the internal and main memory.
 ROM: Read Only Memory. This is pre written information about system and
cannot be changed.
 PROM: Programmable ROM. ROM memory which can be written only
once.
 EPROM: Erasable Programmable ROM. ROM memory which can be
erasable by ultraviolet light and write again.
 EEPROM: Electrically Erasable Programmable ROM. ROM memory
which can be erasable by electrical charge and write again.
 RAM: Random Access Memory. This will store program temporary when it
need to execute.
 SRAM: Static RAM. It contains 4-6 transistors and it is expensive.
 DRAM: Dynamic RAM. It is most commonly used RAM. It contains
Transistor and capacitors.
 SDRAM: Synchronous Dynamic RAM.
 DDR- SDRAM: Double Data Rate SDRAM.
 Secondary Memory: This is external memory. It is used to store data from long time
to access.
 Hard Disk
 Floppy Disk
 Compact Disc (CD)
 Magnetic Tape
 Cache Memory: This is small and high speed memory placed between primary
memory and CPU. It stores most recent data.
 L1 cache memory- It is placed inside CPU.
 L2 cache memory- It is present on mother board.
 Register: It is the high speed temporary storage is located inside CPU.

Power Supply to the Computer System:


 SMPS: Switch Mode Power Supply. It converts AC power to DC power and supply to
Computer system.
 UPS: Un-interrupted Power supply. It will provide power supply when there is absent
of main power supply from its battery.
 Online UPS: It supplies power from its own inverter so there will be no gap
between main power supply and UPS.
 Offline / Standby UPS: It suddenly switches to battery supply when there will
be absence of main power supply.

**********
CHAPTER – 2
Boolean Algebra

Boolean algebra is also called and “switching algebra”.

Principle of Duality:
It states that from one Boolean relation another Boolean relation can be derived by
i. Changing each OR (+) into AND (.) sign.
ii. Changing each AND (.) into OR (+) sign.
iii. Changing each 0 by 1 and 1 by 0.

Example:
0+0=0  1.1=1
1+0=1 0.1=0

Properties of 0:
0+X=X 0.X=0
X+0=X X.0=0

Properties 0f 1:
1+X=1 X.1=X
X+1=1 1.X=X

Idempotent Law: This law states that when a variable is combined with itself the output
will be same.
X+X=X
X.X=X

Involution Law: This law states that when variable is complemented two times output will
be same.
̿=X
X

Complementary Law: This law states about combining variable with its complementary.
X+ ̿
X=1
.̿
X X=0
Note:
 Tautology: When all the outputs are 1that is Tautology.
 Fallacy: When all the outputs are 0 that is Fallacy.
Commutative Law: This law states that
X+Y=Y+X
X.Y=Y.X

Association Law: This law states that


X+(Y+Z) =(X+Y) +Z
X. (Y.Z) = (X.Y) .Z

Distributive Law: This law states that


X. (Y+Z) =X.Y+X.Z
X+ (Y.Z) = (X+Y). (X+Z)

Absorption Law: This law states that


X+XY=X
X(X+Y) =X
(All the laws should be explained with truth table or algebraically way that is explained
manually)

De Morgan’s Theorem:
First Theorem:
̅̅̅̅̅̅̅̅
𝑋 +𝑌 =X ̅. Y
̅
Explained by Complementary law. (manually)

First Theorem:
̅̅̅̅̅
𝑋. 𝑌 = ̅X+̅ Y
Explained by Complementary law. (manually)
It explains that break the line change the sign.

Min terms: Product of all literals is called min terms.


X Y Z Min term
0 0 0 m0=X̅̅YZ̅
0 0 1 m1=X̅̅
Y𝑍
0 1 0 m2=X̅YZ̅
0 1 1 m3=X̅YZ
1 0 0 m4=XY ̅Z̅
1 0 1 m5=XY̅𝑍
1 1 0 m6=XYZ̅
1 1 1 m7=XYZ
Max terms: Sum of all literals is called max terms.
X Y Z Max term
0 0 0 M0=X + Y + 𝑍
0 0 1 M1=X + Y + Z̅
0 1 0 ̅+𝑍
M2=X + Y
0 1 1 M3=X + ̅
Y + Z̅
1 0 0 ̅+Y+𝑍
M4=X
1 0 1 ̅ + Y + Z̅
M5=X
1 1 0 ̅+̅
M6=X Y+𝑍
1 1 1 M7=X + ̅
̅ Y + Z̅

Conical expression: Boolean expression composed completely either of max term or min
term is called conical expression.
 Sum-of-products: (SOP) ex: ̅ XYZ + ̅
X̅YZ̅ + ̅
XYZ̅
 Product-of-Sum: (POS) ex: (X ̅ + Y + 𝑍). (X + ̅Y + 𝑍)

Simplification of Boolean Expression using Karnaugh Maps (K-Map)


5 marks important question explained manually.

**********
CHAPTER – 3
Logical Gates

Logical gates: It is the simple electronic circuit which takes one or more input signals and
produce single input signal.
 Basic gates
 NOT gate (Inverter)
 OR gate
 AND gate
 Derived gates: The gates which are derived from basic gates.
 NOR gate (NOT-OR)
 NAND gate (NOT-AND)
 XOR gate (Exclusive OR)
 XNOR gate (Exclusive NOR)
NOT gate (Inverter): It takes one input signal and produces one output signal. If input is high
output is low and if input is low output is high. (bar operator “ – “)

OR gate: It takes two input signal and produces one output signal. If any one of the inputs is
high output is high else output is low. (Addition operator “+”)

AND gate: It takes two input signal and produces one output signal. If all the inputs are high
output is high else output is low.(Dot operator “.”)
Derived gate: The gates which are derived by the basic gates.

NOR gate: It takes two input signal and produces one output signal. If any one of the inputs
is high output is low else output is high.

NAND gate: It takes two input signal and produces one output signal. If all the inputs are
high output is low else output is high.

XOR gate: It takes two input signal and produces one output signal. If odd number of inputs
is high than output is high else output is low.

XNOR gate: It takes two input signal and produces one output signal. If odd number of
inputs is high than output is low else output is high.
Universal gates: These are the gate from which all the basic gates can be designed. Those
gates are NAND & NOR.

Designing NOT, OR, AND gates using NOR:


NOR to NOT

NOR to OR

NOR to AND
Designing NOT, OR, AND gates using NAND:
NAND to NOT

NAND to OR

NAND to AND

**********
CHAPTER – 6
Basic Concepts of OOPs
Class: Class is a user defined data type. It contains both data members and member
functions. It can have any number of objects.
Object: It is basic building block to design program. It contains both data members and
member functions. Each object is identified with different name.
Data abstraction: It is the concept of providing permission to access information as object
without knowing its background details.
Data encapsulation: It is concept of combining data and function into single unit called
class. And it prevents direct access to data and it can be accessed using member functions.
Inheritance: It is concept of providing idea of reusability. Here properties from one class
will transfer to another class.
Polymorphism: It is ability of performing task in more than one form. It has function
overloading and operator overloading.
Function Overloading: Two or more functions having different arguments.
Operator Overloading: Same operator performing different task based on data type.
Dynamic binding: Combining two or more programs during run time (execution time) is
called Dynamic binding.
Message passing: Message is the request for another code. Message passing is sending
information to another code.
Advantages (Benefits) of OOPs:
 Programs are modularized based on the principle of class and object.
 By the help of inheritance it is easy to develop complex programs.
 By the help of encapsulation it provides security for data.
 It reduces software development time.
 By the help of message passing it can communicate through other code.
 By the help of objects it will share common code to all.
Disadvantages (Limitations) of OOPs:
 It is not having set standard.
 It is difficult to draw flowchart.
 It is difficult to draw algorithm.
 It is difficult to convert real world problem into coding.
 It is overly generalised.
Applications of OOPs:
 Used in object oriented database.
 Used in artificial intelligence.
 Used in computer graphics.
 Used in CAD/ CAM Applications.
 Used in real time systems.

**********
CHAPTER – 7
Classes and Objects

Class: Class is the user defined data type. It consists of data members and member functions.
Syntax:
class class_name
{
private: data member;
member functions( );
public: data member;
member functions( );
protected: data member;
member functions( );
}obj1, obj2;

Data members: Data variables declared inside the class are data members.
Member functions: Functions declared inside the class are member functions.

Access Specifiers: These are the keywords which allow members of class to access
according to its permission.
Types:
private: This access specifiers allow members of class to access inside the class.
class class_name
{
private: data member;
member functions( );
}obj1, obj2;
public: This access specifiers allow members of class to access outside the class.
class class_name
{
public: data member;
member functions( );
}obj1, obj2;
protected: This access specifiers allow members of class to access in derived the class.
class class_name
{
protected: data member;
member functions( );
}obj1, obj2;

Note: private access specifiers are most implicitly used.


Member function can be declared inside the class or outside the class:
 Declared inside the class:
class class_name
{
private: data member;
public: member functions( )
{
..........
}
}obj1, obj2;
Example: Explained Manually.
 Declared outside the class using scope resolution operator ( : : )
class class_name
{
private: data member;
public: member functions( );
}obj1, obj2;
void class_name: : member function( )
{
..........
}
Example: Explained Manually.
Declaring and defining objects of class:
Declaration:
class class_name
{
.............
}obj1, obj2, ...., obj n;
Or
Class_name obj1,obj2,...., obj n;
Defining: We can access member of class using object and dot ( . ) operator.
obj.member=value;

Array as member of class: array can be used normally as data member of class.
Example: Explained Manually.
Array of object: instead of creating multiple objects we can create array object.
Example: Explained Manually.
Object as function arguments: object can also be sent to other function as arguments.
Example: Explained Manually.

**********
CHAPTER – 8
Function Overloading and Member Functions

Advantages / Need for Function over loading:


 It can be used to reduce different function names for similar task.
 Similar task performing function can be named same.
 It is the two or more function having same name with different number of arguments
or different types of arguments.
 It is easy to understand and debug.
 Code maintenance is easy.

Function Overloading: It is the two or more function having same name with different
number of arguments or different types of arguments.
#include<iostream.h>
#include<conio.h>
class FunOverlaoding
{
public: void area (int a, int b)
{
cout<< “Area of the rectangle is=” << a*b<<endl;
}
void area ( int a)
{
cout<< “Area of the square is=” << a*a<<endl;
}
};
void main( )
{
FunOverloading obj;
obj.area (10, 5);
obj.area (50);
getch( );
}

inline Function: It is the function with prefix inline. This reduce the code by replacing
function call with function body.
Features of inline function:
 It is function with prefix inline.
 It will reduce the code.
 Function call will be replaced with function body.
 Very efficient code.
 Should be declared before all other functions.
Example:
#include<iostream.h>
#include<conio.h>
inline int Area(int a)
{
return a*a;
}
void main ( )
{
clrscr( );
cout<< “ Area of the square=” << Area(10);
getch( );
}

friend Function: It is the non member function which can access members of class.
Features of friend function:
 It is the non member function.
 It is function with prefix friend.
 It should be declared outside the class.
 It should be defined outside the class as normal function.
 It can access members of class.

Example:
#include<iostream.h>
#include<conio.h>
class Myclass
{
private: int a;
public: void read( )
{
cout<< “ Enter the value”<<endl;
cin>>a;
}
friend void Sum(Myclass obj1, Myclass obj2);
};
void Sum(Myclass obj1, Myclass obj2)
{
cout<< “Addition is=”<<obj1.a+obj2.a;
}
void main( )
{
Myclass obj1,obj2;
obj1.read ( );
obj2.read ( );
Sum(obj1, obj2);
getch ( );
}

**********
CHAPTER – 9
Constructors and Destructors

Constructors: It is the special member function of the class which is used to assign value to
the object when it is created. Here function name and class name will be same.
Features:
 It is the special member function of class.
 It is used to assign values to object when it is created.
 Its name and class name will be same.
 It will be invoked automatically when object is created.

Types of Constructors:
1) Default Constructor.
2) Parameterised Constructor.
3) Copy Constructor.

Default Constructor: It is the constructor with no arguments. It is used to set default values
for the objects.
class_name : :class-name( )
{
........
}
Features:
 It does not have arguments.
 It will assign same values to all objects.
Example: will be explained manually.

Parameterised Constructor: It is constructor with arguments. It is used to assign different


values for different objects.
class_name : :class-name( arguments)
{
........
}

Features:
 It is having arguments.
 It will assign different values to different objects.
Example: will be explained manually.
Copy Constructor: It is the parameterised constructor by which one object is copied to
another object.
Features:
 It is used to copy one object to another object.
Example: will be explained manually.

Invoking Parameterised Constructor:


1) Explicit call
classname object=classname(values);
Value v1=Value(30,40);
2) Implicit call
classname object (values);
Value v1(30,40);
3) With = operator (When there is only 1 argument)
classname object=values;
Value v1=30;

Constructor Overloading: Depending on the arguments constructor can be overloaded.


Example: will be explained manually.

Destructor: It is used to destroy the memory allocated for the constructor. It use tilde ~
symbol.
Example: will be explained manually.

**********
CHAPTER – 10
Inheritance

Inheritance: It is the concept of reusability. Here one class will take properties from another
class.
Base class: The class whose properties are inherited by other class.
Derived class: The class that will inherit properties from another class.
BASE CLASS

DERIVED
CLASS

Advantages of Inheritance:
 Reusing existing code.
 Faster development time.
 Easy to maintain.
 Easy to extend.
 Memory utilization.
Types of Inheritance:
 Single Inheritance
 Multilevel Inheritance.
 Multiple Inheritance.
 Hierarchical Inheritance.
 Hybrid Inheritance.
Single Inheritance: It is the class derived from the single base class.
BASE CLASS FATHER

SON
DERIVED
CLASS

Multilevel Inheritance: It is the class derived from already derived class.


Base class

Derived 1

Derived 2

Derived n
Multiple Inheritance: It is the class which is derived from two or more base classes.

Base 1 Base 2 Base 3 Base n

Derived

Hierarchical Inheritance: Number of classes is derived from single base class.


BASE

BASE BASE BASE

Hybrid Inheritance: It is the combination of two or more type of inheritance.


A

B C

Program to illustrate Single level inheritance:

#include<iostream.h>
#include<conio.h>
class Base
{
protected: int regno;
char name[20];
public: void readdetails( )
{
cout<< “Enter the Reg.no. and name”<<endl;
cin>>regno>>name;
}
};
class Derived: public Base
{
private: int m1,m2,m3,total;
void readmarks( )
{
cout<< “Enter 3 subject marks”<<endl;
cin>>m1>>m2>>m3;
}
void display( )
{
int tot=m1+m2+m3;
cout<< “Reg. No=”<<regno<< “Name=”<<name<< “Total=”<<tot;
}
};

void main( )
{
Derived obj;
obj.readdetails( );
obj.readmarks( );
obj.display( );
getch( );
}

Virtual Class: During inheritance there may be chance of getting duplicate properties from
same class by different ways. To remove that redundancy we use keyword virtual.
Syntax:
class A
{
................
};
class B: virtual public A
{
................
};

class C: virtual public B


{
................
};
class D: public B, public C
{
................
};
Here class D will receive only one property from class A.

Abstract class:
An abstract class is not used to create objects. It will only act as base class.

Constructor in Inheritance:
Inheritance also supports the constructor concept
Example:
class A
{
public: A( )
{
.........
}
};
class B: public A
{
public: B( )
{
.........
}
};

**********
CHAPTER – 11
Pointers

Pointer: Pointer is the variable that holds memory address of another variable.
Advantages of Pointers:
 It is possible to write efficient program.
 Memory is utilized properly.
 Dynamically allocation and de-allocation of memory.
 Easy to deal with hardware components
 Establishes communication between program and data.

Declaration of pointer:
Syntax:
datatype *variable;
Ex:
int *ptr;

Initialization of pointer:
Syntax:
datatype *variable=&value;
Ex:
int n,*ptr;
n=50;
ptr=&n;
Address operator (&): It is the unary operator that returns memory address of the variable.
Pointer / Indirection Operator (*): It is the unary operator that returns value inside
memory address.

Simple program explained manually.

Pointer Arithmetic:
Operations can be performed:
 We can add integer value to pointer.
 We can subtract integer value from pointer.
 We can compare two pointers, if belongs to same array.
 We can subtract two pointers, if belongs to same array.
 We can assign one pointer to another pointers, if belongs to same data type.
Operation cannot be performed:
 Addition of two pointers cannot be done.
 Subtraction of two pointers when they are mot of same array.
 Multiplication of two pointers cannot be done.
 Division of two pointers cannot be done.

Array of Pointer:
It is possible to create array pointer as normal array.
Example:
int *ptr[5];
int a=10, b=20, c=30, d=40, e=50;
ptr[0]=&a;
ptr[2]=&b;
ptr[3]=&c;
ptr[4]=&d;
ptr[5]=&e;

Pointer and string:


When pointer holds address of string it only holds base address of the string.
Example:
char name[5];
char *ptr;
name= “Hello”;
ptr=name;

Pointer and structure:


We can create pointer to structure variables.
Example:
struct Student
{
int regno;
float perc;
};
Student s;
Student *ptr;
ptr=&s;
ptr - >regno=123;

Pointer and object:


We can use pointer to Object.
Example:
class Student
{
public: void read ( );
};
Student s;
Student *ptr;
ptr=&s;
ptr->read ( );

Difference between Static and Dynamic memory allocation.


Static memory allocation Dynamic memory allocation
Memory is allocated during compilation Memory is allocated during execution time.
time.
No memory allocation and De-allocation Memory binding allowed during execution.
during execution time.
Variable remains permanently allocated. Memory allocate only when program in
active.
Implemented using stacks and heaps. Implemented using data segments.

Pointer and Function:


 Pass by reference.
 Pass by pointer.
Examples Explained manually.

Dynamic Memory allocation:


 New: new pointer is used to allocate memory dynamically for object.
 Delete: delete pointer is used to de-allocate memory dynamically from the object.

This pointer: Every object has access to its own address through this pointer.

**********
CHAPTER – 12
Data File Handling

Stream in C++: A stream is sequence of bytes. A stream is a general name given to flow
of data.
 Input Stream: The stream that supplies data to the program is known as input
stream.
 Output Stream: The stream that receives data from the program is
known as output stream.

Classes for file stream operation:

Class Meanin
gs
ifstream It supports input operations. It contains open( ) with default input
mode and inherits get( ), getline( ), read( ), seekg( ) and tellg( )
functions from istream.
ofstream It supports output operations. It contains open( ) with default output
mode and inherits put( ), write( ), seekp( ) and tellp( ) functions from
ostream
fstream It supports simultaneous input and output operations.

Types of data Files:


 Text Files:
 A text file is a file that stores the information in ASCII characters.
 Each line of text is terminated by a special character, known as End of Line (EOL)
or delimiter.
 Binary Files:
 A binary file is a file that contains information in the same format as it is held in
memory.
 In binary files, no delimiters are used for a line and no translations occur here.
Opening and Closing of Files:
A file must first be opened before data can be read from it or written to it.
o Opening file using constructor.
o Opening file using open ( ) member function.
Opening files using Constructors:
In order to access a file, it has to be opened either in read, write or append mode.
Syntax:
streamclass_name objectname (“filename”);
Example:
ofstream fout(“results.dat”);
ifstream fin(“results.dat”);
Opening files using open( ):
open ( ) can be used to open multiple files that use the same stream object.
Syntax:
straemclass_name objectname;
objectname.open (“file name”);
Example:
fout.open(“results.dat”);
fin.open(“results.dat”);

File Modes:
While using constructors or open( ), the files were created or opened in the default mode.
Syntax: object.open(“filename”, mode);
Example: fout.open(“data”, ios::app) // This opens the file data in the append mode.
The lists of file modes are:
Mode method Meaning
ios::app append to end of the file at opening time
ios::in open file for reading
ios::out open file for writing
open file for updating and move the file pointer to the
ios::ate
end of file
ios::trunc on opening, delete the contents of file
ios::binary opening a binary file.

Closing File:
The member function close( ) on its execution removes the linkage between the file
and the streamobject.
Syntax: object.close( );
Example: fout.close( );
fin.close( );
Input and output operation in text file:
o put( ) function
o get( ) function
 put ( ):
The put( ) member function belongs to the class ofstream and writes single
character to the associated stream.
Syntax: object.put(ch); // where ch is the character variable.
Example: char ch=’A’;
ofstream fout(“text.txt”);
fout.put (ch);
 get( ):
The get( ) member function belong to the class ifstream and reads a single
character from the associated stream.
Syntax: object.get (ch); // where ch is the character variable.
Example: char ch;
ifstream fin(“text.txt”);
fin.get (ch);
 getline( ):
It is used to read a whole line of text. It belongs to the class ifstream.
Syntax: fin.getline(ch, size)
Example:
char ch[50];
ifstream fin;
fin.getline (ch, 50);

Input and output operation in binary file:


o write ( ) member function.
o read ( ) member function

 write ( ):
The write ( ) member function belongs to the class ofstream and which is used to
write binary data to a file.
Syntax: object.write((char *) & variable, sizeof(variable));
Example: Student s;
fout(“std.dat”, ios::binary);
fout.write((char *) &s, sizeof(s));
 read ( ):
The read ( ) member function belongs to the class ifstream and which is used to
read binary data from a file.
Syntax: object.read((char *) & variable, sizeof(variable));
Example: student s;
fin(“std.dat”, ios::binary)
fin.write((char *) &s, sizeof(s));

Detecting End of file:


Detecting end of file is necessary for preventing any further attempt to read data from the
file.
eof( ) is a member function of ios class.
Example:
ifstream fin;
if(fin.eof( )==0)
{
statements;
}

Functions for manipulation of file pointers:


To move file pointers to any desired position inside a file, file stream classes support
the following functions.
 seekg() - Moves get file pointer to a specific location
 seekp() - Moves put file pointer to a specific location
 tellg() - Returns the current position of the get pointer
 tellp() - Returns the current position of the put pointer
 The seekp() and tellp() are member functions of ofstream
 The seekg() and tellg() are member functions of ifstream.
 All four functions are available in the class fstream.

**********
CHAPTER – 13
Database Concepts

Data: It is unprocessed raw items. Like- 16, computer, 3000rs, 20 units.


Information: It is computer processed data. Data will be combined and processed as
information.
Database: Database is the collection of logically related data in such a way that it should be
easy available to access.

Applications of Database:
 Banking: For customer information, accounts and loans, and banking transactions.
 Colleges: For student information, course registrations and grades.
 Credit card transactions: For purchases on credit cards and generation of
monthly statements.
 Finance: For storing information about holdings, sales and purchases of financial
instruments such as stocks and bonds.
 Sales: For customer, product, and purchase information.
 Telecommunication: For keeping records of call made, generating monthly bills,
maintaining balance on prepaid calling cards, and storing information about the
communication networks.
 Aadhar database: This is the biggest database storing a data about 60 million
people residing in India.
Difference between Manual and Computerised data processing.
Manual Data Processing Computerized Data Processing
The volume of data, which can be The volume of data, which can be
processed is limited. processed is large
Requires large quantity of paper Requires less quantity of paper
Speed and accuracy is limited Faster and Accurate
Labor cost is high Labor cost is low
Storage medium is paper. Storage medium is Hard disk etc…

Data Processing Cycle:


 Data Collection: It is the process of
gathering data from various sources
 Data Input: The raw data is put into the
computer using a keyboard, mouse etc…
 Data Processing: Processing is the series
of actions or operations on the input data
to generate outputs.
 Data storage: Data and information should be stored in memory so that it can be
accessed later.
 Output: The result obtained after processing the data.
 Communication: Computers communication with other device by wire or wireless
medium.
Terms used in Database:
Table: Tables is a collection of data elements in the form of rows and columns.
Field / Attribute: Each column in the database is identified with distinct name that is Field ?
Attribute.
Record / Tuple: Each row or the single entry in the database is record / tuple.
Entity: Entity is the object such as table or form.
Instance: The data present in the database at particular moment is instance.
Domain: It is the set off allowed values for the attributes is domain.
Data mining: It is picking of required data from the database by analysing.

Advantages of Database:
 Redundancy can be minimized or controlled: In DBMS environment if
redundancy is present, then it can be controlled by propagating updates in all the
places where ever redundant data is present.
 Data Integrity: Data Integrity refers to the correctness of the data in the
database.
 Data Sharing: In DBMS, data is stored in the centralized data base and all the
permitted users can access the same piece of information required at the same
time.
 Database Security: DBMS provides a variety of security mechanisms for the
user to protect his or her data stored in the database.
 Supports Concurrent access: DBMS supports concurrent access to the same
data stored in the database by applying locking and time stamp mechanisms.

Data Abstraction:
A major purpose of a database system is to provide users with an abstract view of the
data. That is the system hides certain details of how the data are stored and maintained.
There are three level of data abstraction.
o Physical Level (Internal level)
o Conceptual Level (Logical level)
o View Level (External level)
 Physical Level:
It is the lowest level of abstraction that
describes how the data are actually stored.
 ConceptualLevel:
It is the next higher level of abstraction that
describes what data are stored in the database and what relationships exist among
those data.
 View Level:
It is the highest level of abstraction that describes only part of the entire database.

Users of DBMS:
 End Users (Database Users)
Database users are those who interact with the database in order to query and
update the database, and generate reports.
 System Analysts
System analysts determine the requirement of end users to create a solution for
their business need and focus on non-technical and technical aspects.
 Application programmers
These are the computer professionals who implement the specifications given by
the system analysts and develop the application programs.
 Database Administrators (DBA)
DBA is a person who has central control over both data and application.

Data Independency:
The capacity to change data at one layer does not affect the data at another layer is called
data independence.
Two types of data independence are:
 Physical Data Independence
 Logical Data Independence

Physical data independence:


It is the capacity to change the internal level without having to change either the
schemas at the conceptual or external level.
The physical data independence is:
 File Organization
 Database Architecture
 Database Models
File Organization:
 Serial File Organization:
Organization is continuous and simple.
 Direct Access File Organization
The type of storage device used is comparatively expensive. It is less efficient in the
usage of storage space compared to the sequential organization.
DBMS Architecture:
 The design of Database Management System highly depends on its architecture.
 It can be centralized or decentralized or hierarchical.
Database architecture is logically divided into three types.
 Logical one-tier Architecture
 Logical two-tier Client/Server Architecture.
 Logical three-tier Client/Server Architecture.
Logical one-tier Architecture:
DBMS is the only entity where user directly sits on DBMS
and uses it. Any changes done here will directly be on
DBMS itself. It does not provide handy tools for end users
and preferably database designers and programmers use
single tier architecture.
Two-tier Client/Server Architecture:
Two-tier Client/Server architecture is used for User
Interface program and Application Programs that runs on
client side.
An interface called ODBC (Open Database Connectivity)
provides an API that allows client side program to call the
DBMS.
Three-tier Client/Server Architecture:
Three-tier Client / Server database architecture is
commonly used architecture for web applications.
Intermediate layer called Application server or Web
Server stores the web connectivity software and the
business logic (constraints) part of application used to
access the right amount of data from the database server.
This layer acts like medium for sending partially
processed data between the database server and the client.

Database Models:
Data model is a collection of conceptual tools for describing data, data relationship, data
semantics and constraints.
 Hierarchical Model
 Network Model
 Relational Model
Hierarchical data model:
The Hierarchical data model organizes data
in a tree structure. In this data model, data is
represented by a collection of records and
the relationships are represented by links.
Network data model:
In1971, the Conference on Data
Systems Languages (CODASYL)
formally defined the network models.
In this model, data is represented by a
collection of records and the
relationships are represented by links.
Each record is collection of fields, which contains only one data value. A link is an
association between two records. In the network model, entities are organized in a graph, in
which some entities can be accessed through several paths.

Relation Data Model:


The relation data model was developed by E.F Codd in 1970.
Unlike, hierarchical and network model, there are no physical links.
All data is maintained in the form of tables consisting of rows and columns.
Each row (record) represents an entity and a column (field) represents an attribute of the
entity.

Normalization Rule:
It is the process of removing redundancy in the database. The rules are as bellow:
First normal form (1NF): Each row must have unique value.
Second normal form (2NF): Should follow 1NF and no partial dependency.
Third normal form (3NF): Should follow 2NF and no transitive dependency.
Boyce and Codd normal form (BCNF): Higher version of 3NF deals with multiple
overlapping.

Entity Relation Diagram:


ER-Diagram is a visual representation of data that describes how data is related to each
other.
Entity: ENTITY
An Entity can be any object, place, person or class. In E-R Diagram, an entity is represented
using rectangles.
Attribute
Attribute:
An Attribute describes a property or characteristic of an entity. Attributes are represented by
means of eclipses.
Relationship
Relationship:
A Relationship type is a meaningful association between entity types. Relationship is
represented using diamond shaped box.

There are three types of relationship that exist between entities.


 Binary Relationship
 Recursive Relationship
 Ternary Relationship
Binary Relationship:
 One to One Relation
1 RELATION 1
STUDENT COURSE
SHIP

 One to Many Relation


1 RELATION N
COURSE STUDENT
SHIP

 Many to Many Relation

N RELATION N
STUDENT TEACHER
SHIP

Keys used in database:


The different types of keys are:
Primary key:
Primary key column should not be null and should be unique.
Candidate Key:
When more than one or group of attributes serve as a unique identifier, they are each
called as candidate key.
Alternate Key:
The alternate keys are those candidate keys which are not currently selected as the
primary key. This is also known as secondary key.

Foreign Key:
A key used to link two tables together is called a foreign key.
Generalization:
In generalization, a number of entities are brought together
into one generalized entity based on their similar
characteristics.
Example: pigeon, house sparrow, crow and dove can all be
generalized as Birds.
Specification:
Specialization is the opposite of generalization.
In specialization, a group of entities is divided into sub-groups
based on their characteristics.

Relation algebra:
Relational algebra is a procedural query language that consists of a set of operations that
take one or more relations as input and result into a new relation as an output.
Cartesian product:
It is a binary operation, and it is denoted by the symbol x.
The Cartesian product of two relations R and S, denoted by R x S, defines a new relation,
which is the concatenation of each tuple of relation R with each tuple of relation S.

Data Warehouse:
Data warehouse is the organization which will store electrical data.
The components of data warehouse:
Data Source
Data Transformation
Reporting
Metadata

**********
CHAPTER – 14
SQL Commands

SQL:
SQL is Structured Query Language, which is a computer language for storing,
manipulating and retrieving data stored in relational database.
All relational database management systems like MySQL, MS Access, and Oracle,
Sybase, Informix, and SQL Server use SQL as standard database language.

SQL Commands:
DDL -Data Definition Language: It gives link between logical and physical structure of
SQL. Mainly deals with the commands related to complete table.
 Few of the basic commands for DDL are:
Command Description
CREATE Used to create table, view or other objects.
ALTER Used to modify table, view or other objects.
DROP Used to deletes table, view or other objects.

DML - Data Manipulation Language: It provides data manipulation concept. Mainly deals
with rows of DBMS.
 Few of the basic commands for DML are:

Command Description
SELECT Retrieves certain records from one or more tables
INSERT Creates a record
UPDATE Modifies records
DELETE Deletes records

DCL – Data Control Language: It provides security to the database.


 Few of the basic commands for DCL are:
Command Description
GRANT Gives a permission to user
REVOKE Takes back permission granted to user

TCL – Transaction Control Language: It controls transactions in database.


 Few of the basic commands for TCL are:
Command Description
COMMIT Make all the changes made by the statements issued permanent.
ROLLBACK Undoes all changes since the beginning of transaction or
since a save point.
Data Types in SQL:
NUMBER: Used to store a numeric value in a field column. It may be decimal, integer or
real value.
Syntax: NUMBER (n, d)
Example: marks NUMBER(3), average NUMBER(2, 3)

CHAR: Used to store a character type data in a column.


General syntax: CHAR (size)
Example: name CHAR(15)

VARCHAR/VARCHAR2: It is used to store variable length alphanumeric data.


General syntax: VARCHAR (size) / VARCHAR2 (size)
Example: address VARCHAR2(50)

DATE: It is used to store date in columns.


Example: dob DATE

TIME: It is used to store time in columns.


Example: arrival TIME

LONG: It is used to store variable length strings of up to 2GB size.


Example: description LONG

Operators in SQL:
 Arithmetic Operator: (+, -, *, /, %)
Operator Description Example( a=10, b=20)
+ Adds two operand a + b = 30
- Subtracts second operand from the first a - b = -10
* Multiply both operand a * b = 200
/ Divide numerator by denominators b/a=2
Modulus operators and remainder of after an
% b%a=0
integer division

 Relational Operator: (==, <=, <, >, >=, !=)


Operator Description Example (a=10, b=5)
Checks if the value of left operand is less than the
< a < b returns false(0)
value of right operand
Checks if the value of left operand is less than or equal
<= a <= b returns false(0)
to the value of right operand
Checks if the value of left operand is greater than the
> a > b returns true(1)
value of right operand
Checks if the value of left operand is greater than or
>= a >= b returns false(0)
equal to the value of right operand
== Checks if the value of two operands is equal or not a = = b returns false(0)
!= Checks if the value of two operands is equal or not a != b returns true(1)

 Logical Operator: (AND, OR, NOT, ALL, ANY etc…)


Operator Description
ALL The ALL operator is used to compare a value to all values in another
value set.
AND The AND operator allows the existence of multiple conditions
in an SQL
ANY The ANY operator is used to compare a value to any applicable
value in the list according to the condition.
BETWEE The BETWEEN operator is used to search for values that are
N within a set of values, given the minimum value and the maximum
value.
EXISTS The EXISTS operator is used to search for the presence of a row
in a specified table that meets certain criteria.
LIKE The LIKE operator is used to compare a value to similar values
using wildcard operators.

Implementation of SQL Commands:


Create: Is used to create table, view or any other object of SQL.
Syntax:
Create table table_name (column1 data type, column2 data type, ...);
Example:
Create table Student (regno number (5), Name varchar (20));

Alter: Is used to modify the table, view or other objects.


Syntax:
Alter table table_name Add (column3 data type, column4 data type,...);
Alter table table_name Modify (column3 data type, column4 data type,...);
Alter table table_name Drop (column3, column4,...);
Example:
Alter table table_name Add (Perc number(5,2));
Alter table table_name Modify (Perc number(6,2));
Alter table table_name Drop (Perc);
Drop: Is used to delete table, view or any other object.
Syntax:
Drop table_name;
Example:
Drop Student;

Insert: Is used to insert record into table.


Method 1:
Syntax:
Insert into table_name values (value1, value 2, ....);
Example:
Insert into Student values (123, “ABC”, 98.24);
Method 2:
Syntax:
Insert into table_name (column1, column2,..) values (value1, value 2, ....);
Example:
Insert into Student (regno, name) values (234, “XYZ”);

Select: Is used to retrieve record from the table.


Syntax:
Select column1, column2, from table_name;
Example:
Select regno,name from Student;
Select * from Student;

Update: Is used to change records from the table.


Syntax:
Update table_name Set column=value where condition;
Example:
Update Student Set perc=78.34 where regno=234;

Delete: Is used to delete record from the table.


Syntax:
Delete table_name Where condition;
Example:
Delete Student Where regno=234;
Distinct: This is used along with SELECT statement to remove duplicate values
and display unique values.
Syntax:
Select distinct column from table_name;
Example:
Select distinct combination from student;

Where: This is used to apply condition for the statement.


Syntax:
Select column from table_name Where condition;
Example:
Select * from Student Where per>85;

Order By: This is used to arrange the data in specific order.


Syntax:
Select * from table_name Order By column ASC/DESC;
Example:
Select * from Student Order By per DESC;

Group By: This is used to arrange similar data together.


Syntax:
Select * from table_name Group By column;
Example:
Selcet * from Student Group By combination;

And: This is used to check all the conditions are true.


Syntax:
Select * from table_name Where condition1 AND condition2;
Example:
Select * from Student Where per>85 AND fees>20000;

OR: This is used to check any one of the conditions is true.


Syntax:
Select * from table_name Where condition1 OR condition2;
Example:
Select * from Student Where per>85 OR fees>20000;
Functions of SQL:
Type:
 Group Functions: Function that acts on group of values.
Function Description
AVG Returns average value of “N”, ignoring NULL values
Returns the number of rows in the table including duplicates and those with
COUNT(*) NULL values
MIN Returns minimum value of “expr”
MAX Returns maximum value of “expr”
SUM Returns sum of values “N”

 Scalar Functions: Function that acts on one value.


Function Descripti
on
Numeric Work with numbers.
Functions Examples: ABS, POWER, ROUND, SQRT
String Work with character based data.
Functions Examples: LOWER, UPPER, SUBSTR, LENGTH, LTRIM,
RTRIM
Date Work with Date data types.
Functions Example: ADD_MONTHS, LAST_DAY, MONTHS_BETWEEN,
NEXT_DAY
Conversion These functions are used to convert one type of data to another.
Functions Example: TO_NUMBER, TO_CHAR, TO_DATE

Constraints:
Constraints are the rules for the column.
Constraints Description
NOT NULL Ensures that a column cannot have NULL value.
UNIQUE Ensures that all values in column are different and unique.
PRIMARY KEY Ensures that all values in column are unique and not null.
FOREIGN KEY Used to combine two tables.
DEFAULT Provides a default value for a column when none is specified
CHECK Ensures that all values in a column satisfy certain condition.
Join in SQL:
It is used to fetch data from two or more tables by joining them.
SQL Join Types:
 INNER JOIN: returns rows when there is a match in both tables.
 LEFT JOIN: returns all rows from the left table, even if there are no matches
in the right table.
 RIGHT JOIN: returns all rows from the right table, even if there are no matches
in the left table.
 FULL JOIN: returns rows when there is a match in one of the tables.
 SELF JOIN: is used to join a table to itself as if the table were two tables.
 CARTESIAN JOIN: returns the Cartesian product of the sets of records from
the two or more tables.

**********
CHAPTER – 15
Networking Concept

Network: It is an inter connection of autonomous computer. Where two computer can


exchange information but cannot control each other.

Network goals:
 Resource sharing: Data should be available to anyone on the network.
 Reliability: Can have multiple copies of data for safety.
 Cost factor: Network should be available is lesser price.
 Communication Medium: Communication should be speed.

Need of Networking:
 File sharing over the network.
 Print sharing.
 Email tools for communication.
 Remote access.
 Sharing the data base to multiple users.

ARPANT: Advanced Research Project Agency Network. World’s first operational packet
switching network.

OSI Reference Model (Open System Interconnection):

Application  Application layer: It contains protocol to user like HTTP


 Presentation layer: It deals with syntax and semantics of
Presentation
information.
 Session layer: It allows user to create session between them to
Session
process.
Transport  Transport layer: It will split data into smaller unit if needed
and moves correctly.
Network
 Network layer: It will determine how packets are routed from
source to destination.
Data link
 Data link layer: It will remove transmission errors and supplies
Physical raw data to network layer.
 Physical layer: It transmits raw data over communication
channel.
Hardware Components of network / Elementary Terminology of network:
 Node: It refers to the computer attached to network to transfer data. There is no
network without node.
 Server:
 Non-dedicated Server: small network server also called peer-to-peer network.
 Dedicated server: Bigger networking server also called master slave network.

Types of Network:
 LAN: Local Area Network. It is small computer with in a small range with high speed
data transfer and very low error rate.
 MAN: Metropolitan Area Network. Here network spread over city. Example TV
cable.
 WAN: Wide Area Network. Here network spread across countries with slow data
transfer and comparatively higher error.

Difference between LAN & WAN:


LAN WAN
Range within kilometre Rang in entire countries.
Fast data rate Slow data rate
Complete ownership by single Owned by multiple organization.
organization.
Very low error rate High error rate

Networking Topologies:
1) Bus Topology
2) Ring Topology
3) Star Topology
4) Tree Topology
5) Mesh Topology
Bus Topology: Here there will be single path connection between all systems.
Advantages:
 Single data path connecting all networks.
 Short cable length.
 Simple wiring layout.
 Less cost
 Easy to maintain.
 Easy to extend.

Disadvantages:
 Data & Network control is not centralised.
 Fault detection is not simple.
 Nodes are not intelligent.
 Repeating configuration.

Ring / Circular Topology: Here there will be single path connection between all systems
and last node again connected to server in circular way.

Advantages and disadvantages same as Bus topology. (Copy & paste)

Star Topology: Here all the systems are connected directly to server. It is easy for service
and one device per connection
Tree Topology: This is the combination of various topology and in the form of tree.

Mesh Topology: Here each node is connected to every node.

Transmission Medium:
Twisted pair cable: In this wire comes in pair and those will be twisted.
Advantages:
 Simple & Physically flexible
 Can be easily connected
 Easy to install & maintain
Disadvantages:
 Low bandwidth
 Short distance
 1mbps to 10mbps flow

Types:
1) UTP: Unshielded Twisted Pair
2) STP: Shielded Twisted Pair. Here pair will be covered with shield.
Optical fibre: It carries light from one end to another end.

Radio wave: Radio waves consist of transmitter and receiver normally used in TV sets.

Satellite microwave: These are mainly depending on the frequency and wavelength. Mainly
used in internet.

Infrared: It uses infrared lights to send data. These light cannot propagate through a wall.

Laser: It is much faster than microwaves and travel in straight line.

Switching Technique:
 Circuit switching: Computers are connected through the physical copper path with
telephone call.
 Message switching: This is also called as store and forward. Here message will pass
from one switching office to another switching office until it reaches destination.
 Packet switching: This is same as message switching with fixed size of packets of
message.

Communication mode:
 Simple: In this panel there is only one interface that is transmitter and all other
interfaces are receivers.
 Half duplex: In this panel each interface works as both transmitter and receiver but
only one can transmit at a time.
 Full duplex: In this panel each interface works as both transmitter and receiver and all
can transmit at a time.

Network devices:
Modem: Modulator and Demodulator. It connects computer to reach global internet.

Ethernet card: It is the LAN cable to connect to devices and data transfer speed is 10mbps.
To install this cable computer have Ethernet card.
Hub: A device used to connect different computer together.
 Active hub: Amplify the signal.
 Passive hub: Sends without any changes.

Switch: It filters data and transfers to specific way.

Repeater: It amplifies the signal being transmitted to reach maximum distance.

Bridge: It links to networks and smart to know where data has to transfer.

Router: It works like bridge and handle different protocols.

Gateway: It is the device that connects dissimilar network.

Some wireless & Mobile computing devices:


GSM: Global System for Mobile which uses SIM.
SIM: Subscriber Identity Module.
TDMA: Time Division Multiple Access.
CDMA: Code Division Multiple Access.
GPRS: General Pocket Radio Service.
WLL: Wireless in Local Loop.
EDGE: Enhanced Data Rate for Global Evolution.

Applications in Networking:
 SMS: Short Message Service.
 Chat: Video chat / Text chat.
 WiFi: Wireless Fidelity.
 Network security.

Type of Protection Method:


 Authorization: It checks the granted access is provided or not.
 Authentication: It is a password protection. User need enter proper password to
access data.
 Encrypted smart card: Encrypted smart card generate new password every time to
access data.
 Bio metric system: It is most secured which reads figure prints, retina pattern, etc...
 Fire wall: It prevents unauthorised access.

Cookies: This is the message to keep track the user’s activity on specific website.
Hacker: Who gains knowledge about computer system and use this to play a prank.
Crackers: They are the programmers who break into secured systems.
VIRUS: Vital Information Resource Under Siege.
It is an auto installing software. It can spread from one computer to another.
Types:
 File infectors: It infects the executable files.
 Boot sector: It install to booting software and tracks hard drive.
 Macro virus: It infects the data files like DBMS, ESS.
 Network virus: It spread from network like email.

Some type of protocol:


 HTTP: Hyper Text Transfer Protocol.
 FTP: File Transfer Protocol.
 SLIP: Serial Line Internet Protocol.
 PPP: Point to Point Protocol.

**********
CHAPTER – 16
Internet and Open Source Concepts

OSS: Open Source Software. It is software which is available to customers and they can
modify without limitations.

FLOSS: Free Libre & Open Source Software. These are freely available OSS.

GNU: GNU’s Not Unix. This started organization to provide software free of cost.

FSF: Free Software Foundation. It is non-profit organization which supports free software.

OSI: Open Source Initiative. It is the organization which supports free software.

W3C: World Wide Web Consortium. This provides common protocol.

Proprietary Software: Software which are neither open nor freely available.

Freeware: Software which are available for free of cost.

Shareware: Software which can be redistributed as other copies.

WWW: World Wide Web is the set of protocol that allows to access any document on the
net.

Telnet: It is the older Internet Utility that allows to log on to remote Computer System.

Web Browser: These are the WWW server that responds to the requests made by web
browser.

Webpage: The documents exist in the website are called webpage.

URL: Uniform Recourse Locator is the unique address for the website.
Type: //address/path
Ex: http://www.srpef.com/home

Some Domain ID are:


Commercial: .com India: .in
Education: .edu Australia: .au
Government: .gov United Kingdom: .uk
Military: .mil
E – Commerce: Electronic Commerce. It is the trade of goods and services with the help of
telecommunication and Computer.

Some technologies & Service in E-Commerce:


 Electronic Data interchange (EDI)
 E-mail
 Electronic Found Transfer (EFT)
 Electronic Benefit Transfer (EBT)
 Electronic forms
 Digital Cash (DC)
 Electronic Banking
 Bar coding, Voice recognition...
 Security, Fire wall.

Types of E-Commerce:
1) Business – to – Business (B2B): The exchange of services, information, products from
one business to another business.
2) Business – to – Consumers (B2C): The exchange of services, information, products
from one business to consumers.
3) Consumers – to – Business (C2B): Customers directly contact with business venders
and selects.
4) Consumers – to – Consumers (C2C): Customers will sell his goods, service, and
information to another costumer.

**********
CHAPTER – 17
Web Designing

HTML: Hyper Text Mark-up Language. It is the mother tongue of web page.

Structure of HTML:
<HTML> HTML starts.
<HEAD> Heading section stars.
<TITLE> ........</TITLE> Title of Webpage.
</HEAD> Heading ends.

<BODY> Body section starts.


...............
...............
</BODY> Body section ends.
</HTML> HTML ends.

Tags used in HTML:


Text related:
<B> ......</B> It will bold text
<I> ........</I> It will italic text
<U>.......</U> It will underline text

<H1>....<H1>
<H2>....<H2>
<H6>.....<H6> It is used as heading text.

<FONT SIZE= “.” FACE= “.” COLOR= “.”>...</FONT> To set font effects.

<OL type= “.” Start= “.”>


<LI>TEXT</LI>
<LI>TEXT</LI> It is used for listing items.
</OL>

<A>.......</A> It will do attachment (link)


<IMG width= “.” Height= “.”> It will insert image
<CENTER> It will align center
<BR> It will break the line.
<BODY gackground= “path”> to set body back ground image.
Table: To insert table
<TABLE>
<TR>
<TH>......</TH>
<TH>......</TH>
</TR>
<TR>
<TD>......</TD>
<TD>......</TD>
</TR>

Form: To insert form


<FORM NAME= “.” ACTION= “.”>
<INPUT TYPE= “.” VALUE= “.”>
</FORM>

Web Hosting:
Web hosting is hosting the web server application to internet so that it will be available to all
clients.

Types:
 Free Hosting: This type of hosting is freely available to use for particular time.
 Virtual / Shared Hosting: This type of hosting is provided under other domain.
 Dedicated Hosting: This type of hosting if for large, high traffic sites along with
special needs such as e-commerce or security.
 Co-location Hosting: This type of hosting will actually owns the server on which its
site is hosted. In this company will be responsible for all server administration.

XML: Extended Mark-up Language.


These documents containing structured information these will have several rules and
document will be well formed. Here every tag will be having closing tags.

DHTML: Dynamic HTML


In this type of webpage content will be changing each time depending on geographic
location, time, etc...
Feature of DHTML:
 An object oriented view of a web page.
 Cascading style sheet & layout content.
 Programming that can address most page elements.
 Dynamic font.
Web Scripting:
The process of creating and embedding scripts in to a web page is called web scripting.
(Scripts are the list of commands)
Types of scripting:
 Client side scripting: All the task will be performed by the client side so, This is
browser dependent.
Ex:
 To get data from user.
 Online gaming.
 Customizing the display.
 Sever side Scripting: All the task will be performed by the server side so, this is
browser independent.
Ex:
 Password protection.
 Form processing.
 Browser customizing.

**********

You might also like