IIPU ComputerScience StudyMaterial
IIPU ComputerScience StudyMaterial
STUDY MATERIAL
Chapter 1
CONFIGURING A COMPUTER
MOTHERBOARD :
The main circuit board containing almost all the components of computers.
Characteristics of motherboard :
1) Form factor. 2) Chip set 3) Processor socket
Form factor: Refers to the motherboards geometry, dimensions, arrangement and electrical requirements.
Chip set : It controls and co-ordinates data transfer between various components of the computer.
Processor socket : It may be a rectangular or square shaped connector into which the processor mounted
vertically.
Types of motherboard :
1. XT 2. AT 3. ATX
1. XT : Extended Technology : IBM 1983, Old model processors, RAM slot DIMM, industrial standard
architecture.
Eg: Pentium 1, Pentium MMX, Pentium 2.
2. AT : Advanced Technology : IBM 1984, PGA (pin grid array)Socket, SDRAM Slot, PCI slot.
Eg: Pentium 3 processor.
3. ATX : Advanced Extended Technology :INTEL 1986, latest motherboard MPGA Processor, DDRRAM slot,
PCI, AGP slots.
Eg: Pentium 4, dual core, core2duo, i3,i5,i7…
Motherboard chipset:
1> North Bridge. 2> south Bridge.
North Bridge (Host bridge) :- The north bridge connects directly to the processor through the front side bus. A
memory controller is located in north bridge which gives CPU fast access to memory. AGP, PCI, ……
South bridge: The south bridge is slower than the north bridge USB, IDE, Net card, Sound card, hard disk
connections.
Components of motherboard :
1. Processor slot or CPU socket. 2. BIOS 3. CMOS Battery 4. Disk controller. 5. I/O ports. 6.Expansion slots.
7. Bus.
1. Processor slot or CPU socket : The socket where processor can be connected.
Processor : The clock speed of CPU is defined as the frequency with which a processor executes the
processed data.
Microprocessor :An integrated circuit on a single chip that makes up computer CPU.
2. BIOS : Basic Input Output System : A set of computer instructions which control input and output
operations.
3. CMOS : Complementary Metal Oxide Semiconductor: This battery supply the board small amount of power
to store set up parameters like date, time, password,
4. Disk controller : It is the circuit which enables the CPU to communicate with a hard disk, floppy disk or other
kind of disk drives
a. FDD. b. HDD.
5. I/O Ports and interfaces : It is a socket used to connect external devices to the computer.
a. Serial port b. Parallel port c. SCSI
d. Game port e. USB f. PS2
e. Ethernet h. MIDI
Serial port : This port transfers data serially 1 bit at a time, it is also called as RS 232 C port. Eg. Mouse,
Modem.
Parallel port : This port carries 8bit of data on a parallel path at a time. It is also called as LPT1 port or
printer port.
SCSI : Small Computer System Interface : It is used to transfer data very fast, generally high performance
hard disks uses this interface.
Game port : It is used to connect gaming devices like joystick.
USB : Universal Serial Bus : It is a plug n play interface between a computer and add on devices such as
audio players, joystick etc.
USB supports 12mbps data speed and 127 devices can be connected.
PS2 : Developed by IBM to interface, Keyboard, Mouse, Track ball, Touch pads.
Ethernet : This port connects to a network and high speed internet. Data travels at 10 MBPS to 1000
MBPS.
MIDI: Musical Instrument Digital Interface : Transmits information between electronic musical
instruments.
DVI :Digital Video Interface
6) Expansion slots :
1) ISA 2) PCI 3) AGP
1) ISA : Industrial standard architecture: It is 16 bit bus was introduced by IBM. It is a non plug n play port.
2) PCI : Peripheral Component Inter Connect: It is plug n play port with 32 bit bus. That is also available in 64 bit
bus.
3) AGP : Accelerated Graphics Port: It is an advanced port to enhance the video clarity.
7) Bus : It is a collection of wires which carries electronics signal from one component to another.
1) System bus (Internal bus) 2) Local bus (external bus)
1) System bus or Internal bus:
1) Address bus 2) Data bus 3) Control bus
Address bus : It connects CPU and RAM with set of lines of wires.
Data bus : It provides a path to transfer a data between CPU and memory.
Control bus : It is used by the processor to control access of data and address lines.
Local bus : ISA, PCI, AGP (Expansion slots)
Memory : Information storage device: a)Primary memory b) Secondary memory
I Primary memory : It is a main memory or temporary memory or Internal memory.
1) RAM 2) ROM
1) Random Access Memory : It is a read and write memory, stores information until power supply is on. It is a
volatile memory.
a) Static RAM
b) Dynamic RAM
a) SDRAM : Synchronous Dynamic RAM
b) DDRRAM : Dual data rate RAM
ROM : Read Only Memory: It is non volatile memory used to set environment for a system to perform its operations.
a) PROM b) EPROM c) EEPROM
Disk controllers : It is the circuit that enables the CPU to communicate with Hard disk , Floppy disk…
Registers : High speed temporary storage area.
Cache Memory:
Memory
Registers L1 L2 Disk
cac ca
he
It is a small very fast memory used tochstore most recently performed data.
1) L1 cache 2) Le2 cache 3) L3 cache
L1 is located in CPU
L2 is located in memory
L3cache : Located on the mother board. It is used to improve the performance of L1 and L2 .
It is capacity up to 6 MB.
SMPS : Switch Mode Power Supply : It transfer power from source (mains) to the computer. Computer system
requires around 300 w to 500 watts of power supply.
******
Chapter-2
BOOLEAN ALGEBRA
Introduction:
An algebra that deals with binary number system is called “BooleanAlgebra”.
It is very power in designing logic circuits used by the processor of computersystem.
The logic gates are the building blocks of all the circuit in acomputer.
Boolean algebra derives its name from the mathematician George Boole (1815-1864) who is
considered the “Father of symboliclogic”.
Boolean algebra deals with truth table TRUE andFALSE.
It is also called as “SwitchingAlgebra”.
The variables which can store the truth values are called logical variables or binary valued variables.
These can store one of the two values 1 or0.
The decision which results into either YES (TRUE or 1) or NO (FALSE or 0) is called Binary decision.
Truth Table:
A truth table is a mathematical table used in logic to computer functional values of logical
expressions.
A truth table is a table whose columns are statements and whose rows are possiblescenarios.
Example: Consider the logicalexpression
Y = AAND B(Logical Variables: Y, A, B, Logical OperatorAND)
A B Y=A.B
0 0 0
0 1 0
1 0 0
1 1 1
If result of any logical statement or expression is always TRUE or 1, it is called Tautologyand if the
result is always FALSE or 0, it is called Fallacy.
Logical Operators:
There are three logical operator, NOT, OR andAND.
These operators are now used in computer construction known as switchingcircuits.
NOTOperator:
The Not operator is a unary operator. This operator operates on singlevariable.
The operation performed by NOT operator is calledcomplementation/negation.
The symbol we use for it isbar.
𝐗means complementation ofX
IfX=1,X=0 If X=0,X=1
The Truth table for the NOT operatoris:
X ̅
X
1 0
0 1
OROperator:
The OR operator is a binary operator. This operator operates on twovariables.
The operation performed by OR operator is called logicaladdition.
The symbol we use for it is‘+’.
Example: X + Y can be read as X ORY
The Truth table and the Venn diagram for the OR operatoris:
X Y X+Y
0 0 0
0 1 1
1 0 1
1 1 1
ANDOperator:
The AND operator is a binary operator. This operator operates on twovariables.
The operation performed by AND operator is called logicalmultiplication.
The symbol we use for it is‘.’.
Example: X.Y can be read as X ANDY
The Truth table for the AND operatoris:
X Y X .Y
0 0 0
0 1 0
1 0 0
1 1 1
BooleanPostulates:
The fundamental laws of Boolean algebra are called as the postulates of Booleanalgebra.
These postulates for Boolean algebra originate from the three basic logic functions AND, OR andNOT.
Properties of 0 and 1:
I. If X ≠ 0 then X = 1, and If X ≠1 then X =0
II. OR relation ( Logical Addition)
a. 0 + 0 =0
b. 0 + 1 =1
c. 1 + 0 =1
d. 1 + 1 =1
III. AND relation ( LogicalMultiplication)
a) 0 . 0 =0
b) 0 . 1 = 0
c) 1 . 0 =0
d) 1 . 1 =1
IV. ComplementRules
a) 0̅ = 1 b) 1̅ = 0
Principle of DualityTheorem:
This is very important principle used in Booleanalgebra.
Principle of Duality statesthat;
o Changing each OR sign (+) to an AND sign(.)
o Changing each AND sign (.) to an OR sign(+)
o Replacing each 0 by 1 and each 1 by0.
Example: Find the duals for the following BooleanExpression
BooleanTheorems:
Sl No Theorem Sl No Theorem
Properties of 0 and 1 Associative Law
1 0+X=X 12 X .(Y.Z) = (X.Y).Z
2 1+X=1 13 (X+Y).Z = X+(Y.Z)
3 0.X=0 Distributive Law
4 1.X=X 14 X.(Y+Z) = X.Y + X.Z
Indempotence Law 15 X+Y.Z = (X+Y).(X+Z)
5 X+X=X Absorption Law
6 X.X=X 16 X + XY = X
Complementary Law 17 X(X+Y) = X
7 ̅= 1
X +X 18 XY + XY = X
8 ̅= 0
X .X 19 (X+Y)(X+Y)= X
Involution Law 20 X+XY = X+Y
9 ̿= X
X 21 X(X+Y) = XY
Commutative Law
10 X+Y=Y+X
11 X.Y=Y.X
Boolean Theorem can be proved by substituting all possible values of the variable that are 0 and 1. This technique of
proving theorem is called Proof by perfectinduction.
Theorem 1: 0 + X = X
Theorem3: 0.X=0
Theorem4: 1.X=X
Indempotence Law: “This law states that when a variable is combines with itself using OR or AND operator, the
output is the samevariable”.
Theorem5: X + X =X
Theorem 8: ̅=0
X .X
Proof: If X = 0 Proof: If X = 1 Using Truth Table
then LHS then LHS
X ̅
X ̅
X .X
̅
= X.X ̅
= X .X
0 1 0
=0.1 =1.0
=0 =0 1 0 0
= RHS = RHS
Involution Law: This law states that when a variable is inverted twice is equal to the given variable value itself.
Theorem9: ̿
X= X
Proof: If X = 0, thenX =1 Using Truth Table
Take complement again, thenX = 0 i.e. X If X = 1, thenX =0
Take complement again, thenX = 1 i.e. X
X ̅
X ̿
X
0 1 0
1 0 1
Commutative Law: “This law states that the order in which two variable are Ored or AND ed make
nodifference”.
Theorem 10: X + Y = Y +X
Proof: If Y = 0 Proof: If Y = 1 Using Truth Table
thenLHS = X +Y thenLHS = X +Y
X Y X+Y Y+X
=X+0 =X+1
=X =1 0 0 0 0
RHS = Y +X RHS = Y +X
=0+X =1+X 0 1 1 1
=X =1 1 0 1 1
Therefore LHS = RHS Therefore LHS = RHS
1 1 1 1
Theorem 11: X . Y = Y .X
Distributive Law:
1) X.(Y+Z) = XY + XZ
Proof: If X = 0 LHS Proof: If X = 1
=X.(Y+Z) LHS =X.(Y+Z)
=0.(Y+Z) =1.(Y+Z)
=0 = Y+Z RHS
RHS = XY + XZ = XY +XZ
= 0.Y+0.Z =1.Y+1.Z
=0 = Y+Z
Therefore LHS =RHS Therefore LHS =RHS
Absorption Law:
1) X+XY = X 2) X (X+Y) = X
LHS = X +XY LHS = X(X+Y)
= X (1 + Y) = XX + XY
=X = X + XY
= RHS = X (1+Y)
=X
Other Boolean laws:
(X+Y)(X+𝐗)= X ̅Y=X+Y
X +𝐗 ̅ + Y)=XY
X.(𝐗 XY + X𝐗
=X
LHS LHS = X +XY LHS =X (X+Y) LHS =XY+ XY
=(X+Y)(X+ = (X +X ) = X.X + X.Y = X(Y+Y)
Y) (X+Y) = 0 + XY = X.1
= XX + XY + XY +YY = 1. (X+Y) = XY =X
= X + XY + XY + 0 =X+Y = RHS = RHS
= X (1 +Y + Y) =RHS
= X. 1
=X
DeMorgan’s Theorem:
I Theorem:
Statement: Complement of the sum is the product of their complements.
̅̅̅̅̅̅̅
X+Y=X ̅.Y
̅
Proof : De Morgan’s I theorem by using Truth Table:
X Y 𝐗 𝐗 X+Y ̅̅̅̅̅̅̅
X+Y ̅ ̅
X.Y
0 0 1 1 0 1 1
0 1 1 0 1 0 0
1 0 0 1 1 0 0
1 1 0 0 1 0 0
̅̅̅̅̅̅̅
ColumnX ̅.Y
+ Yand X ̅are same. Hence the De Morgan’s first theorem isproved.
X Y ̅
X ̅
Y X.Y ̅̅̅̅̅
X. Y X̅ + Y̅
0 0 1 1 0 1 1
0 1 1 0 0 1 1
1 0 0 1 0 1 1
1 1 0 0 1 0 0
̅̅̅̅̅
Column X. Yand X̅ + Y̅are same. Hence theDeMorgan’s Second theorem isproved.
Application of De Morgan’sTheorem:
- It is used in simplification of Boolean expression.
- De Morgan’s law commonly apply to text searching using Boolean operators AND, OR and
NOT.
- It is useful in the implementation of the basic gates operations with alternativegates.
Simplification of BooleanExpression:
Boolean expressions can be simplified by two methods:
o Algebraic method
o KarnaughMap
Algebraic Method:
Example : Example:
Prove algebraically X (X + Y) = X X + XY = X (Absorption law)
LHS = X (X + Y) X + XY = X
= XX+XY X(1 + Y) =X
= X+XY X.X = X X(1)=X (1 + Y = 1) properties of 1 X =X
= X ( 1+Y)
= X ( 1) = X = RHS 1+Y=1
Karnaugh Map method (K-MAP)
To Simplify the Boolean expression in Karnaugh Map method it is essential to knoe min and max terms.
Minterm:
Minterm is a product of all the literal (with or without bar) within the logicsystem.
(OR) A single variable or the logical product of several variables. The variables may or may not
becomplemented.
Avariable mayappear eitherin its normal form (X)or in its complement form (X )
If a variable value is 0 then its complementedotherwise it is in its normalform.
For example, if you have two variables X & Y, there are four possible combination can be formed with
AND operation. Each of these four AND operations represents one of the Boolean expressions terms and
is called a Minterm or a standardproduct.
X Y Minterm Designation
0 0 XY m0
0 1 XY m1
1 0 XY m2
1 1 XY m3
A symbol for each Minterm is also shown in the table and is of the form mi where i denotes the decimal
equivalent of the binary number of the Mintermdesignated.
For example, the Minterm𝐗 𝐗 Z̅whose combination is 1 1 0 can be written as m6as decimal equivalent of
1 1 0 is6.
A Boolean expression may be represented from a given truth table by forming a Minterm for each
combination of the variables which produces as 1 in the function, and then taking the OR (Logical
Addition) of all thoseterms (This is known as SOP – Sum of Products).
Sum of Product (SOP): A Sum of all product term or several product terms logicallyadded.
Maxterm:
Maxterm is a sum of all the literal (with or without complement) within the logicsystem.
Avariable mayappear eitherin its normal form (X)or in its complement form( ̅ X)
If a variable value is 1 then its complementedotherwise it is in its normalform.
For example, if you have two variables X & Y, there are four possible combination can be formed with OR
operation. Each of these four OR operations represents one of the Booleanexpressions
terms and is called a Minterm or a standard product.
X Y Minterm Designation
0 0 X+Y M0
0 1 X+̅
Y M1
1 0 ̅+Y
X M2
1 1 ̅+Y
X ̅ M3
- A symbol for each Maxterm is also shown in the table and is of the form M i where i denotes the decimal
equivalent of the binary number of the Maxtermdesignated.
- For example, the Maxterm𝐗 + 𝐗 + Z̅whose combination is 0 0 1 can be written as M1as decimal
equivalent of 0 0 1 is1.
- A Boolean expression may be represented from a given truth table by forming a Maxterm for each
combination of the variables which produces as 0 in the function, and then taking the AND (Logical
Multiplication) of all thoseterms.
- Assume the truthtable
̅
A A
0 1
In one variableK-map:
- One square represents oneMinterm.
- Two adjacent squares represents a function which is always true i.e. f (A) =1.
Two VariableK-Map:
̅B
- There are fourMinterms(A ̅ B, A B
̅, A ̅ and AB fortwovariable).
- Hence the map consists of 4 squares (i.e. 2n square, 22 = 4square)
̅
B B
̅
𝐀 00 01
A 10 11
Three VariableK-Map:
- 3-variable K-map consists of 8 squares (i.e. 2n square, 23 = 8square)
̅C̅
B ̅C
B BC B C̅
̅
A 000 001 011 010
Four VariableK-Map:
The four variable Boolean expressions are of the form f (A, B, C,D).
There are sixteen Minterms for fourvariables.
Hence the map consists of 8 squares (i.e. 2n square, 24 = 16square).
The rows and columns are numbered in a reflected codesystem.
C̅D
̅ C̅ D CD ̅
CD
̅B
A ̅ 0000 0001 0011 0010
̅B
A 0100 0101 0111 0110
AB 1100 1101 1111 1110
̅
AB 1000 1001 1011 1010
Entries in the K-Map:
Each square represents a min-term or a max-term. Enter 1’s for the min terms in the expression (0’s for the max-
terms).
Pair – two adjacent 1’s form a pair
Quadrant - four adjacent 1’s form a quadrant
Octet - fight adjacent 1’s form an octet (Try from Octet to pair order)
Examples:
1. Given the Boolean function F(a,b,c,d) = ∑(0,1,2,3,4,6,8,10,12,14). Reduce it by using Karnaugh map.
2. Draw K-map and write the reduced expression for F(A,B,C,D) = ∑ (0,1,2,3,8,9,10,11,13)
Chapter-3
LOGIC GATES
Introduction:
Gate: A Gate is a simply an electronic circuit which operates on one or more input signals and always
produces an outputsignal.
Gates are digital (two state) circuits because the input and output signals are either low voltage (0) or high
voltage(1).
Gates are often called logic circuits because they can be analyzed with Booleanalgebra.
Gates are classified into twotypes: Basic Gates – AND, OR, NOT Derived Gates – NOR, NAND, XOR, XNOR
BasicGates:
NOT Gate:
X
X ̅
X
0 1
1 0
OR Gate:
A OR gate has two or more input signal but only one outputsignal.
If any of the input signals is 1 (high), then the output is 1(high).
The logical symbol for two-input OR gate and the truth table is givenbelow.
X Y X+Y
X X+Y 0 0 0
0 1 1
1 0 1
Y 1 1 1
AND Gate:
A AND gate has two or more input signal but only one outputsignal.
When all the input signals are 1 (high), the output is 1 (high), otherwise the output is0.
The logical symbol for two-input AND gate and the truth table is givenbelow.
X X Y X.Y
0 0 0
0 1 0
Y 1 0 0
1 1 1
NOR Gate:
A NOR gate has two or more input signal but only one outputsignal.
The NOR gate is a complemented of OR gate.
The output of NOR gate will be 1 only when all inputs are 0 and output will be 0 if any input represents a1.
NOR is short form ofNOT-OR.
The logical symbol for two-input NOR gate and thetruthtable
̅̅̅̅̅̅̅
X+Y
X X+Y
X Y ̅̅̅̅̅̅̅
X+Y
0 0 1
0 1 0
1 0 0
1 1 0
NAND Gate:
A NAND gate has two or more input signal but only one outputsignal.
The NAND gate is a complemented of ANDgate.
The output of NAND gate will be 0 only when all inputs are 1 and output will be 0 if any input represents
a0.
NAND is short form ofNOT-AND.
. TRUTH Table
X X.Y
X Y X.Y
Y
0 0 1
0 1 1
1 0 1
1 1 0
XOR (Exclusive-OR)Gate:
An exclusive-OR has two or more input signal but only one outputsignal.
Exclusive-OR gate is different form of ORgate.
Exclusive-OR gate produces output 1 for only those input combinations that have odd number of1’s.
The output is 0 if there are even number of 1’s in theinput.
The output is 1 if there are odd number of 1’s in theinput.
In Boolean algebra ⊕ sign stands for XOR operation. Thus X XOR Y can be written asX⊕Y
If the output is givenby:
F=X⊕Y
The following truth table illustrates XOR operation for 2 and 3inputs.
Universal gate is a gate using which all the basic gates can bedesigned.
NAND and NOR gate re called as Universal Gates, because all the Boolean functions can also be
implemented using these twogates.(All basic gates can be designed using NAND and NOR universal gates.
̅̅̅̅̅
X. X= ̅
X
̅̅̅̅̅̅̅
a + b = ̅̅̅̅̅̅̅
̿̿̿̿̿̿̿ a̅ + b̅ = a.b
̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿
̅̅̅̅̅̅̅̅ +( b + b) = ̅̅̅̅̅̅̅
(a + a) ̅̅̅̅̅̅̅̅̅̅̅̅ a̅ + b̅ = a.b
Chapter 4
DATA STRUCUTRE
Data Structure : It is a specialized format for organizing and storing of data.
Primitive data structure : The data structures which are directly operated on machine level instructions.
Ex :int, float, pointers etc…
Non-primitive data structure : The data structures which are derived from primitive data structures are called non-
primitive operating system.
Ex : arrays, lists, files etc…
Operations performed on primitive data structures
1) create (2) destroy (3) select (4) update
(1) create : This operation is used to create new data structure.
(2) destroy : This operation is used to remove unwanted data structures.
(3)select : This operation is used to extract required data from data structure
(4) update : This operation is used to modify the contents of a data strucutre
Linear data structure : The collection of homogeneous elements arranged in a linear order
Eg : stacks, queues, linked list etc…
Operations performed on linear data structure
1) traversing : This operation is used to visit or access each element of the list at least once
2) inserting : This operation is used to add a new element into the list.
3) deleting : This operation is used to remove an unwanted element from the list
4) searching : This operation is used to find the location of the element in the list
5) sorting : This operation is used to arrange the elements in ascending or descending order
Arrays
It is a collection of homogeneous elements all are of same type same name.
Advantages or applications of Arrays
1. The number of similar type of elements can be stored under single name.
2. 2 dimensional array is used to implement matrix applications
3. Arrays are used to implement other data structures like stacks and queues.
Disadvantages of Arrays
1. The array size must be pre-known
2. Only similar type of elements can be stored.
3. These may be a chance of shortage and wastage of memory.
Types of Arrays
1) One dimensional array
2) Two dimensional array
3) Multi dimensional array
1) One dimensional array :
Declaration :
data type array name[size];
ex :int a[10];
initialization : memory representation
data type array name[size] = { elements};
int a[5] = { 10, 20, 30, 40, FIFTY};
int a[0] = 10
int a[1] = 20
int a[2] = 30
int a[3] = 40
int a[4] = 50
Algorithm for Traversing an array
Step -1 : for ( I = 0 to n-1)
Step-2 : input a[i]
End for
Step-3 : stop
Algorithm for inserting an element
Step-1 : for (i=n-1 down to p)
Step-2: a[i+1] = a[i]
End for
Step-3: a[p] = ele
Step-4: n=n+1
Step-5: stop
Write an algorithm for deleting an element
Step 1 :ele=a[P];
Step 2 : for (I = P to n-1)
Step 3 : a[i] = a[i+1]
End for
Step 4 : n = n-1
Step 5 : stop
Searching : Finding the location of an element
(1) linear search
(2) binary search
Linear search : In this method searching can be done sequentially one after the other.
Write a algorithm to search an element using linear search method.
Step 1 - loc=-1
Step 2 – for (i = 0 to n-1)
Step 3 – if (ele == a[i])
Step 4 – loc = i
Go to step 5
end if
end for
step 5 – if (loc>= 0)
step 6 – print “Element found at “ loc+1
else
step 7 - print “element not found”
end if
step 8 – stop
Binary search : In this method searching can be done by dividing it into 2 groups.
Write an algorithm to sort the elements using insertion sort method [ ascending]
Step1 : for (I = 0 to n-1)
Step 2 : j = i
Step 3 : while (j >= 1)
Step 4 : if (a[i] < a[j-1])
Step 5 : temp = a[j]
Step 6 : a[j] = a[j-1];
Step 7 : a[j-1] = temp;
End if of step 4
Step 5 : j = j-1
End while
end for
2) Two dimensional array
Declaration:
Data type array name [row size][column size]
Ex :int a [3][3];
Initialization / memory representation
Data type array name [ row size][column size] = {elements};
Inta[[3][3] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
1 2 3
[4 5 6]
7 8 9
A B C
0 1 2
2) Circular Queue : In this type of Queue it follows circular path. The last node follows the first node.
A B C D
0 1 2 3
3) Priority Queue : In this type of Queue insertion and deletion can be done from any position based on the pre-
set priority.
4) Double ended Queue : In this type of Queue insertion and deletion can be done from both the ends
A B C
Operations performed on Queues:
1) Queue () (2) Enqueue () (3) dequeue() (4)size() (5)isempty()
1) Queue () : This operation is used to create a new empty Queue [ no parameters returns nothing]
(2) Enqueue () : This operation is used to (insert) add a new item to the rear end of queue [ parameters are
required returns nothing]
(3) dequeue() : This operation is used to remove data item from front end of queue [no parameters are required
but returns data item]
(4)size():This operation returns number of data items in the queue [from the queue] [returns integer value]
(5)isempty() : This operation is used to check wheather the queue is empty or not [returns Boolean value]
start
10 P2 20 P3 30 P1
P1 P2 P3
3) Doubly linked list : In this type each node contains three parts : (1) backward reference(2) data field
(3) forward reference
First node backward reference will be null and the last node forward reference will be null
P 30 \
\ 10 P2 P1 20 P3 2
P1 P2 P3
New and delete operations
New : This operator allocates the memory space dynamically
Ex : int *p ; int *p;
P = new int p; p = new int;
P = new[10];
Delete: This operator deallocates the memory space dynamically
Ex :int *p;
P = delete[]
Operations performed on linked list
1. Creating a linked list
2. Inserting an element into the list
3. Deleting an element from the list
4. Searching an element from the list
5. Sorting elements of the list
Memory representation of stacks
Static representation
Insertion deletion
Top = top +1 item = stack [top]
Stack[top] = item top = top-1
= 5 -1 = 4
Top = 4
Memory representation of Queues
Front Rear A B C
0 1 2
Insertion:
Rear = Rear + 1
=2+1=3
Queue[Rear] = item
A B C D
0 1 2 3
Deletion
Item = Queue[Front]
Front = Front + 1
0+1
B C
0 1 2 3
Non-linear data structure
The data structure in which each node is connected with several other nodes.
Ex : graph, tree
Graph : A graph is a collection of vertices and edges which are connected.
Tree : A tree is a collection of root node and its sub nodes.
Root node : A node at the top of a tree which do not have any parent node.
Leaf node or chain node : A node at bottom of a tree which do not have any sub nodes.
Internal node : A node which have both parent and leaf node.
Height : The number of nodes traversed from root
Depth : height + 1
Chapter 5
Review of C++
Characteristics of C++
Object-oriented programming.
Portability.
Brevity.
Modular Programming.
C Compatibility.
Speed.
Machine independent.
Flexibility.
Wide range of library functions.
System Software development.
Larger programs are developed in terms of Programs are developed in terms of objects.
functions.
Data communicate between the functions Objects communicate with each other according
through arguments/returning value to the respective access specifiers defined in the
associated classes.
Emphasis is on procedure rather than data Emphasis is on data rather than procedure
Advantages of OOP
Modularity: The programs are modularized based on the principle of classes and objects.
Data Security: The data is encapsulated along with methods(Functions). Therefore data is hidden or under
controlled access.
Reusability: The code(program) can be reused through the concept of inheritance.
Communication: Effective communication is possible between the Objects through the message passing.
Polymorphism: Operators and functions works in different forms also known as overloading.
Chapter 6
OOP is the principle of design and development of programs using modular approach.
Object is the basic unit of OOP. An object is a collection of set of data known as member data and the functions that
operate on these data known as member functions or methods.
Objects are created according to the specifications of the entity defined.
To design OOP model, first a set of classes are defined. A class is a template from which objects are created. The
template of a class specifies the data, member functions and their attributes.
Some of the OOP languages are C++, Java, C # and so on.
Objects, Classes, Data abstraction, Data encapsulation, Inheritance, Overloading, Polymorphism, Dynamic binding,
Message passing.
Object: An object may represent a person, place or data concerned to real world task. Every object must be a
member of particular class. Objects interacts with each other by sending messages to one another.
Class: A class is a way of grouping objects having similar characteristics. Once the class is defined, any number of
objects of that class are created.
Abstraction: Abstraction refers to the process of representing essential operational features without including
background details or explanations.
Polymorphism:
The ability of an operator and function to take different forms is also known as polymorphism.
Dynamic binding: Dynamic binding is the process of connecting one program to another at the time of program
execution.
Message passing: Communication between objects takes place using message passing. It involves specifying the
object name, the name of the function (message) and information to be send.
Advantages of OOP
1. Programs are modularized based on the principle of classes and objects.
2. Data is encapsulated along with the functions. This provides controlled data access and thereby secures
data.
3. Linking code and object allows related objects to share common code. Hence provides reusability.
4. Complexity can be minimized through inheritance.
5. reduces software develop time .
Limitations of OOP
Ex:
classaccount
{
private:
intaccno;
char name[20];
public:
voidget_data();
voiddisplaydata();
};
Access specifiers
Every member of a class is specified by three types of access protection for hiding data and function. The access
specifiers define the scope of data and functions. Three types of access specifiers are:
1. Private.
2. Protected.
3. Public.
Private: Private access means a member data can only be accessed by the member function.
Protected: These member data can be accessed only by the member functions, friend functions and also by the
member functions derived from the respective class.
Public: These member data can be accessed by any function outside the class also.
Note: If no access specifier is mentioned, then by default, members are private.
Members of the class: The members of a class can be data or functions.
Definition of a member function inside the class definition:
Syntax:
classclass_name
{
Member_data;
Return_typemember_function_name()
{
Member_function_body;
}
};
Ex:
class rectangle
{
intlen, bre;
public:
voidget_data()
{
cin>>len;
cin>>bre;
};
void display()
{
cout<<len;
cout<<bre;
}
};
Member functions
Member functions defined inside the class definition(inline functions)
Member functions defined outside the class definition
Ex:
classnum
{
private:
int x, y;
public:
int sum(int p, int q);
};
................
void main()
{
num s1;
s1.sum(50, 75);
};
Array of objects
An array having class type elements is known as array of objects.
Ex:
classemp
{
char name[25]; int age;
public: void getdata(); void display();
};
emp team[10];
here ‘team’ is an array of objects.
Ex: method 1
classrup
{
.............
voidmul(rup r1, rup r2)
{
.............
}
};
int main()
{
rup r1, r2, r3 ;
.................
r3.mul(r1, r2);
................
}
Here r1 and r2 are the objects used as arguments with the function ‘mul’
Defined using the keyword struct Defining using the keyword class
Members are public by default Members are private by default and can be
public and protected with the use of respective
Not possible to use access specifiers access specifiers i.e., public and protect
Chapter 8
Function Overloading
It is a process of creating two or more functions with the same name, which differ in the number of
arguments or data type of arguments. Therefore it is said that function name is overloaded.
Calling overloaded functions : The compiler automatically decides about the appropriate function to be called
depending on the arguments passed.
#include<conio.h>
#include<process.h>
#include<iomanip.h>
class overload
{
public: float area(float a) //To compute area of square
{
return(a*a);
}
float area(float l, float b) // To compute area of rectangle
{
return(l*b);
}
};
void main()
{
overload f1;
cout<<”Area of square =”<<f1.area(5)<<endl;
cout<<”Area of rectangle =”<<f1.area(4,3)<<endl;
}
OUTPUT :
Area of square = 25
Area of rectangle = 12
The size of the executable file increases and requires more memory.
Write a C++ program to find the cube of a number using inline functions.
#include<iostream.h>
#include<iomanip.h>
#include<conio.h>
class assign
{
private : int n;
public : void getdata( );
void cube( );
};
void assign :: getdata()
{
cout<<”Enter the number”<<endl;
cin>>n;
}
inline void assign :: cube() // Inline definition
{
cout<<”The cube =”<<(n*n*n);
}
void main()
{
clrscr();
assign A;
A.getdata();
A.cube();
getch();
}
Friend functions
A non-member function which can access the private and protected members of the class is called Friend
function.
It is declared within a class with the keyword friend.
It should be defined outside the class like a normal function without the keyword friend. (And also without
class name and scope resolution operator)
Syntax: class class_name
{
public: friend return_type function1(class_name object);
};
When there is a situation where two classes must share a common function. C++ allows the common function to
be shared between the two classes by making the common function as a friend to both the classes, thereby
allowing the function to have access to the private data of both of these classes.
The properties of the friend function are :
1. The function is declared with keyword friend. But while defining friend function it defined as normal function i.e
without keyword friend or :: operator.
2. A class may have any number of friend functions and a function may be friend to any number of classes.
3. It can be declared or placed anywhere in the class i.e. private, public or protected.
4. A friend function cannot be called using the object of that class.
5. It can be invoked like a normal function.
6. The parameter of friend function must be an object of the class to which it is friend.
6. Unlike member function, it cannot access the class members directly, but it can access through the object of the
class to which it is a friend.
Example:
#include <iostream.h>
class sum
{
private:
int a,b;
public:
void getdata( );
friend int add(sum s1);
};
void sum::getdata( )
{
cout<<”Enter two numbers””<<endl;
cin>>a>>b;
}
//Definition of friend function like a normal function
int add(sum s1)
{
return (s1.a + s1.b);
}
void main()
{
sum s;
s.getdata( );
cout<<"Sum of two number is "<<add(s)<<endl;
}
*******
Chapter 9
Definition : “A constructor is a special member function that is used to initialize the objects or datamembers of a
class automatically”.
constructor constructs the data members of an object. i.e., it defines a value to the data members.
It is defined like other member functions of a class.
It can be defined either inside the class or outside the class but without returntype.
The characteristics or rules for constructor function:
The name of the constructor must be same as the class name.
There is no return type for constructors (not even void)
It should be declared in public section.
A constructor is invoked automatically when objects are created.
It can be with parameter or without parameter.
It is not possible to refer to the address of the constructors.
The constructors make implicit calls to the operators new and delete to allocate
and de-allocate the memory.
Creation of constructor :
Inside the class definition :
Syntax :class class_name
{
private :datatype variable;
public :class_name()
{
variable = value;
}
};
Example :
classnum
{
private :int x;
public :num( )
{
x=10;
}
};
Outside the class definition :
Example :
classnum
{
private :int x;
public :num( );
};
num :: num()
{
x=10;
}
Programme example to illustrate constructor (initialize and display 2 numbers):
#include<iostream.h>
#include<conio.h>
classnum
{
private :int x, y;
public :num ()
{
x=10;
y=20;
}
void display();
};
voidnum :: display ()
{
cout<<”x=”<<x<<”\t y=”<<y;
}
void main ()
{
clrscr();
num n1;
n1.display();
getch();
}
Practical problem 10. Write a program to find the sum of the series 1+x+x2+x3+…..+xn using constructors.
#include<iostream.h>
#include<math.h>
#include<conio.h>
class series
{
private:
int sum, n,i, x;
public: series() // constructor
{
sum=1; // initialize sum value
}
voidgetdata();
void compute();
void display();
};
#include<iostream.h>
#include<iomanip.h>
classnum
{
private:
int a, b;
public:
num()
{
a=10, b=20;
}
void display()
{
cout<<"a = "<<a<<" b = "<<b<<endl;
}
};
void main()
{
num E1;
E1.display();
}
Disadvantages of default constructor:
1. All objects of the class gets initialized to same set of values by default constructor.
2. The default constructor simply allocates memory to data members of objects.
3. Default constructor cannot be overloaded.
2) Parameterized Constructors: A constructor with arguments or that takes one or more arguments is called
parameterized constructor
OUTPUT : m = 10 and n = 20
2) Implicit call
In this method the declaration of the object is followed by argument list enclosed in parentheses.
Example: numn1(10,20);
num n2(40,50);
where in ‘num’ is the class name an n1 and n2 are objects
Copy constructor is a parameterized constructor using which one object can be copied to another object.
Syntax : Class_name Object1 (parameter);
Object2 = Object1;
Example: num a1 (10,20);
num a2 = a1; //copy constructor
Here the object a2 is initialized by using an existing object a1.
Copy constructors are used in the following situations.
To initialize an object by another object of same class.
When objects must be returned as function values.
When we use objects as pass-by-value parameters of a function.
Invoking a Copy Constructor:
1. Copy constructor is not invoked explicitly.
2. Copy constructor is invoked automatically when a new object is created and equated to an already existing object.
Example: nums1(20, 30);
num s2 = s1; //copy constructor
3. When a new object is declared and existing object is passed as a parameter to it in the declaration, then also copy
constructor is invoked.
Example : num s1(100,200); //parameterized constructor
num s2(s1);
//copy constructor is invoked for object s2 with s1 as parameter
4. Copy constructor is invoked when an object returns a value.
Example programme to find the factorial of a number using copy constructor
#include<iostream.h>
class fact
{
private: int f, n i;
public:
fact(int m)
{
n = m;
}
void process();
void display ();
};
void fact :: process()
{
int f = 1;
for(int i = 1; i<= n; i++)
f = f * i;
}
void fact :: display()
{
cout<<”the factorial =”<<f;
}
void main()
{
fact f1(4);
fact f2=f1; //copy constructor
f1.process();
f1.display();
f2.process();
f2.display();
}
Constructor Overloading: A class can have two or more constructors with the same name but with different in their
number of arguments or data types of their arguments , or both.
Depending on the type and number of arguments passed, the compiler decides which version of the constructor to
invoke during object creation.
The following example has overloaded constructor that is used to specify the input values for the data members of
the class.
#include<iostream.h>
#include<conio.h>
#include<math.h>
class area
{
public: area();
area(int);
area(int,int);
};
area::area()
{
cout<<”Default constructor being called”<<endl;
}
area::area(int a)
{
cout<<”area of the square =”<<a*a<<endl;
}
area::area(int l, int b)
{
cout<<”area of the rectangle =”<<l*b<<endl;
}
void main()
{
area a1;
area a2(4);
area a3(4,5);
}
Destructors: A destructor is a special member function that is use to deallocate all the resources like memory when
the object of the class is destroyed.
It is automatically called when the object is destroyed or variables go out of scope.
The name of the destructor name must be same as the class name but preceded by
symbol tilde (~).
*****************
CHAPTER 10
Inheritance
Definition :
Inheritance is the capability of one class to inherit properties from another class.
Advantages :
Reusing existing code
Faster development time
Easy to maintain the code
Easy to extend
Memory utilization
Base class : The class from which the properties are inherited is called the base class or super class.
Derived class :The class that inherits the properties from the base class is called as derived class or subclass.
Defining derived classes
First the base class is defined and then derived class is defined by specifying its relationship with the base
class.
classderived_class_name : visibilitymodebase_class_name
{
//Members of the derived class
};
Here, colon derivation from the base class
visibility_mode Type of derivation. i.e., private, public or protected
The body of the derived class contains its own data members and member functions.
The class definition should be terminated by the semicolon.
If no visibility_mode is specified, the default visibility mode is private.
Note that all the members of the class except private can be inherited.
public derived class
class father //Base class
{
private:
char name[10];
int age;
public:
int boys;
int girls;
void getdata();
void display();
};
class son : public father //public derived class
{
private:
char company[10];
float salary;
public:
void inputdata();
void putdata();
};
Access specifiers or visibility mode
The visibility mode defines whether the class is derived private or public or protected from the base class.
The visibility mode basically controls the access specifier in the derived class.
public derivation:
public members of the base class become the public members of the derived class.
protected members of the base class remain protected members of the derived class. They are directly
accessible by the member functions.
private members of the base class are not inheritable.
The private members of the base class can be accessed indirectly using public or protected member
functions of the base class.
private derivation:
This visibility mode is optional. i.e., when not used, the default visibility mode is private.
public members of the base class become the private members of the derived class. Therefore, the public
members of the base class can be accessed only by the member functions of the derived class and not by the
objects of the derived class.
protected members of the base class become private members of the derived class.
private members are not inherited by the derived class.
protected derivation:
When a member of a base class is declared protected, it is accessible by the member functions of its own
class and any class derived from it.
public members of the base class become the protected members of the derived class.
protected members of the base class remain protected members of the derived class.
private members are not inherited by the derived class.
Levels of Inheritance
1. Single inheritance
2. Multilevel inheritance
3. Multiple inheritance
4. Hierarchical inheritance
5. Hybrid inheritance Base Father
Single Inheritance
If a class is derived from a single base
class, it is called as single inheritance. Derived class Son
Derived class-n
Multiple inheritance
If a class is derived from more
than one base class, it is known as Base- Base-2 Base-n king queen
multiple inheritance. 1
prince
Hierarchical Inheritance Derived class
If a number of classes are derived
from a single base class, it is called as hierarchical inheritance.
Base Staff
Derived class Derived class Derived class Lecturers Office Staff Group-D
Hybrid Inheritance Base
Hybrid Inheritance is combination of Hierarchical and
Multilevel Inheritance.
Derived class-1 Derived class-2
Derived class
CHAPTER 11
POINTERS
Definition :A pointer is a variable that holds an address of another variable.
Advantage of pointers
i) It is possible to write efficient programs.
ii) Memory is utilized properly.
iii) Dynamically allocate and de-allocates memory.
iv) Easy to deal with hardware components.
v) Establishes communication between program and data.
Address operator :& is used as address operator which is used to assign the address to a pointer.
Pointer operator: * is called as pointer operator. It is used to access the value of variable.
Pointer Arithmetic :
The following operations can be performed on pointers
i) Add an integer value to a pointer.
ii) Subtract an integer value from a pointer.
iii) Assign one pointer to another pointer provided both are of same type.
iv) We can increment a pointer variable.
v) We can decrement a pointer variable.
The following operations cannot be performed on pointers
i) Addition of two pointers.
ii) Multiplication of two pointers.
iii) Division of two pointers.
iv) Subtraction of one pointer from another pointer when they do not point to the same array
Array of pointers
An array of pointers means that it is a collection of addresses.
datatype *variablename[size];
int *iptr[5];
int a=10, b=20, c=30, d=40, e=50;
iptr[0]=&a; *iptr[0]=10;
iptr[1]=&b; *iptr[1]=20;
iptr[2]=&b; *iptr[2]=20;
iptr[3]=&b; *iptr[3]=20;
iptr[4]=&b; *iptr[4]=20;
1. Memory is allocated before the execution of the 1. Memory is allocated during the execution of the
program begins program
2. No memory allocation or de-allocation actions 2. Memory bindings are established and destroyed
are performed during execution during the execution.
3. Variables remain permanently allocated. 3. Allocated only when program unit is active.
Free store is a pool where the memory is allocated dynamically to the objects.
The allocated during execution.
The allocated free memory is unnamed.
The objects allocated on the free store are manipulated indirectly through pointers.
The free memory is allocated and de-allocated using new and delete operator respectively.
Memory leak :If the objects that are allocated memory dynamically, are not deleted using delete, the memory block
remains occupied even at the end of the program.
this pointer : Every object in C++ has access to its own address through an important pointer called this pointer.
CHAPTER 12
DATA FILE HANDLING
C++ I/O occurs in streams. If bytes flow from a device likes a keyboard, a disk drive etc., to main memory is called
input operations and if bytes flow from main memory to a display screen or disk is called output stream. A flow of
data from one device to another is called stream.
In C++, file input/output facilities available in header file fstream.h. The fstream library predefines a set of
operations for input and output.
fstream.h
The stream that supplies data to the program or Read any data from the file is known as input stream.
The stream that receives data from program or Write any data to the file is known as output stream
Stream classes
The following classes to perform output and input of characters to/from files
ofstream: This stream class helps to write data into a file. The function put(), write() and functions supporting
random access seekp and tellp from ofstream class defined inside iostream.h file.
ifstream: This stream class helps to read data from a file. The function get(), getline(), read() and functions
supporting random access seekg and tellg from istream class defined inside iostream.h file.
fstream :fstream class helps to both read and write from/to a file.
Types of data files : The files are used to store data or information permanently. The following types of data files are
i) text file ii) Binary file
Text file : That stores information in ASCII character. In text file can line of text is terminated with a special character
known as EOL character or delimeter.
Binary file : It is a file that contains information in the same format as it is held in memory no delimeters are used.
The syntax of opening a file for input purpose only using an object ifstream class and open() member function is as
follows
ifstream_object.open(“filename”);
example : ifstreamifile(“filename”);
ifile.open(“abc.dat”);
The syntax of opening a file an object of type fstream class and the open() member function is as follows
fstream_object.open(“filename”, mode);
Different modes of opening a file
File mode meaning
ios::app append to end of file
ios::in open file for reading only
ios::out open file for writing only
ios::ate open file for updation and move the file pointer to end of file
ios::binary opening a binary file
ios::trunk on opening, delete the contents of file
Closing file
The file should be saved on the secondary storage to use the member function close(). The function on its
execution removes the linkage between the file and the stream object.
Syntax : stream_object.close();
fout.close();
read() : The read() member function is used to read binary data from a file.
Syntax :fin.read(char *) &variable, sizeof(variable));
Example : student s;
ifstream fin(“std.dat”, ios::binary);
fin.read((char *) &s, sizeof(s));
Detecting end of file:
The end of file detected with the use of eof() member function, we can stop reading further.
while(!fin.eof())
{
statements;
}
Seekg() : Moves the get pointer to a specified location from the beginning of a file.
Example : inf.seekg(long);
inf.seekg(20);
seekg(offset, seekdir);
Constant Meaning
ios::beg offset specified from the beginning of the file.
ios::cur offset specified from the current position of the get pointer.
ios::end offset specified from the end of the file.
Seekp() : Moves the put pointer to a specified location from the beginning of a file.
Example : inf.seekp(long);
seekp(offset, seekdir);
inf.seekp(0, ios::beg);
tellg(): The ifstream class provides the member function name tellg(). The purpose of the function is to return
current position of the get pointer.
Syntax :int position
Position = fin.tellg();
tellp(): The ifstream class provides the member function name tellp(). The purpose of the function is to return
current position of the put pointer.
Syntax :int position
Position = fin.tellp();
Chapter 13
Database concepts
OBJECTIVES
A database is a vast collection of logically related data in computer understandable format. The data in database can
be organized, accessed, managed and updated easily.
Information is processed and meaningful data. Information can be generated by processing and
manipulation of data.
The process of conversion of raw data into meaningful form is carried out using DBMS.
DBMS is therefore a Software that manages the data stored in database. DBMS is used to create and
manage the databases.
Applications of Database
The process of giving data to computer for further manipulation is known as input. The input data may be in the
form of text, graphics, sound, image and so on.The input is provided using input devices such as keyboard, OCR,
MICR, Scanner etc. If the input is directly given to the computer using devices like OCR, MICR etc.,,then it is known as
source data automation.
Processing:
The processing is a sequence of operations carried out on input data to generate output. Some of processing
activities are sorting, indexing, retrieval of selected data and computing the results through different operations.
Storage:
Data and information must be stored in computer for future use. Different storage devices like floppy disks,
Hard disks, Pen drives, CD’s can be used.
Output
The results of computation are made available to user in the form of reports (hard copy/soft copy) .Some of
the results may be in animation form with sound and video. The output generated may have the appropriate
headings, date of report generation, author name, validity data and so on.
Communication:
The computers can be used for data processing using communication devices (wired or wireless). .This
enables remote data to be processed and managed.
A file is a collection of inter related data. The arrangement of data in a file is known as file organization.
There are three types of file organization namely
In serial file organization, records are organized one after another in the order in which the records are inserted into
the file. This type of file organization is normally found on Transaction files where records are created for each
transaction carried out. The information is later used to update master files. The organization is very simple and no
overheads are needed.
In a sequential file records are stored one after another in ascending or descending order according to
primary key.
The sequential files may be stored on any type of storage device like magnetic tapes or magnetic disks.
The records are read sequentially one after another in the order in which they are stored in the file.
To locate a particular record one has to read through all previous records, until the desired record is found.
This method of file organization is suitable for batch processing applications such as payroll processing,
result manipulation and so on.
Indexed sequential file organization
Indexed sequential files are the files that are stored sequentially according to primary key, but the records
can be retrieved both sequentially as well as directly.
The indexed files use a software called ISAM(indexed sequential access mode).The ISAM creates an index
for every record stored in the file.
The index table contains the key value and address of the record.
When a record is to be searched, the key value is given, the computer searches through the index, finds the
address and retrieves the record immediately. Therefore searching is done very quickly.
The indexed files can be stored only on direct access storage devices like magnetic disks.
Advantages
1. Only direct access storage devices can be used such as magnetic disks.
2. Less efficient in terms of storage space utilization because of creation of index for every record.
Random/Direct file organization
This method of file organization allows immediate access to the records on the file.
The records are stored in storage where the record key is mapped on to the storage address.
The direct file organization allows the records to be accessed both sequentially as well as randomly.
The storage media used for direct files can be disks only.
In order to create a mapping of record key to storage address, a hashing algorithm is used to generate
relative address of the record. Therefore records are stored in such a way that there is no relationship
between keys of adjacent records.
Advantages
Data base is a collection of interrelated data in computer understandable format. DBMS is software that acts
upon the data stored in a database. The software allows creation and manipulation of data stored in database.
In addition to this DBMS provides security to data base and enables multiple users to use data. Different
Database packages are Mysql, , Oracle, Sybase, DBASE , MS Access& so on.
Features of DBMS
Data in database is stored in central location and shared among multiple users.
The DBMS provides centralized management of data.
The data base is designed in such a way that the data are not duplicated in different files, there by reduces
redundancy.
Data sharing – The data can be shared by a number of users and programs.
It is also possible that new applications are developed using stored data.
The data validation is done automatically by DBMS and this result in Integrity of data.
Data in database can be protected against unauthorized access using security features such as login name and
password.
DBMS has an automatic backup and recovery system that is responsible for recovery of the data from hardware
and software failures.
DBMS also provides multiple interfaces between data and applications , such as query language, GUI, Menu
driven interface.
Terminologies used in DBMS
Relation- A table with number of columns and rows where data can be stored is called a relation.
Degree- The degree of a relation is defined as the number of attributes in the relation
Types of Keys
A key is one of the attributes of a table to identify one or more tuples/records of the table.
Primary key-A primary key uniquely identifies a tuple /record in a table. A primary key cannot be duplicated for
different records in a table.
Candidate key-There may be more than one unique field in a table that can be selected as primary key- All such
fields that are unique for every row of table are known as candidate keys.
Alternate keys- Those candidate keys that are not selected as primary keys are known as alternate keys.
Foreign key- A field in a table that can be chosen as primary key of another table is known as foreign key.
For ex: bank_accno in a student table that may have student_id as primary key and bank_accno as the foreign key.
Composite key-A key that consists of two or more attributes to identify a record in a table are known as composite
keys.
Database users
System analysts: They develop specifications based on requirement of end users who may not have computer
knowledge at all.
End Users- People who access data base for querying and updating and generating output.
Database administrator: Person who manages and controls both data and application programs. The DBA is
responsible for schema definition and modification. The DBA also manages new software installation and security
controls and other administration based activities.
Database designers: People who are responsible for identification and design of tables and establish relationships
between tables in the database.
Internal level
Conceptual level
External level or view level
V1 V2 V3
Conceptual
Internal
DB
Internal level
This is also known as physical level. This architecture describes how data is physically stored and organized
on storage medium. This level also describes about data storage allocation techniques, Indexes, data compression
methods and encryption and data placement. This level considers optimal storage utilization
Conceptual Level:
The conceptual level describes logical relationship between data. This level of abstraction tells what data is
stored in the database, relationship among the data and complete view of users requirement without physical
storage structures. Therefore the complexity involved in physical storage structure is not shown at this level.
External Level
This is the highest level of abstraction. It deals with users view of database and therefore is known as view level. In
most of the cases the user needs only a part of data. The external level describes a part of database for particular
groups or users who can access data according to their needs so that same data can be seen by different users in
different ways at the same time. The external view provides a powerful and flexible security mechanism by hiding
parts of database from certain users.
Data independence:
Data independence is the ability to change the structure of a table (scheme definition) without affecting
other scheme definitions or application programs. There are two types of data independence .
Changing structure of tables in data base without modifying application program is known as logical data
independence.
Physical data independence:
Changing physical structure of a database like reorganizing files without changing application programs is
known as physical data independence.
Database architecture:
In this model user can directly interact with DBMS and process the data stored in DBMS. Any change done will
directly be done on the DBMS itself.
In this model the database is stored in a computer called server and the client which may be a user or an
application program is stored on another computer called client. The client generates a request that is conveyed to
the server. The server processes the query and returns an answer to the client. The client can establish connection
with the database using open database connectivity(ODBC driver).
Large organizations use three tier architecture. In this model DB and query processing language reside on
the inner tier. The application server and programs to access DB sits on second tier. User tier- The end user or the
client sits on this tier. From this layer the user can retrieve the data through the application server.
Database Model
A Database model or data model that describes data and data relationships. A data model describes the structure of
data and the set of operations that can be performed on the data.
The relationships between different parts of the data is known as logical design. There are database models namely
Hierarchical Model
Network Model
Relational model
Hierarchical Model
This model organizes data in tree structure. There is one parent node known as root node and a number of
child nodes (dependent nodes) for the root are represented in the form of a tree. The data are related in 1-1
relationship and one-many relationship. Any changes made to the physical structure will require the application
programs also to be changed. The data may be repeatedly present in multiple databases. This may lead to
inconsistency of data.
Student
Course Name ID
FN MN LN
The disadvantage of this model is the parent-child connection cannot be modified and therefore any
changes will result in redesigning.
Network Model
In a network model the data are linked in parent-child relationship. However the data are represented in the
form of graph. The data therefore can be accessed through several paths.
A parent node can have many child nodes and the child node also can have many parents. Therefore many-
many relationship is possible between data.
Any link or relationship broken between nodes may result in problems in DB and further database design
also becomes complex.
A B
E F
C D
Relational Model:
This was developed by EF CODD in 1970. In this model data is maintained in the form of tables (relations)
consisting of rows and columns. Each table is called a Relation, and is assigned a name such as student-table,
teacher-table and so on.
Each relation has a number of rows and each row is known as instance of a relation or tuple. Each column (field)
represents an attribute of a tuple. Every tuple has a unique value known as primary key.
Database design is done by creating entity relationship (E-R) models. These models provide a high level view
of data requirement of an organization. These models are created using a set of diagrammatic tools known as ER
diagrams ER diagram consists of entities, relationship between entities and attributes that describe the entities and
relationships. ER diagrams has 3 components .
Entitiy
An entity is any object, person, place or transaction on which data has to be maintained by organization. Entities are
represented as rectangles.
Customers orders
Ex: customers, orders, products etc.,
Attributes
An attribute describes the properties of an entity. The attributes are facts about entity.
For ex: Customer entity contains attributes like name, address, phone and so on.
Among all attributes one should be unique valued and this constitutes primary key.
Attributes one represented using ellipse.
The two types of attributes are
Key attributes- They represent main characteristic of an entity.(primary key)
Composite attributes-Attributes having their own attributes further in the hierarchy are known as composite
attributes.
address
Binary relationship
Recursive relationship
Binary relationship-This represents relationship between two entities. This is further divided into
Student--------------course
S2
Genaralisation
Combining 2 low level entities to higher level entities (Bottom up approach)is known as generalization.
Specialization
one higher level entity is broken up into 2 lower level entities-(Top class)
Aggregation- relationship between 2 entities is treated as single entity.
Relational Algebra
Relational algebra is a procedural query language. The data manipulation capabilities for database can be described
through relational algebra. It consists of set of operations that take one or two relations as input and produce a
new relation as output. Relational Algebra provides:
3)Rename operator
UNION
The operation of two relations R and S selects all the tuples that are in R, or in S or in both eliminating duplicating
tuples.
Intersection:
This operation finds common tuples in two relations. The operation is denoted by the symbol ∩
Difference
The difference of two tuples is the relation that contains all the tuples in the first table and not in the second table.
CARTESIAN PRODUCT
This operation is denoted by X. This is also known as cross productOr cross join. The Cartesian product of two
relations s1 and s2 is denoted by s1 X s2.This defines a new relation which is a combination of each tuple of relation
s1 with each tuple of relation s2.
JOIN Operation
Join is used to combine related tuples from two relations. In other words join operation is the cross product of two
relations.
Natural join- In this method the attributes in both the relations must have the same name. And two attributes in the
same relation cannot have same name. (symbolic notation-( ))
OUTER JOIN
During Join operation, it is possible that most of the useful data is lost during join. Therefore to retain the data,
different types of joins are possible.
Left outer join- This keeps the data from left hand table. (symbolic notation- )
Right outer join-keeps data from right hand table(symbolic notation- )
Full join-keeps data from both the tables.
Note: the symbolic operators are used similar to verbal operators.
Data Warehouse
Data warehouse is storage of electronic data of an organization. To analyse the data,(Data analysis helps in decision
making or performance evaluation and so on) the Datawarehousing is required. Earlier to data warehouse concept,
the organizations maintained separate databases for different operations. Data warehouse is capable of receiving
data from different types of computers such as mainframes, mini computers or personal computers. Also the data
can be received from different software media and can be integrated into a single format. In addition to this data
warehouse has user friendly reporting tools and any changes in the operational formats do not affect the data.
1. Offline operational databases-The databases are copied from a working system to an offline server.
Processing of data on the server does not affect the operational system or working system.
2. Database warehouses are regularly updated at definite intervals such as daily,weekly or monthly from
operational systems. The data is further integrated with report-generation system.
3. Real time data warehouse- The data warehoused are updated on transaction basis. That is every time a
transaction takes place on the database, the data warehouse is updated.
4. Real time Data warehouse- The data ware houses are used to generate activity and the results are passed
on to the operational system as and when transaction takes place.
Components of Data warehouse
Data source: Data source is any information stored in electronic media. The data stored in data source can be used
for data management or analysis. The data may be stored in spread sheet, or in database of oracle, ms access sql
server and so on. The data is passed on from data source to data ware house after every transaction in case of
realtime data warehouses or in regular intervals for offline data ware houses.
Data Transformation: The data received from data source is cleaned and converted into a standard format and
loaded in to storage. This process is known as staging. Staging can be done either manually or can be done using a
software tool called “Extract transform and load(ETL)”.
Reporting: The data from data ware house is made available to the users in a user friendly format. These are known
as reports. The reports can be customized. Some of the reporting tools are Executive information systems, business
intelligence tools, online analytical processing tools(OLAP).
Metadata: “data about data” is meta data. The meta data is reporting status and information of the data stored in
data warehouse.
Operations: The operations on data warehouse means extracting data from data warehouse, loading data into data
warehouse and manipulating the data. The operations also include security management of data.
Optional components:The data warehouses also contain the following components
Dependent data marts
Logical data marts
Operational data store
Advantages of Data warehouses
1. The end users can easily access reports and also analyse the information using computers.
2. The data consistency increases.
3. The computing cost is reduced and productivity increases.
4. The data from different sources can be combined in one place.
5. Data warehouse supports changes to data and changed data are stored in the system.
Disadvantages of Data warehouses
1. The process of extracting cleaning and loading data takes time.
2. The data warehouse gets outdated very quickly.
3. The end users must be trained to operate the data warehouse.
4. Security is an issue when data from data warehouse is available through WAN.
5. The compatibility of systems may cause problems.
Data Mining
Data mining is the process of analyzing data from different perspectives and selecting relevant information. The
data mining uses best methods to analyse and process large volumes of data. Initially a small set of data are analysed
and processed and time taken is analysed. If the analysis is correct, then the method is extended to larger set of
data.
Some of the data mining software are SPSS, SAS and so on.
The data mining is done to extract suitable knowledge from data warehouse. The various stages of data mining are
At the time of executing a SQL command for any RDBMS, the system determines the best way to carry out user’s
request and SQL engine determines how to interpret the task.
There are various components included in the process. These components are Query Dispatcher, Optimization
Engines, Classic Query Engine and SQL Query Engine, etc. Classic query engine handles all non-SQL queries but SQL
query engine won't handle logical files.
SQL commands: Based on their nature SQL commands can be classified into 4 groups.
Operator Description
= Equal
!= Not equal
> Greater than
< Lesser than
>= Greater than or equal to
<= Lesser than or equal to
!< Not less than
!> Not greater than
Logical Operators:
BETWEEN
Used to search for values that are within a set of values, given the max. and min. value.
EXISTS
Used to search for presence of a row in a specified table that meets certain criteria.
IN Used to compare a value to a list of literal values that have been specified.
LIKE Compare a value to similar values using wild card operators.
NOT Reverse the meaning of the logical operator with which it is used.
OR Combine multiple conditions in an SQL
IS NULL Used to compare a value with NULL value
UNIQUE Searches and very row of a specified table for uniqueness. (No duplicate)
SQL expressions or queries: SQL expressions are like formulas and are written in query language. They are different
types of SQL expressions
1. SQL-Boolean Expressions: fetches the data on the basis of matching single value.
Ex:
SQL>select * from employee where age=45;
2. Numeric Expressions: used to perform any mathematical operations in any query
Ex:
SQL>select (15+6) as addition;
SQL>select count (*) as “RECORDS” from employee;
3. Date Expressions: return current date and time value.
Ex: SQL> SELECT get_date();
SQL Constraints:
Constraints are the rules enforced on data columns on table. These are used to limit the type of data that
can go into a table. This ensures the accuracy and reliability of the data in the database.
Constraints could be column level or table level. Column level constraints are applied only to one column
where as table level constraints are applied to the whole table.
Commonly used constraints available in SQL
1.NOT NULL: Ensures that column cannot have NULL value.
2.UNIQUE: ensures that all values in a column are different.
3.PRIMARY KEY: uniquely identified each row/record in a database.
4.FOREIGN KEY: uniquely identified each row/record in another database.
5. CHECK: ensures that all values in a column satisfied certain condition.
[Note: constraints can be specified when a table is creating with create table command]
Implementation of SQL commands
DDL commands:
4. SELECT command: used to fetch the data from a database table which returns data in the form of result table.
Syntax
SELECT column1,column2,……columnN FROM tablename
WHERE condition;
Ex:
a) Selecting all columns and all rows in a table
SQL>select * from bill;
b) Selecting set of column list in a table
SQL>select RRNO, UNITS from bill;
c) Selecting specific rows in a table
SQL>select * from bill where UNITS >100;
WHERE clause using AND operator
The AND operator allows the existence of multiple conditions in a SQL statement’s where clause.
Syntax
SELECT column1,column2,……columnN FROM tablename
WHERE condition1 AND condition2………AND conditionN ;
Ex:
SQL>select * from bill where name=’sandeep’ AND rrno=’A10002’;
Ex:.
SQL>select DISTINCT salary from employee;
Syntax
Where condition;
Ex:.
COMMIT command: It is the transactional command used to save changes invoked by a transaction to the database.
Syntax
COMMIT;
DCL commands
GRANT command: It is used to provide access or privileges on the database objects to the users.
1. Scalar functions
2. Group function
Scalar functions: scalar functions return a value for every row that is processed in a Query. There are four types of
scalar functions
Numeric functions: They accept numeric input and return numeric values.
Example: abs(),round(),sqrt()
Example: LOWER(),UPPER(),TRIM()
Example:sysdate(),next_date()
Group functions:
1.COUNT (): this function returns the number of rows in the table that satisfied the condition.
4. AVG (): This function is used to get the average value of a numeric column.
Need of networking
• File sharing
• Recourse sharing
• Communication
• Remote access
• Sharing of database to multiple user
TCP /IP (Transmission Control Protocol /Internet Protocol)
Dedicated Servers
On bigger network installations, there is a computer reserved for server's job and its only job is to help
workstations access data, software and hardware resources. It dos not double-up as a workstations and such a
server is known as dedicated server. The networks using such server are known as MASTER· SLAVE network.
TYPES OF NETWORKS
1.Local Area Networks (LANs)
2. Wide Area Networks (WANs)
3.Metropolitan Area Networks (MANs)
local Area Networks (LANs)
Small computer networks that are confined to a localized area
e.g., an office, a building or a factory
The key purpose of a LAN is to serve its uses in resource sharing.
Metropolitan Area Networks (MANs)
Metropolitan Area Networks (MANs) networks are the networks spread over a city.
For example, cable TV networks that are spread over a city
The purpose of a MAN is also the sharing of the hardware and the software resources among its users.
The several LAN connected with each other and form a MAN
Wide Area Networks (WANs)
The networks spread across the countries are known as WANs.
A WANs is a group of computers that are separated by large distances and tied together.
Computers connected to a Wide Area Networks are often connected through public networks, such as the
telephone system.
Sometimes they can be connected through leased lines or satellites. The largest WAN in existence is the
internet.
Difference between LAN and WAN
LAN WAN
1 Diameter is not more than few Span Entire country
Kilometer
2 Data rate is at least several MBPS Data rate is less than one mbps
3 Owned by single organization Owned by multiple organization
4 Very low error rate Comparatively high error rate
Network Topologies
The geographical arrangement of computer resources and communication facility is called as topology.
We can also say that the actual appearance or layout of inter connection of different computer is called topology.
The some of the most popularly used topologies are
Star Topology
This topology consists of a central node to which all other nodes are connected.
Bus or Linear Topology
A linear bus topology consists of a central cable with a terminator at each end
All nodes are connected to the linear cable
1) Circuit switching: In this technique there is direct connection between sender and receiver in a unbroken path.
In this technique ones a connection is established a dedicated path exist between both ends until the
connection is terminated. Ex telephone
2) Message switching: In this techniques there is no need of a dedicated path between 2 stations. When sending
the message it appends the destination address to the message and transmitted through the network node to
node, each node receives the entire message stores it and then is transmitted to the next node due to that this
type of network can also be called as store and forward. The device needs the sufficient storage capacity to
buffer the message.
3) Packet Switching: It combine the advantages of both message switching and the circuit switching. In this
technique the message is broken into smaller part is called packet and each packet contain the proper source
and destination address and transfer through the different path along with sequence number and at the
destination rearranging of the packet will takes place based on the sequence number.
Communication Modes
Simplex
Half Duplex
On this channel each interface works as transmitter and receiver, but only one interface can transmit at a time. The
full bandwidth of a channel is available to thetransmitting interface which will not receive whit transmitting.
Generally it is used in Walkie -Talkies, Marin / Aviation, etc use Half Duplex channel.
Full Duplex
This channel has two ends each serving as transmitter and receiver. Each interface can transmit and receive at
the same time. The modem telephone systemuse Full Duplex channels. It is more expensive
NETWORK DEVICES
a) Modem (Modulator and Demodulator)
Device used to connect the system to internet
b) Ethernet Card
d) Switch
A switch is a device that is used to segment networks into different sub networks
e) Repeater
f) Bridge
A device that works like a bridge but can handle different protocols is known as a router.
h) Gateway
GSM
GSM (Global System for Mobile communications) is one of the leading digital cellular systems. The GSM
standard for digital cell phones.
GSM operates in the 900 MHz and 1800 MHz bands.
SIM card
The SIM - Subscriber Identity Module - is a chip card, the size of a postage stamp.
A SIM is a tiny computer chip that gives a cellular device its unique phone number.
It has memory, a processor and the ability to interact with the user.
CDMA
Applications in networking
SMS: Short Message Service (SMS) is the transmission of short text messages to and from a mobile phone.
Wi-Fi: Wi-Fi refers to Wireless Fidelity, which lets you connect to the internet without a direct line from your
PC to the ISP.
Network Security.
While ensuring network security, the concerns are to make sure that only legal or authorized user and
programs gain access to information resources like databases.
1. Physical security holes. When individuals gain unauthorized physical access to a computer and temper with
files.
2. Software security hole. When badly written programs are compromised into doing things
3. Inconsistent usage holes. When a system administrator assembles a combination of hardware and
software such that the system is seriously flawed from a security point of view.
PROTECTION METHODS
1. Authorization: It determines whether the service provider has granted access to the web service to the
requestor.
Basically, authorization confirms the service requestor’s credentials.
Authorization is performed by asking the user a legal login ID.
2. Authentication: Authentication involves accepting credentials from the entity and validating them against
an authority.
Authentication also termed as password protection
An encrypted smart card is a hand held smart card that can generate a token that a computer system can
recognize. Every time a new and different token is generated, which even though cracked or hacked, cannot
be used later.
4. Bio Metric Systems: They form the most secure level of authorization. The Biometric systems involve some
unique aspects of a person's body such as finger prints, retinal patterns, etc. to establish his/her identity.
5. Firewall: A system designed to prevent unauthorized access to or from a private network is called
firewall. They can be implemented in both hardware and software or a combination of both.
Cookies: Cookies are messages that a web server transmits to a web browser so that a web
server can keep track of the user's activity on a specific web site.
The Crackers malicious programmers who break into secure systems, whereas Hackers are more
interested in gaining knowledge about computer systems and possibly using this knowledge for play full
pranks.
Cyber Law
Cyber Law is refers to all the legal and regulatory aspects of internet and the WWW.
Viruses: Computer Virus is a malicious program that requires a host and is designed to make a system sick,
just like a real virus. Viruses can spread from computer to computer and they replicate themselves.
Virus can be classified in to 4 different types according to its environment, and they are
a) File virus: This will effect for executable file or create a copy of the file.
b) Boot virus : They saves them selves in the boot sector and change the pointer of boot sector
c) Macro virus: It infect to document files.
d) Network virus: Use the protocols and the command of the computer network or the email to spread them
selves.
Symptoms of virus infection:
Characteristics of virus:
1. It is able to replicate
2. It requires a host program as a carrier
3. It is activated by external action
4. Its replication ability is limited to the system.
Virus Prevention
The anti virus software is used to detect the virus. It is better to prevent the virus than deal with it. The McAfee,
Symantec, Kaspersky, quick heal, K7, Norton 360
Cloud technology:Cloud computing relies on sharing of resources to achieve coherence and economies of scale,
similar to a utility (like the electricity grid) over a network
Chapter 16
Internet and open source
Free software
Free software means the software is freely accessible and can be freely used, changed, improved, copied
and distributed by all who wish to do so.
OSS and FLOSS
OSS refers to Open Source Software, which refers to software whose source code is available to
customers and it can be modified and redistributed without any limitations. An OSS may come free of cost or with
a payment of nominal charges that its developers may charge in the name of development, support of software.
FLOSS refers to Free Libre and Open Source Software or to Free Livre and Open Source Software. The term FLOSS
is used to refer to software which is both free software as well as open source software
FSF
FSF is Free Software Foundation. It is a non-profit organization created for the purpose of supporting free
software movement.
OSI
OSI is Open Source Initiative. It is an organization dedicated to cause of promoting open source software
Proprietary Software
Proprietary Software is the software that is neither open nor freely available.
Freeware : Which is available free of cost and which allows copying and further distribution, but not modification
and whose source code is not available.
Shareware: Which is made available with the right to redistribute copies, but it is stipulated that if one intends to
use the software, often after a certain period of time, then a license fee should be paid.
(i). in shareware the source code is not available
(ii). Modification to the software are no allowed.
Telnet
Telnet is an older Internet Utility that lets you log on to remote computer systems.
Web Browser
A Web Browser is a WWW client that navigates through the World Wide Web and displays web pages. Internet
Explorer and Netscape Navigator, Google chrome, Opera Mozilla Firefox are most popular web browsers
Web Server
Web Server is a WWW server that responds to the requests made by web browsers.
Web Page
The documents residing on web sites are called Web Pages. The web pages use HTTP.
1. Home Page: It is the top-level web page of a web site. When a web-site is opened, its home page is displayed.
2. Web Portal: It is a web site, which hosts other web sites. In other words, a web portal has hyperlink to many other
web sites. By clicking upon these links, the corresponding web sites can be opened.
URL
HTTP uses internet addresses in a special format called uniform resource locator.
URL’s looks like type://address/path
Example: http://www.pue.kar.nic.in/results.asp
1. Electronic Data interchange (EDI): EDI is the electronic interchange of business information using a
standardized format.
2. e-mail
Web designing
Structure of HTML
<html>
<head>
<title>My First Webpage</title>
</head>
<body>
This is my first homepage. <b>This text is bold</b>
</body>
</html>
Text Layout Tags:
Tag Description
<p> Defines a paragraph
<center> Aligns text to center
<br> Brea k a line and starts new line
Tag Description
<b> Defines bold text
<big> Defines big text
<i> Defines italic text
<small> Defines small text
superscripted
<sup> Defines text
<sub> Defines subscripted text
<tt> Defines teletype text
<u> Deprecated. Use styles instead
Marquee tag: This tag is used to scroll the text information with the following syntax
<marquee>san</marquee>
Table Tag
Table Tags Description
<table> Defines a table
<th> Defines a table header
<tr> Defines a table row
<td> Defines a table cell
<caption> Defines a table caption
<colgroup> Defines groups of table columns
<col> Defines the attribute values for one or
more columns in a table
FORMS
Forms are placed in your document using a <FORM> tag which must have a closing </FORM> tag. You can have more
than one form in a document as long as they don’t overlap. I.e. one form must finish before the next one begins. A
<FORM> tag specifies two main things.
1. Select
The <select> element defines a drop-down list
2. text area
3. Input
The <input> element can be displayed in several ways, depending on the type attribute.
Web hosting
Web Hosting is a means of hosting web-server application on a computer system through which electronic
content on the Internet is readily available to any web-browser client
1. Free Hosting: This type of hosting is available with many prominent sites that offer to host some web
pages for no cost.
2. Virtual or Shared Hosting: This type of hosting is provided under one's own domain name,
3. Dedicated Hosting: In this type of hosting, the company wishing to go online rents an entire web
server from the hosting company.
4. Co-location Hosting: For those who do not fit the dedicated- server mold, hosting companies offer a
similar, but less restrictive hosting, known as co-location hosting.
XML
XML is aeXtended Markup Language
XML is a text-based markup language used for data interchange on the web.
XML document is always constrained to be well formed.
The most important is that every tag has a closing tag
-oOo-