You are on page 1of 74

A

TRAINING REPORT
TO
STUDY
THE

MTNL SYSTEMS

Submitted By: Project Guide:


Ankita Agarwal Muneesh
Gogia
B.E. (IInd Year) DGM – IT
Computer Science & Engg. MTNL, Delhi
Mody Institute of Technology
& Science (MITS)
ACKNOWLEDGEMENTS

The completion of this training would have been impossible without the help of
several people inside and outside MTNL, Delhi.

I wish to express my deepest gratitude for Mr. Muneesh Gogia, DGM-IT, MTNL
for giving me the opportunity to do the project in his division (GM-IT Department).
I am thankful to him as without his help and guidance it would not have been
possible to complete this project, and would sincerely acknowledge him for the
suggestions and comments he gave me for the development and improvement of
this project. I would like to thank him for his pleasant and insightful interaction
with me.

I am extremely grateful to Mrs. Sushma Gupta, STO (Senior Training Officer),


Janak Puri, MTNL for providing me the opportunity to conduct my vocational
training at MTNL. Her patient and cheerful pushing and stimulating me with
added encouragement at regular intervals and beneficent contributions helped
me in the successful completion of the project on time.

I would also like to thank Mrs. Renu Bhatia, JTO (Junior Training Officer), Janak
Puri, MTNL and staff members inside and outside MTNL who were extremely
accommodating and generous to share their valuable knowledge and resources
with me and showed utmost cooperation and understanding

It gave me immense pleasure being around and learning from MTNL.

Ankita Agarwal
Mody Institute of Technology and Science (MITS)
CONTENTS

S.NO DESCRIPTION PAGE NO.

1. MAHANAGAR TELEPHONE NIGAM LIMITED 4


2. INTRODUCTION 6
3. COMMUNICATION AND NETWORKING ELEMENTS 7
4. DATABASE CONCEPTS 20
5. METHODOLOGY 27
6. MTNL SYSTEMS 40
7. MTNL SYSTEMS SOFTWARE 45
8. REFERENCES 54
9. APPENDIX – PROGRAM LISTING 55
Page 4 of 75
MAHANAGAR TELEPHONE NIGAM LIMITED
1.1 CORPORATE OBJECTIVES

 To sustain the existing customer base and services.


 To provide latest technology and services to the computers.
 To achieve the highest level of customer satisfaction
 To fund research and development projects which will help MTNL in
introducing the technology, understanding the customer needs, trying out
and indigenizing the new technologies
 To diversify in areas for providing telecom services at national and
international levels
 To provide convergence of telecom, information technology and related
services
 To improve productivity by training and redeployment of manpower
 To work for social benefits

1.2 THE COMPANY

MTNL was founded on the 1st April 1986 by Government of India to upgrade the
quality of telecom services, expand the telecom network, and introduce new
services and to raise revenue for telecom development needs of India’s key
metros Delhi, the political capital of India and Mumbai, the business capital of
India. In the past 15 years, the company has taken rapid strides to emerge as
India’s leading and Asia’s largest telecom operating companies. Besides having
a strong financial case, MTNL has achieved a market share of approximate 13%
of Indian telecommunication network with customer base of about 4.3 million
lines.

The company has also been at the forefront technology induction by converting
100% of its telephone exchange network into state of art digital mode.

The Government of India currently holds the 56.27% stake in the company. In
upcoming years, the company would not only consolidate the gains but would
also focus on new areas of enterprise viz. Joint Ventures for projects outside
India, entering into national long distance operation, widening the cellular
customer base, introducing CDMA-based WLL in Mumbai, setting up internet
and allied services on all India basis.

1.3 SERVICES

 PSTN
Plain old telephone services through digitalized public switched telephone
network with variety of phone plus services such as call waiting, call
Page 5 of 75
forwarding, time alarm, abbreviating dialing, dynamic STD, ISD locking,
answering machine, DID facility of EPABXs, etc.
 I – NET
Data service through X.25 based switched pubic data network called I –
NET. The network supports CCITT protocols and frame relay service with
vast range of facilities.

 ISDN
Integrated Services Digital Network (ISDN) to meet the requirements of
customers for voice data and video on one line, both in Basic Rate Access
(64 Kbps) and primary rate access (2Mbps)

 IN
Intelligent Network Services (IN – services) e.g. free phone, Premium rate
services, virtual card calling/account calling card, tele-voting, virtual
private network, and universal access network.

 GARUDA
Wireless in local loop (WLL): services offered are both in fixed mode as
well as portable mode (Mobile).

 CELLULAR MOBILE SERVICE


GSM based cellular mobile service with advanced features and value
added, services like auto roaming, pre paid, voice mail, short message
service, multi party conference, closed user group, etc.

 LEASED LINE SERVICE


For voice and data with local, national and international connectivity on
point-to-point basis.

1.4 INFORMATION TECHNOLOGY

IT support is essential to implement effective business strategies. A business has


to co-ordinate on entire supply chain process and corresponding information
flow. MTNL being a service organization is reaching out to its customers with a
customer focused strategy for better information about customer profiles.

The whole world is witnessing convergence of technologies evolved by


Information Technology, voice and data services like call centers, internet, e-
commerce, intelligent network, personalized services, network management, etc.
are required as single window solution.

MTNL has recognized that IT is the key to future business success. IT has been
implemented as the backbone for running customer friendly services. Several IT
systems such as CSMS (Customers Service Management System), DQ
Page 6 of 75
(Directory Enquiry), FRS (Fault Repair Service), FMS (Financial Management
System), IVRS (Interactive Voice Response Service) and Accounting and Billing
Systems are already operational at MTNL.
Page 7 of 75
INTRODUCTION
Information is processed data required to manage an organization or its
functions. An Information System may be defined as a system which gathers and
processes data by performing arithmetic operations on them or by applying
appropriate rules such as sorting, merging, selection, matching, filtering, etc. it
may be a manual system or a computer based information system. The
increasing size of organizations is resulting in large volumes of data. Hence the
manual systems are being fast replaced by the computer-based information
systems. These systems can handle huge volumes of data far beyond the
capabilities of the manual systems. The computer-base systems can process
data in many ways to meet the different requirements of the organization.
However the most distinguishing feature of these systems is the high processing
speed resulting in timeliness of information, which is of great importance in the
present world.

The computer based information systems utilize file based systems or databases
to store data so that they can be retrieved and processed as and when required.
The database systems are more popular due to data redundancy, data integrity
and security. In addition parts of one database may be used by different
application programs for different applications.

Systems in MTNL: IT Unit in MTNL is responsible for planning, development


and implementation of computer system related to the handling and
management of customer services and improvement in system efficiency. IT cell
was established in 1981 as a separate unit. Subsequently, keeping in line with
technology progression, changes were introduced. Over the years, IT cell has
made many strides. The IT cell of MTNL, Delhi unit has established extensive
computing and processing systems and capabilities to assist in the operation and
processing of services as well as to enhance customer care and efficiency. The
mission critical applications for IT cell are:

 Fault Repair Services (FRS)


 Customer Service Management System (CSMS)
 Directory Management System (FMS)
 Financial Management System (FMS)
Page 8 of 75

COMMUNICATION AND NETWORKING


ELEMENTS
There are three basic networking elements used in MTNL. They are:

 LAN BRIDGE
 SWITCH
 LTS (Line Terminal Server)

3.1 LAN BRIDGE

A bridge is a LAN interconnection device which operates at the data link layer
(layer 2) of the OSI reference model. I may also be used to join two LAN
segments (A, B), constructing a larger LAN. Bridges were first specified in IEEE
802.1O (1990) and later by ISO (in 1993).

Six basic reasons of using a bridge:

• Many universities and corporate departments have their own LANs,


primarily to connect their own personal computers, workstations, and
servers. Since the goals of different departments differ, different
departments choose different LANs, without regard to what other
departments are doing. Sooner or later, there is a need for interaction, so
bridges are needed.
• The organization may be geographically spread over several buildings
separated by considerable distances. It may be cheaper to have separate
LANs in each building and connect them with bridges and infrared links
than to run a single coaxial cable over the entire site.
• It may be necessary to split what is logically a single LAN into separate
LANs to accommodate the load. At many universities, for example,
thousands of workstations are available for student and faculty computing.
Files are normally kept on file server machines, and are downloaded to
users’ machines upon request. The enormous scale of this system
precludes putting all the workstations on a single LAN-the total bandwidth
needed is far too high. Instead multiple LANs connected by bridges are
used. Each LAN contains a cluster of workstations with its own file server,
so that most traffic is restricted to a single LAN and does not add load to
the backbone.
• In some situations, a single LAN would be adequate in terms of load, but
the physical distance between the most distant machines is too great
(e.g., more than 2.5 km for 802.3). Even if laying the cable is easy to do,
the network would not work due to the excessive long round-trip delay.
The only solution is to partition the LAN and install bridges between the
Page 9 of 75
segments. Using bridges, the total physical distance covered can be
increased.
• There is the matter of reliability. On a single LAN, a defective node that
keeps outputting a continuous stream of garbage will cripple the LAN.
Bridges can be inserted at critical places, like fire doors in a building, to
prevent a single node which has gone berserk from bringing down the
entire system. Unlike a repeater, which just copies whatever it sees, a
bridge can be programmed to exercise some discretion about what it
forwards and what it does not forward.
• Bridges can contribute to the organization’s security. Most LAN interfaces
have a promiscuous mode, in which all frames are given to the
computer, not just those addressed to it. Spies and busybodies love this
feature. By inserting bridges at various places and being careful not to
forward sensitive traffic, it is possible to isolate parts of the network so that
its traffic cannot escape and fall into the wrong hands.

The format of PDU at this layer in an Ethernet LAN is defined by the Ethernet
frame format (also known as MAC – Medium Access Control). Before going into
more details first let us know about some important terms:

3.1.1 Ethernet

The IEEE 802.3 standard is for a 1-persistent CSMA/CD LAN. To review the
idea, when a station wants to transmit, it listens to the cable. If the cable is busy,
the station waits until it goes idle; otherwise it transmits immediately. If two or
more stations simultaneously begin transmitting on an idle cable, they will collide.
All colliding stations then terminate their transmission, wait a random time, and
repeat the whole process all over again.

The history of 802.3 standard starts from the beginning of the ALOHA system
constructed to allow radio communication between machines scattered over the
Hawaiian Islands. Later, carrier sensing was added, and Xerox PARC built a
2.94-Mbps CSMA/CD system to connect over 100 personal workstations on a 1-
Km cable. This system was called Ethernet after the luminiferous ether, through
which electromagnetic radiation was once thought to propagate. The Xerox
Ethernet was so successful that Xerox, DEC and Intel drew up a standard for a
10-Mbps Ethernet. This standard formed the basis for 802.3.

Ethernet refers to the cable. Five types of cabling are commonly used. 10Base5
cabling, popularly known as thick Ethernet, came first. It operates at 10 Mbps,
uses baseband signaling and can support segments of up to 500 meters.

Second was 10Base2 or thin Ethernet which bends easily. Thin Ethernet is much
cheaper and easier to install but it can run for 200 meters and can handle only 30
machines per cable segment.
Page 10 of 75
Third is 10Base-T. In this scheme all stations have a cable running to a central
hub. Usually these wires are telephone company twisted pairs.
A forth cabling option for 802.3 is 10Base-F, which uses fiber optics. This
alternative is expensive due to the cost of the connectors and terminators, but it
has excellent noise immunity and is the method of choice when running between
buildings or widely separated hubs.

3.1.2 MAC Sublayer

In any broadcast network, the key issue is how to determine who gets to use the
channel when there is competition for it. When only a single channel is available,
determining who should go next is much harder. Many protocols or solving the
problem are known.

In literature, broadcast channels are sometimes referred to as multiaccess


channels or random access channels. The protocols use to determine who goes
next on a multiaccess channel belong to a sublayer of the data link layer called
the MAC (Medium Access Channel) sublayer. The MAC sublayer is especially
important in LANs, nearly all of which use a multiaccess channel as the basis of
their communication. It consists of two 6 byte addresses and a one byte protocol
ID/ length field. The address field allows a frame to be sent to single and groups
of stations. The MAC protocol is responsible for access to the medium and for
the diagnosis of failure in either the medium or the transceiver which attaches to
the medium.

3.1.3 Logical Link Control (LLC)

There are also systems in which an error-controlled, flow-controlled data link


protocol is desired. IEEE has defined one that can run on top of all the 802 LAN
and MAN protocols. In addition, this protocol, called LLC (Logical Link Control),
hides the differences between the various kinds of 802 networks by providing a
single format and interface to the network layer. This format, interface, and
protocol are all closely based on OSI. LLC forms the upper half of the data link
layer, with the MAC sublayer below it.

Typical usage of LLC is as follows. The network layer on the sending machine
passes a packet to LLC access primitives. The LLC sublayer then adds an LLC
header, containing sequence and acknowledgement numbers. The resulting
structure is then inserted into the payload field of an 802.x frame and transmitted.
At the receiver, the reverse process takes place.

LLC provides three service options: unreliable datagram service,


acknowledgement datagram service, and reliable connection-oriented service.
The LLC header is based on the older HDLC protocol. A variety of different
formats are used for data and control. For acknowledged datagram or
connection-oriented service, the data frames contain a source address, a
Page 11 of 75
destination address, a sequence number, an acknowledgement number, and a
few miscellaneous bits. For unreliable datagram service, the sequence number
and acknowledgement numbers are omitted.

Network layer
Packet

Data LLC LLC Packet


link
layer MAC MAC LLC Packet MAC

Physical layer Network


(a) (b)
(a) Position of LLC. (b) Protocol formats

3.1.4 Operation of a simple two-port bridge

Host A has a packet to send. The packet descends into the LLC sublayer and
acquires an LLC header. Then it passes into the MAC sublayer and an 802.3
header is prepended to it. This unit goes out onto the cable and eventually is
passed up to the MAC sublayer in the bridge, where the 802.3 header is stripped
off. The bare packet (with LLC header) is then handed off to the LLC sublayer in
the bridge. A bridge connecting k different LANs will have k different physical
layers, one for each type.

3.1.5 Operation of a bridge

The simplest type of bridge, and that most frequently used is the Transparent
Bridge (meaning that the nodes using a bridge are unaware of its presence). The
bridge therefore has to forward (receive and subsequently transmit) frames from
one LAN (e.g. LAN A below) to another (e.g. LAN B). Obviously, the bridge could
forward all frames, but then it would behave rather like a repeater; it would be
much smarter if the bridge only forwarded frames which need to travel from one
LAN to another. To do this, the bridge needs to learn which computers are
connected to which LANs. More formally, it needs to learn whether to forward to
each address.
BRIDGE

LAN A LAN B

Comp X Comp Y Comp Z


Page 12 of 75

A Bridge connecting two LAN segments (A&B)

To learn which addresses are in use, and which ports (interfaces on the bridge)
theory is closest to, the bridge observes the headers of received Ethernet
frames. By examining the MAC source address of each received frame, and
recording the port on which it was received, the bridge may learn which
addresses belong to the computers connected via each port. This is called
“learning”. In the figure above, consider three computers X, Y, Z. Assume each
sends frames to the other computers. The source address X, Y are observed to
be on network A, while the address of computer Z will be observed to be on
network B.

The learned addresses are stored in the interface address table associated with
each port (interface). Once this table has been setup, the bridge examines the
destination address of all received frames; it then scans the interface tables to
see if a frame has been received from the same address, i.e., a packet with a
source address matching the current destination address. Three possibilities
exist:

ADDRESS TABLE FILTER TABLE ADDRESS TABLE

DATA LINK LAYER

PHYSICAL PHYSICAL

LAN LAN

A bridge stores the hardware addresses observed from frames received by each
interface and uses this information to learn which frames need to be forwarded
by the bridge

1. If the address is not found, no frames have been received from the
source. The source may not exist, or it may not have sent any frames using
this address. (The address may also have been deleted by the bridge
because the bridge software was recently restarted, ran short of address
entries in the interface table, or deleted the address because it was too old).
Since the bridge does not know which port to use to forward the frame, it will
send it to all output ports, except that on which it was received. It is clearly
unnecessary to send it back to the same cable segment from which it was
received, since any other computer/bridge on this cable must already have
received the packet. This is called flooding.
Page 13 of 75
2. If the address is found in an interface table and the address is associated
with the port on which it was received, the frame is discharged. (It must
already have been received by the destination.)

3. If the address is found in an interface table and the address is not


associated with the port on which it was received, the bridge forwards the
frame to the port associated with the address.

Packets with a source of X and destination of Y are received and discarded,


since the computer Y is directly connected to the LAN A, whereas packets
from X with a destination of Z are forwarded to network B by the bridge.

3.1.6 Routing

LANs can also be connected with each other or with wide-area networks using
more sophisticated devices called routers. These provide fairly advanced routing
functions at the network layer, possibly including adaptive and multiple-path
routing.

Conceptually, one may view an interconnected network of subnetworks as a


single large network, where the interfaces (gateways, bridges, or routers) are
additional nodes, each connected to two or more of the constituent subnetworks.
Routing based on this conceptual model is called nonhierarchical and is similar
to routing in a wide area network. It is also possible to adopt a coarser-grain view
of an interconnected network of subnetworks, whereby each subnetwork is
considered to be a single node connected to interface nodes. Routing based on
this model is called hierarchical, and consists of two levels. At the lower level,
there is a separate routing algorithm for each subnetwork that handles local
subnetwork traffic and also directs internetwork traffic to the subnetwork’s
interface with other subnetworks. At the higher level, there is a routing algorithm
that determines the sequence of subnetworks and interface nodes that each
internetwork packet must follow. Basically, the low-level algorithms handle “local”
packets, and the high-level algorithm delivers “long-distance” packets to the
appropriate low-level algorithm.

The main drawbacks of the nonhierarchical approach: the size of the routing
tables and the calculations to update them may become excessive. In the
hierarchical approach, the size of the routing tables and the calculations to
update them are considerably reduced over the nonhierarchical approach. In
fact, the hierarchical approach may be recommended for a single large network
(no internetworking) to reduce the routing algorithm’s overhead and storage. The
disadvantage of the hierarchical approach is that it may not result in routing that
is optimal for the entire internetwork with respect to a shortest path or some other
criterion. Hierarchical networks may be organized in more than two levels. For
example, consider an international network interconnecting several national
networks. In a three-level hierarchy, there could be a routing algorithm between
Page 14 of 75
countries at the middle level, and a routing algorithm between cities of each
country at the middle level, and a routing algorithm within each city at the owes
level.

The performance of a local area network tends to degrade as its number of users
increase. In the case of Ethernet-based LANs the performance also degrades as
the ratio of propagation delay to transmission capacity increases. A remedy is to
connect several LANs so that a large geographical area with many users can be
covered without a severe performance penalty.

Routing for interconnected LANs has a special character because LANs operate
in a “promiscuous mode,” whereby all nodes, including the interface nodes
connected to a LAN, hear all the traffic broadcast within the LAN. Furthermore, in
a LAN internetwork, interface nodes must be fast and inexpensive, consistent
with the characteristics of the LANs connected. This has motivated the use of
simple, fast, and relatively inexpensive bridges. A bridge listens to all the packets
transmitted within two or more LANs through connections known as ports. It also
selectively relays some packets from one LAN to another. In this way, packets
can travel from one user to another, going through a sequence of LANs and
bridges.

An important characteristic of bridges is that they connect LANs at the MAC


sublayer. The resulting internetwork is, by necessity, nonhierarchical, referred to
as extended LAN. Bridges use special routing techniques, the two most
prominent of which are known as spanning tree routing and source routing.

3.1.7 Features of LAN Bridge at MTNL

 Provides MAC Level Data Link (Layer 2) connection between two peered
10BaseT Ethernet LANs.
 Operates transparently to higher level protocols such as TCP/IP, DECnet,
NETBIOS and IPX
 PPP (Point to Point Protocol, RFC 1661) with Bridge Control Protocol
(RFC 1638)
 Automatically learns, loads and removes MAC addresses
 Point-to-Point Connectivity over 2-Wire mDSL up to 10km
 NetLink Plug-and-Play Slave
 HTTP/SNMP Manageable as CP (Customer Premises) Unit with 1095RC
CO (Central Office) Rack Card
 Internal or receive recovered clocking between units
 LED indicators for 10BaseT Link, DSL Link, Status, No Signal, Error and
Test Mode

Bridges are devices that allow interconnection of local networks with common
protocols – thus extending similar network services geographically. Bridges allow
interconnection of local networks that have different media or different access
Page 15 of 75
methods. Bridges do not perform protocol or code conversion but do perform
speed conversion and support flow control. Bridges link local networks that have
the same high – level protocols up to the network layer of the seven – layer
International Organization for Standardization’s Open Systems Interconnection
model.

3.2 SWITCHES (MULTIPLE PORT BRIDGES)

A bridge with more than two interfaces (ports) is also known as a switch. There
are important differences between switches and hubs, in particular, the way in
which they forward frames.

B
A C

H HUB D

G E
F

A Hub sending a packet from F to C

A hub (or repeater) forwards a received frame out of all the interfaces (ports),
resulting in the frame reaching all connected equipments, even though the frame
may be only destined for a system connected to one particular interface (C, in
the above diagram).

A switch, on the other hand, forwards the frame to only the required interface.
The switch learns the association between the systems MAC addresses and the
interface ports in the same way as a bridge. By sending the packet only where it
need to go, the switch reduces the number of packets on the other LAN
segments (and hence the load on these segments), increasing the overall
performance of the connected LANs. The switch also improves security, since
frames only travel where they are intended (and can not in this case, for
instance, be observed by an unauthorized computer attached to segment A).
Page 16 of 75

A
H B

G SWITCH C

F D
E

A Switch sending a packet from F to C

Switches (like bridges) normally forward all multicast and broadcast packets to all
receivers (some switches have extra processing to help improve the
performance of multicast forwarding).

B
A C

H SWITCH D

G E
F

A Switch sending a frame from F to a multicast / broadcast address

3.2.1 Connecting Bridges and Switches together

There is a special rule controlling the interconnection of bridges and switches (as
there is for Ethernet hubs). The rule says simply, that a bridge/switch/hub LAN
must form a tree, and not a ring. That is, there must be only one path between
any two computers. If more than one parallel path were to exist, a loop would be
formed, resulting in endless circulation of frames over the loop. This would soon
result in overload of the network. To prevent this happening, the IEEE (in IEEE
802.1D) has defined the Spanning Tree Algorithm (STA) which automatically
detects loops and disables one of the parallel paths. The Spanning Tree
Algorithm may also be used to build fault-tolerant networks, since if the chosen
Page 17 of 75
path becomes invalid (e.g. due to cable/bridge/ switch fault) and an alternate
path exists, the alternate path is enabled automatically.

3.2.2 Managed 10/100 Mbps Routing Switch at MTNL

The switch combines Layer 2 and Layer 3 switching capabilities together. It


incorporates IP routing, which is very fast as it’s processed by the on-board ASIC
chips, instead of by the CPU as routers normally do.

This switch provides greater Internet connectivity at school or at the office,


enabling more users to work on the Web from their desktops. With intelligent
traffic management, this switch also allows us to specify port bandwidth and
priority queues for streaming media and high priority classes of traffic.

With Layer 2/3 support for every port, we can customize filters based on the
physical MAC addresses of the user computers to filter unnecessary traffic, as
well as routing routes based on user IP numbers to route traffic to destinations.

 802.3x Flow Control at full duplex provide high-speed data pipes to


servers with minimum data transfer loss.
 VLANs allow us to set broadcast domains, segment network traffic and
improve performance and manageability.
 Port Trunking lets us combine up to 8 10/100Mbps ports into a trunk to
create a 1600Mbps full duplex aggregated bandwidth.
 802.1p Traffic Priority Queuing allows us to queue critical traffic for
video-conference and multimedia applications.
 Multicast allows us to control the traffic to increase network performance.
 802.1D Spanning Tree Protocol allows us to configure the switch in a
network with redundant backup bridge paths.

3.2.3 Key Features of Switch at MTNL

 24 10/100Mbps ports
 1 open slot for 2 optional Gigabit ports
 Customizable filters based on MAC and IP addresses
 RIP-1, RIP-2 routing protocols
 QoS support based on traffic prioritization and queuing mechanism
 802.3x Flow Control, VLANs, port trunking
 802.1 D Spanning Tree
 SNMP/web-based management, RMON monitoring
 TFTP firmware upgradeable
 Telnet configuration
 Redundant backup power supply support to maximize network uptime
Page 18 of 75

3.2.4 Technical Information

 1 MDI/MDIX uplink (shared with 1 10/100Mbps port)


 RS – 232 console port
 Switching method: store-and-forward
 MAC address table: 8K entries per device
 IP address routing table: 2K entries per device
 RAM buffer: 16MB per device
 Internal universal power supply
 Socket for redundant power supply connection
 Standard 19-inch rack-mount size
 EMI: FCC Class A, CE Class A, C-Tick, VCCI Class A, BSMI Class A
 Safety; UL, TUV

3.3 LTS (LINE TERMINAL SERVER)

3.3.1 Introduction

VXL’s Terminal Server TS 3010 is a low cost, high performance, compact LAN
processor which provides interconnection of multi-vendor systems and devices
over an Ethernet. It supports sixteen serial peripheral devices as well as a
parallel printer over a parallel port.

Sited remotely from a mainframe or a micro/mini computer and connected over


an Ethernet network, it significantly reduces cabling complexity by allowing
clusters of terminals, modems, printers and other devices to be connected to a
single unit. Multiple hosts are accessed from a single terminal and running
multiple sessions allows simultaneous activities on same or different hosts.

The Terminal Server increases the cost-effectiveness and flexibility of your


network configuration. Additional terminals can be added at marginal extra cost
and to seemingly un-expandable systems.

Use of today’s Industry LAN standards, Ethernet (thick, thin and twisted-pair) and
TCP/IP with TELNET protocols, ensures full compatibility with a wide range of
computers and systems, and other TCP/IP implementations.

3.3.2 Features of LTS at MTNL

 16 serial ports with RJ45 connectors with speed upto 115 KB


 Supports 10Base-5 and 10Base-2 Ethernet interfaces
 Built-in parallel port for Centronics and Data products
 Supports one session per port and allocation of 48 dynamic sessions
 Supports SLIP/PPP at high speed for LAN/WAN applications
Page 19 of 75
 Static route settings (four routes can be stored)
 Full modem support on all 16 ports with dial-back facility.
 Dial – In
 Dial – out
 Call-back security
 Script Login to any host to UUCP on UNIX systems
 On-demand dialing
 Static host name mapped to IP address (four settings can be
stored)
 Supports DNS feature
 Supports PAP & CHAP feature for user authentication
 Supports Ping feature
 Dynamic SLIP/PPP configuration
 19” rack mountable
 Different SLIP/PPP address allocation for different ports
 Supports CSLIP/VJC-PPP
 Supports SNMP & RIP protocols
 Option available to increase dynamic sessions above 64
 Proven Connectivity
 IBM RS6000 with AIX
 IBM AS400 servers with AIX
 DDE ORG Supermax with SVR 4
 NCR Globalyst with SVR 4
 SUN-3 / SUN-4 ultra sparc server with SUN – OS
 NEC P-10 / P-20 series
 Wipro ACER
 Pentium with Microsoft TCP/IP
 PC with LAN workplace on DOS and MS windows
 Digital ASF 400/1000/2000 servers on OSF
 VAX with VMS TCP/IP
 HP 9000 series HP-UX
 SGI’s power challenge series
 Unisys 6000 series with SVR4
 ICIM DRS 3000/6000 with SVR4
 ICIM team server with SVR4
 Pentium with SCO-OPEN server
 AVIION server with DG_UX

3.4 TWISTED PAIR

For many applications an on-line connection is needed. The oldest and still most
common transmission medium is a twisted pair. A twisted pair consists of two
insulated copper wires typically about one mm thick. The wires are twisted
Page 20 of 75
together in a helical form just like a DNA molecule. The purpose of twisting the
wires is to reduce electrical interference from similar pairs close by.

The most common application of the twisted pair is the telephone system. Nearly
all telephones are connected to the telephone company office by a twisted pair.
Twisted pairs can run several kilometers without amplification but for longer
distances repeaters are needed. When many twisted pairs run in parallel for a
substantial distance such as all the wires coming from an apartment building to
the telephone company office they are bundled together and encased in a
protective sheath. The pairs in these bundles would interfere with one another if
it were not for the twisting. In parts of the world where telephone lines run on
poles above ground, it is common to see bundles several centimeters in
diameter.

Twisted pairs can be used for either analog or digital transmission. The
bandwidth depends on the thickness of the wire and the distance traveled, but
several megabits/sec can be achieved for a few kilometers in many cases. Due
to their adequate performance and low cost twisted pairs are widely used. There
are two types of twisted pair Shielded twisted pair (STP) and Unshielded twisted
pair (UTP).

Twisted pair Amplifiers or


repeaters
Signal

Signal
Page 21 of 75
Twisted – Pair Cable
Page 22 of 75
DATABASE CONCEPTS
4.1 INTRODUCTION

A database system is basically a computer based record keeping system. The


collection of data, usually referred to as the database, contains information about
one particular enterprise. It maintains any information that may be necessary to
the decision-making processes involved in the management of that organization.

A database may also be defined as a collection of inter related data stored


together to serve multiple applications; the data are stored so that they are
independent of programs which use the data; a common and controlled
approach is used in adding new data and in modifying and retrieving existing
data within the database. The intention of a database is that the same collection
of data should serve as many applications as possible. Hence, a database is
often conceived of as the repository of information needed for running certain
functions in a corporation or organization. Such a database would permit not only
the retrieval of data but also the continuous modification of data needed for
control of operations. It may be possible to search the database to obtain
answers to queries or information for planning purposes.

4.2 PURPOSE OF DATABASES

A database system should be a repository of the data needed for an


organization’s data processing. That data should be accurate, private, and
protected from damage. It should be organized so that diverse applications with
different data requirements can employ the data. Different application
programmers and different end users will have different views of the data which
must be derived from a common overall data structure.

The ways in which end users want to utilize existing data will constantly change,
and in some cases demands for new uses of the data will arise rapidly or
urgently. The extent to which these demands can be satisfied determines the
overall value of the database system.

In a typical file processing system, permanent records are stored in various files.
A number of different application programs are written to extract records from
and add records to the appropriate files. But this scheme has a number of major
limitations and disadvantages, such as data redundancy (duplication of data),
data inconsistency, unsharable data, unstandardized data, insecure data,
incorrect data etc. A database management system s answer to all these
problems as it provides a centralized control of the data.
Page 23 of 75
4.3 ADVANTAGES OF DATABASE

 Databases reduce the data redundancy to a large extent


 Databases can control data inconsistency to a large extent
 Databases facilitate sharing of data
 Databases enforce standards
 Databases can ensure data security
 Integrity can be maintained through databases

4.4 DATABASE ABSTRACTION

A collection of interrelated files and a set of programs that allow users to access
and modify these files is known as a database management system .A major
purpose of a database system is to provide the users only that much information
that is required by them. This means that the system does not disclose all the
details, rather it hides certain details of how the data is stored and maintained. A
good database system ensures easy, smooth and efficient data structures in
such a way so that every type of database user: end user, application system
analyst, and physical storage system analyst, is able to access its desired
information efficiently.

Since the requirements of different users differ from one another, the complexity
of database is hidden from them, if needed; through several levels of abstraction
is order to simplify their interaction with the system.

4.4.1 Various Levels of Database Implementation

A database is implemented through three general levels: internal, conceptual and


external so as cater to the needs of its users.

1. Internal Level (Physical Level) : The lowest level of abstraction, the


internal level, is the one closest to physical storage. This level is sometimes
referred as physical level. It describes how the data are actually stored on the
storage medium. At this level, complex low-level data structures are
described in details.
2. Conceptual Level : This level of abstraction describes what data are
actually stored in the database. It also describes the relationships existing
among data. At this level, the database is described logically in terms of
simple data structures.
3. External Level (View Level) : This is the level closest to the users and is
concerned with the way in which the data are viewed by the individual users.
Most of the users of the database are not concerned with all the information
contained in the database. Instead, they need only a part of the database
relevant to them. To simply such users’ interaction with the system, this level
of abstraction is defined. The system thus provides many views for the same
database.
Page 24 of 75
4.5 DIFFERENT DATABASE MODELS

The three data models that are used for database management are:

 The Relational Data Model


 The Hierarchical Data Model
 The Network Data Model

4.5.1 The Hierarchical Data Model

This model was introduced in Information Management System (IMS) developed


by International Business Machine (IBM) in 1968. This model is like a
hierarchical tree structure, used to construct a hierarchical of records in the form
of nodes and branches. The data elements present in the structure have a
Parent-Child relationship. Closely related information in the parent-child structure
is stored together as a logical unit. A parent unit may have many child units, but
a child is restricted to have only one parent. This leads to the repetition of same
child record for different parents. The operations on a hierarchical database are
performed through a data manipulation language for hierarchical data model.
The operations that can be performed on hierarchical database include retrieval,
insertions, deletion, and modifications of records.

The drawbacks of this model are:


• The hierarchical structure is not flexible enough to represent all the
relationship proportions which occur in the real world
• It cannot demonstrate the overall data model for the enterprise because of
non-availability of actual data at the time of designing the data model
• It cannot represent many-to-many relationship
• The hierarchical model used only when the concerned data has a clearly
hierarchical character with a single root, for example the DOS directory
structure.

4.5.2 The Network Data Model

It is an improvement on the hierarchical model. Here multiple parent-child


relationship is used. Rapid and easy access paths to the data elements.
However, a network is more general structure than a hierarchy because a given
record occurrence may have any number of immediate superiors and
dependents we can have more than one, unlike hierarchical. The network
approach thus allows us to model a many-to-many correspondence.

In a network database, the collection of records is connected to one another by


means of links. By a link we mean that it is an association between precisely two
Page 25 of 75
records. In addition to the record types representing the suppliers and part
themselves, we introduce a third type of record, which we call the connector.

A connector occurrence represents the association between one supplier and


one part and contains the data describing the association. All connector
occurrence for a given supplier or part are placed on a chain starting and
retuning to that supplier or part.

Each connector thus has exactly two chains, one supplier and one part chain.

In networking data model, while mapping to files, links are implemented by


adding pointer fields to records that are associated via a link. Each record must
have one pointer field for each link with which it is associated. Transaction is
maintained using pointers and tracing the pointers is the drawback of this design.

The operations on a network database are performed through a data


manipulation language for network model. The operations that can be performed
on a network database, include find, insert, delete, modify etc. the inserting or
removing records involve connect, disconnect, and reconnect operations.

4.5.3 The Relational Data Model

Features

 Data is organized in terms of rows and columns in a table known as


relations.
 The position of a row in a table is of no importance.
 The intersection of row and column must give a single value and not a set
of values.
 All values appearing in the column are derived from the underlying
schema.
 Row must be unique
 Column Names must be unique
 All column values are atomic
 In relational databases, there are no hard-coded relationship
 Defined between tables. A relationship can be specified at any time using
any column name.
 Rows of relations are generally referred to as tuples and the columns are
usually referred to as attributes

There are no pointers in data to relate one table to another. The relationship
between two or more sets of data can be specified at the development time
rather than when the tables are first created. This greatly improves the flexibility
of database management system.
Page 26 of 75
The relational data model is based on a collection of tables (relations). The user
of the (relational) database system may query these tables, insert new tuples,
delete tuples, and modify tuples. There are several languages for expressing
these operations. One such language is relational query large. The relational
algebra is a procedural language that defines the basic operations used within
the relational query language.

Properties

A relational database management system (RDBMS) has the following


properties:
 Represents data in the form of tables
 Does not hard-code relationships between tables
 Does not require the user to understand its physical implementations.
 Provides information about its contents and the structure in system table
 Supports the concept of NULL values

Codd’s Rules (12 rules for RDBMS)

 Information representation
 Guaranteed access Systematic treatment of null values
 Data base description rule
 Comprehensive data sub-language
 View updating
 High-level update, insert, delete
 Physical data independence
 Logical data
 Independence
 The distribution rule
 Non-subversion
 Integrity rule

In addition to the 12 rules for RDBMS, there exists a rule, called rule zero, which
states that “a relational database system must be able to manage database
entirely through its relational capabilities. Any DBMS that advises user to some
non-relational methods to achieve acceptable performance should be interpreted
as an apology by the vendor.”

4.6 RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS)

The relational model was propounded by E.F.Codd of the IBM and has since
been acknowledged as a very important concept in DBMS (Data Base
Management System) technology. The relational model has established itself as
the primary data model for commercial data processing applications. Its success
Page 27 of 75
in this field has led to its application outside data processing in systems for
computer aided design and other environments.

4.6.1 Terminology

1. Relation
A relation is a table i.e., data arranged in rows and columns. It has following
properties:

 In any given column of a table, all items are of the same kind whereas
items in different columns may not be of the same kind.
 For a row, each column must have an atomic value.
 All rows of a relation are distinct.
 The ordering of rows within a relation is immaterial.
 The columns of a relation are assigned distinct names and the ordering of
these columns is immaterial.

2. Domain
A domain is a pool of values from which the actual values appearing in a given
column are drawn. A domain is said to be atomic if elements of domain are
considered to be indivisible units.

3. Tuple: The rows of tables are generally referred to as Tuples.

4. Attributes: The columns of tables are generally referred to as Attributes.

5. Degree
The number of attributes in a relation determines the degree of a relation. A
relation of n attributes is said to be a relation of degree n. Relations of degree
one are said to be unary, similarly relation of degree n are said to be n-ary.

6. Cardinality: The number of tuples in a relation is called the cardinality of


a relation.

4.6.2 Views

A view is a kind of table whose contents are taken from other tables depending
upon a condition. Views do not contain data of their own. The contents of a view
are determined by carrying out the execution of the given query.

The kinds of tables that we have come across with until now are called base
tables. These are the tables that actually contain data. There is another kind of
table, the view. Views are tables whose contents are derived from other tables.
There is no stored file created for storing the contents of a view. Rather only the
definition of a view is stored. Every time a view is referred to, its contents are
Page 28 of 75
derived from its underlying base tables using its stored definition. Thus a view is
also referred to as a virtual table.

4.6.3 Keys

It is important to be able to specify how rows in a relation are distinguished


conceptually, rows are distinct from one another, but from a database
perspective the difference among them must be expressed in terms of their
attributes. Keys are used here.

 Primary Key
Within a given relation, a set of one or more attributes having values that is
unique within the relation and thus is able to uniquely identify that tuple, is
said to be the primary key of the relation.
The primary key is nonredundant i.e., it does not have duplicate values in the
same relation.

 Candidate Key
All attribute combinations inside a relation that can serve as primary key are
candidate are candidate keys as they are candidates for the primary key
position.

 Alternate Key
A candidate key that is not the primary key is called an alternate key.
Page 29 of 75

METHODOLOGY
The basic tools used in this project are:

 VISUAL BASIC 6.0


 STRUCTURED QUERY LANGUAGE
 MICROSOFT ACCESS

5.1 VISUAL BASIC 6.0

5.1.1 Introduction

Visual Basic was released by Microsoft in 1991. Visual Basic was designed to be
a visually oriented programming language in contras to the popular parlances at
that time (Pascal, C, COBOL, and FORTRAN). Although Visual Basic is similar
to QBasic – the procedural language supplied with every version of MS-DOS
beginning with version 5.0 – it contains important extensions that make it more of
an object-oriented language.

Visual Basic 6.0 is an object-based language. It is capable of handling software


development projects of enormous scope and depth. One way of describing
Visual Basic’s nature is to say that when the computer programmer develops
programs in Visual Basic, data is more often than not approached as an object
rather than just numeric or text information. Data objects, like real-world objects,
such as desks and chairs, have properties.

Visual Basic is the most popular programming language for the world’s most
popular operating system. By encapsulating the complexities of the Windows
application program interface (API) into easily manipulated objects, Visual Basic
is the first language people consider when they want rapid application
development for the Windows environment. The capability of custom controls to
easily extend the language has made Visual Basic a popular choice for an
amazingly wide variety of programming tasks.

Several years ago, Visual Basic was a “small” language. Since its first release,
however, Visual Basic has evolved into a major development environment that
covers every aspect of programming, from educational applications to
databases, and from financial applications to Internet components. Visual Basic
6.0 is a remarkable product for application development. It is one of the first
development environments that frees programmer from mundane tasks and
allow them to concentrate on their ultimate goal, application development.
Because Visual Basic is a visual development environment (VDE), we do not
Page 30 of 75
have to write code (or make calls) to use standard interface elements such as
command buttons or list boxes. In fact, we can totally design the look of our
application and its windows without writing a single line of code.

5.1.2 What is Visual Basic?

The “Visual” part refers to the method used to create graphical user interface
(GUI). Rather than writing numerous lines of code to describe the appearance
and location of interface elements, we simply add pre build objects into place on
screen.

Visual Basic is a high level programming language evolved from the earlier DOS
version called BASIC. BASIC means Beginners’ Al-Purpose Symbolic Instruction
Code. It is fairly easy programming language to learn. The code looks a bit like
an English language text. Different software companies produced different
versions of BASIC, such as Microsoft QBASIC, QUICKBASIC, GWBASIC,
IBMBASIC and so on. VISUAL BASIC is an event driven programming. A Visual
Basic program is made up of many subprograms, each has its own program
code, and each can be executed independently and at the same time each can
be linked in one way or in other.

Visual Basic is a Microsoft Windows programming language. Visual Basic


program are created in an Integrated Development Environment (IDE). The IDE
allows a programmer to create, run and debug Visual Basic programs
conveniently. IDE allows a programmer to create working programs in a fraction
of time that it would normally take to code the program without IDE. Visual Basic
is the world’s most widely used RAD language.

5.1.3 The Visual Basic IDE

The Visual Basic 6.0 interface is a multiple document interface (MDI). Several
windows open, but only within a main parent window. This gives Visual Basic a
look similar to that of Word or Excel. In these applications we can have multiple
windows open, but they all reside in the main application window. Other key
features of the Visual Basic 6.0 include the following:

 New Project Dialog Box


When we start a new project we can choose the type of project from the
following options available by clicking the New tab in the project dialog box.

Standard EXE ActiveX EXE


ActiveX DLL ActiveX Control
VB Application Wizard VB Wizard Manager
Data Project IIS Application
Add In ActiveX Document DLL
ActiveX Document EXE DHTML Application
Page 31 of 75
VB Entreprise Edition Controls

We also have the option of selecting a project from the existing or recent tab
in the dialog box.
 Project Explorer
The window titled Project is the Project Explorer, which displays the
components of the project. The project components are organized in folders,
and the Project window is called Project Explorer because it has the look of
the Windows Explorer.

 Properties Window
The Properties Window contains the property settings for the selected control.
Properties are attributed of an object, such as its size, caption, and color. We
can adjust the appearance of the controls on the Form with point-and-click
operations.

 From Layout
We use the Form Layout window to determine the initial positions of the
Forms in your application. We can move Forms around and place them on
top of each other. This window is useful in applications that use multiple
Forms because we can specify how each Form is positioned with respect to
the main Form.

 Form Designer Window / Code Window


The Form Designer is the main window in the middle of the screen, and in it
we can design and edit the application’s user interface. The Form Designer
displays two windows for each Form:
The Form itself (the elements of the visible user interface)
A Code window (the code behind the elements of the Form)
The code window is the area we can write the code needed by our
application. The code window includes Auto Statement Builder, which
displays a drop-down list of properties available for the control we are working
with. The code window also provides Auto Quick Info, which displays the
syntax for statements and functions.

 Immediate Window
The Immediate window is a debugging aid. While an application is running,
we can stop it and use the Immediate window to examine or change the
values of the application’s variables and to execute Visual Basic commands
in the Immediate mode. This is a very versatile tool and one of the reasons
for the popularity of Visual Basic.

 Toolbox
The toolbox contains the icons of the controls we can place on a Form to
create the application’s user interface. To place a control on a Form, we first
select it with mouse and then move the mouse over the Form.
Page 32 of 75

 Object Browser
The Object Browser includes a description pane that reminds us of the
purpose of particular objects and lets us go to an element’s library or object.
5.1.4 Visual Basic and Database Management

Nearly all business applications need to store large volume of data, organized in
a format that simplifies retrieval. Visual Basic provides a wealth of tools for
creating and accessing databases on both individual machines and networks.
The two major tools are:

• The Data Control


The Data control gives access to database with very less programming.
We can set a few properties of the control and use the regular controls
such as textboxes to display the values of the fields in the database.

• The Data Access Object (DAO)


The Data Access Object is a structure of objects for accessing databases
through code. All the functionality of Data control is also available to the
code through DAO.

5.1.5 The Data Control

Properties

 DatabaseName specifies the database to be used


 RecordSource specifies the part of the database seen by the control
 DataSource is the name of a Data control through which the controls
such as textbox or checkbox are bound to a Data Control.
 DataField is the name of a field in the RecordSet that the control displays
and updates.
 EOF property returns a True/False value that indicates whether the
current record position is after the last record in a RecordSet object.
 BOF property returns a True/False value that indicates whether the
current record position is before the first record in a RecordSet object.
 ReadOnly property returns or sets a value that determines whether the
control’s RecordSet is opened for read-only access.
 RecordsetType property returns or sets a value indicating the type of
RecordSet object we want the Data Control to create. It can be of 3 types
=> Dynaset: updatable view of data
=> SnapShot: static (read-only) view of data
=> Tables: direct view of tables
 Bookmark property is a variant that identifies a row in the RecordSet.
Each row has its own, unique bookmark that isn’t related to the record’s order
in the RecordSet. This is used to retrieve a particular record from RecordSet.
Page 33 of 75

Methods
The built-in functionality of the Data control can be accessed through an
application’s code with the Data control’s methods.
 MoveFirst repositions the control to the first record.
 MoveLast repositions the control to the last record.
 MovePrevious repositions the control to the previous record
 MoveNext repositions the control to the next record.
 FindFirst finds the first record that meets the specified criteria.
 FindLast finds the last record that meets the specified criteria.
 FindNext finds the next record that meets the specified criteria.
 FindPrevious finds the previous record that meets the specified criteria.
 AddNew appends a record to the table
 Delete deletes the current record
 Update writes the current record to the database.
 Refresh reloads the data from the database (refreshes the RecordSet)

5.2 STRUCTURED QUERY LANGUAGE

5.2.1 Introduction

The Structured Query Language is a language that enables us to create and


operate on relational databases, which are sets of related information stored in
tables. SQL has proved to be a standard language as it allows users to learn one
set of commands and use it to create, retrieve, alter and transfer information
regardless of whether they are working on a PC, a workstation, a mini or a
mainframe. The original version of this language was developed at IBM’s San
Jose Research Laboratory. This language, originally called Sequel, was
implemented as part of the System R project in early 1970s. The Sequel
language has evolved since then, and its name has changed to SQL. In 1986,
the American National Standards Institute (ANSI) published an SQL standard
that was update again in 1992.

5.2.2 Processing Capabilities of SQL

1. Data definition language (DDL) : The SQL DDL provides commands for
defining relation schemas, deleting relations, creating indexes, and modifying
relation schemas.
2. Interactive data manipulation language (DML) : The SQL DML includes
a query language based on both the relational algebra and the tuple relational
calculus. It includes also commands to insert, delete and modify tuples in the
database.
3. Embedded data manipulation language : The embedded form of SQL is
designed for use within general purpose programming languages such as
PL/1,COBOL , FORTRAN, Pascal and C.
Page 34 of 75
4. View definition : The SQL DDL also includes commands for defining
views.
5. Authorization : The SQL DDL includes commands for specifying access
rights to relations and views.
6. Integrity : The SQL provides forms of integrity checking.
7. Transaction Control : SQL includes commands for specifying the
beginning and ending of transactions along with commands to have a control
over transaction processing.

5.2.3 Various SQL Commands and Functions

The SQL provides a predefined set of commands that help us work on relational
databases.

Keywords are words that have a special meaning in SQL. They are instructions.
Commands and Statements are instructions given to a database.
Commands consist of one or more logically distinct parts called clauses.
Arguments complete or modify the meaning of a clause. Objects are
structures in the database that are given names and stored in memory. They
include base tables, views and indexes.

CREATE TABLE Command

Tables are defined with the CREATE TABLE command. When a table is created,
its columns are named; data types and sizes are supplied for each column. Each
table must have at least one column.
The syntax of CREATE TABLE command is:
CREATE TABLE <table-name>
(<column name> <data type> [(<size>)],
<column name><data type> [(<size>)…..]);
When we create table we can place constraints on the values that can be
entered into its fields. The two basic types of constraints are column constraints
and table constraints. The basic difference between the two is that column
constraint is applied only to a column where as table constraint is applied to one
or more columns.

Different constraints
These constraints ensure database integrity, thus are sometimes called
database integrity constraints. They are:

• Unique constraints
This constraint ensures that no two rows have the same value in the
specified columns.

• Primary key constraints


Page 35 of 75
This constraint declares a column as the primary key of the table. This
constraint is similar to unique constraint except that only one column can
be applied in this constraint.

• Default constraints
A default value can be specified for a column using the DEFAULT
clause when a user does not insert any value for the column;
automatically the defined default value is inserted in the field.

• Check constraints
This constraint limits values that can be inserted into a column of the
table. When a check constraint involves more than one column from the
same table, it is specified after all the columns have been defined.

For example:
CREATE TABLE items
( icode char(5) NOT NULL PRIMARY KEY,
descp char(20) NOT NULL UNIQUE,
ROL integer,
QOH integer,
CHECK (ROL < QOH));

This statement compares two columns ROL and QOH.

The SELECT Command


The SELECT command of SQL lets you make queries on the database. A query
is a command that is given to produce certain specified information from the
database tables. There are various ways and combinations, a SELECT
statement can be used into. It can be used to retrieve a subset of rows or
columns from one or more tables. In is simplest form, SELECT statement is used
as

SELECT <column name> [, <column name> …]


FROM <table name>;

 While giving a querying, the result can be obtained in any order. If all
the contents of the table are to be seen then asterisk (*) is used, like
SELECT * FROM <table name>
 The DISTINCT keyword eliminates duplicate rows from the results of a
SELECT statement. DISTINCT, in effect, applies to the entire output row,
not a specific field. If the clause selects multiple fields, DISTINCT
eliminates rows where all of the selected fields are identical.
 The ALL keyword selects from all the rows and retains the duplicate
output rows.
 The WHERE clause in SELECT statement specifies the criteria for
selection of rows to be returned. It takes the following general form
Page 36 of 75
SELECT <column name> [, <column name> …]
FROM <table name>
WHERE <condition>;
 To compare two values, a relational operator is used. The result of
comparison is true or false. The SQL recognizes following relational
operators: =, >, <, >=, <=, <>
 The BETWEEN operator defines a range of values that the column values
must fall in to make the condition true.
 To specify a list of values, IN operator is used. The IN operator selects
values that match any value in a given list of values.
 The NULL value in a column can be searched for in a table using ISNULL
in the WHERE clause.
 The results or the query can be sorted in a specific order by using
ORDER BY clause. This clause allows sorting of query results by one or
more columns.
 The GROUP BY clause is used in SELECT statements to divide the table
into groups. Grouping can be done by a column name, or with aggregate
functions in which case the aggregate produces a value for each group
 The HAVING clause places conditions on groups in contrast to WHERE
clause that places conditions on individual rows.

Creating Table Using SELECT INTO Command


We can define a table and put data into it without going through the usual data
definition process. This can be done by using SELECT statement and INTO
clause. The new table stores the result produced by the SELECT statement. The
name of the new table must be unique.
For example:
SELECT icode, descp
INTO orditem
FROM items
WHERE QOH < ROL;

UNION – Combining Queries


Multiple queries can be combined into one by forming a union of them. The SQL
UNION operator allows manipulation of results returned by two or more queries
by combining the results of each query into a single result set.

The INTERSECT Operator


The INTERSECT operator outputs only those rows that are common in multiple
tables. To carry out INTERSECT operator, the participating table must be union-
compatible i.e., they must produce same number and same type of attributes in
the result.

The INSERT Command


The rows are added to relation using INSERT command of SQL. Its syntax is:
INSERT INTO <tablename> [ <column list> ]
Page 37 of 75
VALUES ( <value>, <value> ….);

Inserting the results of a query


INSERT command can also be used to take or derive values from one table and
place them in another by using it with a query. To insert using a query, the
following conditions must be true:
1. Both the tables must be already created.
2. The columns of the tables being inserted into, must match the columns output
by the subquery.
For example:
INSERT INTO branch1
SELECT *
FROM branch2
WHERE gross > 7000.00;

The DELETE Command


The DELETE command removes rows from a table. This removes the entire
rows, not individual field values, so no field argument is needed or accepted.
Syntax is:
DELETE FROM <tablename>
[WHERE <predicate> ];
Even some specific rows from a table can also be deleted.

The UPDATE Command


The UPDATE command specifies the rows to be changed using the WHERE
clause, and the new data using SET keyword. The new data can be a specified
constant, an expression or data from other tables.
For example:
UPDATE items
SET ROL = 250
WHERE ROL = 300;

The CREATE VIEW Command


A view is like a window through which we can view or change information in a
table. A view is a virtual table i.e.,
- it looks like a table, but it does not exist as such
- its data are derived from base table
- it only stores its definition; it does not contain any copy of the data.
A view provides
- Simplicity – we can see exactly what we need
- Security – it prevents unauthorized users from seeing irrelevant information
The SQL provides a statement for creating views which is CREATE VIEW
command. This command consists of the words CREATE VIEW, the name of the
table to be created, the word AS, and then the query. For example

CREATE VIEW taxpayee


Page 38 of 75
AS SELECT *
FROM employee
WHERE gross > 8000;

.Some More DML Commands

The ALTER TABLE Command


It is used to change the definition of existing tables. It can add columns to a table
and sometimes it can delete columns or change their sizes. Its syntax is:
ALTER TABLE < table name > ADD <column name> <data type> <size>;
The new column will be added with NULL values for all rows currently in the
table.

The DROP TABLE Command


This command drops a table from the database. A table with rows in it cannot be
dropped. Its syntax is;
DROP TABLE items;

The DROP VIEW Command


To delete a view from the database the DROP VIEW command is used. For
example
DROP VIEW taxpayee
drops the view taxpayee from the database. When a view is dropped it does not
cause any change in its base table.

5.3 MICROSOFT ACCESS

5.3.1 Introduction

Microsoft Access is one of the world’s most popular database systems. Using
Access, we can create sophisticated and powerful databases and store and
analyze information on any number of topics. For many beginning computer
users, however, database programs seem complicated and intimidating, but with
Access they needn’t be. Microsoft Access offers improvements over previous
database programming techniques both in power and in usability.

• For the professional database developer, Access offers unparallel


Web integration capability.
• Access offers features that enable SQL and Access to work together.
• For the beginner or casual user, Access includes more automated
procedures.
• Access includes more Wizards that walk you step-by-step through
complex activities, and easier-to-understand instructions and messages.
• In addition, Access uses task pane to provide quick access to
common program features.
Page 39 of 75
5.3.2 Database related Features

1. Relational Database
Microsoft Access is quite different from earlier database software like dBASE,
foxpro etc. It is so because it is not just a database; it is a relational
database program which means in rough terms that for this database
program relationship between the two fields is more important. Access allows
us to group its data into one or more distinct tables that can be related to one
another by using fields common to each related table. These relationships
can then be used to perform complex searches and produce detailed reports.

2. Indexing
Another important factor of Access is its use of indexing. As in a book index
it is used to find out the topic in the book at a random, in Access too index is
used to find out the location of the data in the tables at a speed. An index is
an ordered list of the data contained in a field or a group of fields within a
table. Access uses index to assist in performing the searches or lookups.

5.3.3 Need of Microsoft Access

If our data is simple and can be kept in a single table with no duplication (like a
list of business contacts), it’s easier to keep it in a flat-file database like Microsoft
Excel. If our data requires lots of calculation and manipulation, those tasks are
easier to perform in Excel. But, when we need to relate two types of data to each
other (such as students and classes, sales managers and client accounts), we
need to move to Access.

Simple databases, called flat-file databases, only allow us to work with one list of
table of information at a time. Programs like Access, which is a relational
database, let us separate our data into different tables and store each item of
data (such as customer address) only once. Then we relate the tables to each
other so we can connect data such as customer address and several customer
orders. In a relational database, data storage is flexible, never duplicated, and
takes up minimal hard disk space.

5.3.4 Access Database Objects

A database is a file in which we can store all the data pertaining to a specific
enterprise or business. Data for a single business might include product details,
product categories, customer information, customers’ orders, employee details,
and shipping company details. All of this data is kept in a single Access file, the
database, and is easily interrelated so we can find answers to various queries.
Access databases include seven types of Objects: tables, forms, reports, pages,
queries, macros, and Visual Basic modules; and also includes Groups.

• Tables
Page 40 of 75
In Access the object which holds the database is called a Table. In other
words, database structure is provided by tables, which are designed to
store raw data easily, accurately, and without redundancy. Tables are
composed of fields, or categories of information, and records, or individual
line-item entries. The data we enter is organized into rows and columns.
Access includes numerous table templates that we can use to create both
business and personal database tables. Access provides methods to
create table in Design View, by using Wizard and by Entering Data.

• Queries
A query is used to extract information from the table. These can be used
to select, change, add, or delete records in our database. A query is
useful when we don’t want all the data from each related table, just the
specific data that answers our questions. A query displays records and
fields from one or more tables based on criteria we specify. Queries are
like filters, but much more flexible. When we create a query, we can
choose which table to draw data from, which fields we want from those
tables and which set of records we want from those fields. We can also
sort a query’s resulting set of records any way we want without affecting
the sort order in the underlying tables. We can also set up a query to
perform mathematical operations on the data.

• Forms
We can create forms for entering the data for the database. This helps in
displaying the data structural manner and ca be entered easily. Forms
provide a way fro users to enter data without having to know how a table
is designed, or getting lost in a sea of data and inadvertently editing an
entry in the wrong row. Also, we don’t have to include all of a table’s fields
in a form; we can leave out fields where user can’t enter data.
A single form can include data from multiple tables, providing one-stop
data entry. We can create a customized layout so that a form looks just its
source document. When an entry form closely resembles the source
document, data-entry errors are less likely to occur. As with tables, there
is more than one way to create a form. Access provides three form-
creation methods: AutoForms, Form Wizard, and Form Design view.

• Reports
A report is the printed output of the data in a database. These present the
data we selected in a printed format. Access gives us the freedom to
report our data in a variety of ways. Reports can be based on tables to
show all the data from the given table, or they can be based on queries to
show only information that meets certain criteria. The flexibility to
customize reports and to organize the data in useful ways is really what
gives Access its name.
Page 41 of 75
A report is a static picture of current data. When we save a report, Access
saves only its structure, so the data shown in a report is only as current as
the record in the database when the report was created.
Most reports are either columnar or tabular. A columnar report shows
each field on a separate line in a single column down the page. A tabular
report is like a tabular form and for most data offers a better use of page
space.

• Data Access Pages


Access includes an object called a data access page that enables users to
view and access our Access databases via the Web. A data access page
is very similar to a form or report, except that it functions as a Web page.
These are HTML documents that can be bound directly to data in a
database. A user can open our data access page from either the Internet
or an internal company intranet. We can create data access pages to
view, analyze, and report on information or to serve as a method of data
entry. In the latter case, we could potentially have multiple users updating
table information over the internet.
As with other Access objects (such as AutoForm and AutoReport), an
AutoPage is the simplest form of a data access page. We can
automatically create a columnar page based on a selected table or query
using the AutoPage feature. A columnar page follows the same format as
a columnar form or report.

• Macros
Except numerous tools for customizing Access applications, the most
powerful customization tool is its programmability. In all applications we
can create our own software telling exactly how we want it to work.
Macros are VB programs that run within a host application. But we don’t
have to know how to program in any version of VB to create macros. As in
other Office software, Macros are used for repetitive commands. These
commands can be stored in a macro and performed collectively using
Macro.
Access doesn’t include a Macro Recorder like Excel, PowerPoint. Instead,
we use the Macro window to create macros. The Macro window has two
columns: Actions and Comments. Actions are commands. Like functions,
actions have both required and optional arguments. Comments serve the
same purpose as field descriptions in Table Design view.

• Modules
These are user-written functions using Visual Basic. This is another way
to implement programmability in Access applications. If we are already
familiar with Visual Basic, we can create macros by opening a VB module
and typing code. A module is a container for VB code.
Page 42 of 75
MTNL SYSTEMS
6.1 MICN

MICN – Acronym for MAHANAGAR INTERGRATED COMPUTER NETWORK,


which is the standing pillar of MTNL.

The governing protocols which facilitate the working of MICN through UNIX PC
are as follows:
1. TELNET: Telecommunication Network Protocol
2. TCP/IP : Transmission Control Protocol/ Internet Protocol
3. PING: Packet Internet Grouper Protocol
4. ICMP: Internet Control Management Protocol

The configuration of the Router used:


10Base T m DSL ROCKET (model 1088/1)
PATTEN Electronics Corporation – USA

NETWORK USED: UNIX PC NETWORKING

In such a network, PCs can ac as a dumb terminal or as an intelligent terminal.


Dumb network can only work as a part of the network and doesn’t possess
independent processing power. In case of network failure, the terminal cannot be
used, and when it acts a dumb terminal it uses the UNIX machine as a storage
device in contrast to the PC as an intelligent terminal. It should be able to
concurrent PC_DOS and UNIX.

6.1.1 Need of MICN

In order to meet this requirement of integration of systems/applications MTNL


has implemented a TCP/IP based network called “MTNL Integrated Computer
Network” (MICN) using routers interconnected together by 64kbps leased lines.
This network interconnects together Systems running various applications.
These applications support many On Line activities, which are essential for
effective serving of the customer across various offices and counters. Therefore
reliability and uptime of the network as a whole apart from the desired response
time is of paramount importance and it is necessary that the network
components, existing as well as to be added should provide for high availability
and guaranteed uptime.

6.1.2 Existing MICN

Existing MICN in MTNL is confined to Telephone Exchange Buildings where the


main Computers Systems (Servers) are located and a few other departmental
buildings where large concentration of network nodes are there, where as MTNL
users are scattered all over Delhi in the form of small clusters. These small
Page 43 of 75
clusters of the terminals were being served using statistical multiplexes and
Modems connected over leased line links. Active Terminals like On Line bill
collection equipments were connected on the leased line with the help of
modems using PPP protocols.

6.1.3 Upgradation of MICN

MTNL has planned to expand and upgrade the existing MICN network to provide
broader bandwidth (2 Mbps) as backbone. It will also provide higher bandwidth
(64 Kbps) to the remote user cluster presently working on low speed (Modem –
Mux) links. For this up gradation of MICN, it has provision for Routers, Switches,
Line drivers, interface converters on 2 Mbps & 64 Kbps lines. In addition to this it
has LAN Bridges to provide connectivity to distant Terminals/PCs/On Line
Collection Counter Machine.

6.2 INFORMATION TECHNOLOGY CELL

IT Unit in MTNL is responsible for planning, development and implementation of


computer system related to the handling and management of customer services
and improvement in system efficiency. The mission critical applications for IT cell
are:

 Fault Repair Services (FRS)


 Customer Service Management System (CSMS)
 Directory Management System (FMS)
 Financial Management System (FMS)

Most of these applications run on RISC based servers in UNIX and ORACLE
environment. As on date, about 40 such servers and more than 2500 terminals
are in operation. These are interconnected through MICN (MTNL Integrated
Computer Network) having 64 Kbps and 24 area routers with router. In addition,
a number of Windows NT based servers and stand alone PCs are in use. The
details of these systems are as follows:

6.3 CSMS (Customer Service Management System)

MTNL, Delhi (which at present has around 2.2 million subscribers) is currently
having 8 CSMS sites. In each of these sites, one dual (in cluster) RISC based
machine is being utilized for catering to its Pre-connection and Post-connection
CSMS requirements respectively. The databases for these units have been
created in decentralized manner by accommodating about 3 databases in each
one of the Servers (of the dual RISC based machines) at all the 8 CSMS sites.

The year 1996 was a landmark in the history of MTNL. CSMS was introduced in
full earnest specifically with view to augment efficiency. The objective was to
facilitate integration of all the counter functions, i.e., needs of customers right
Page 44 of 75

Server 1 Server 2
Payment is online
from any place
CSMS
Payment
FMS
table
LAN Port

Fibre Switch Fibre Switch

RAID
Router

2Mb Line
driver
Switch
Router Switch

Switch
Terminal
2Mb Line LTS (hk)
driver
Switch

LTS
10/100

Terminal
PC
Online
Payment
Collection
Machines

Barcode
recorder
Page 45 of 75
Page 46 of 75
from early stages of booking of telephone to settlement of accounts when the
telephone is finally surrendered. CSMS applications that are developed in Oracle
using SQL and Pro C on UNIX Platform are totally dedicated to meet the
aspirations of the customers.

CSMS addresses manifold benefits like:


 Having online integrated system
 One point data capture for all the input information avoiding duplication of
data
 Increased efficiency of related departments by ushering in a higher degree
of automation
 Reduction of lead-time for processing various queries and reports.
 Timely up to date and accurate information to the management for
decision making
 Reduction of the time taken for answering ad-hoc queries owing to the
presence of central report.

CSMS is divided into several functional and sub functional activities linked
together in a hierarchy of easy to use menu screens. To enable the user to
navigate through various functions in a systematic manner, a hierarchical system
of menu screens is used.

6.4 FRS (Fault Repair System)

This is basically a system for booking, testing and clearance of faults. FRS has
been computerized in all the exchanges. Monsoon cable fault analysis system
has also been implemented. Systems are being sufficiently upgraded to cater to
the increasing traffic loads. Redundancy has been kept by having provision of
clustered dual server configuration.

It is a part of IVRS. The subscriber can dial fault-booking number (198) and the
complaint can be booked using telephone.

On dialing a predetermined number, the system welcomes the subscriber with a


message asking the subscriber for faulty telephone number. After the faulty
telephone no. is dialed by the subscriber, the system interacts with the FRS
computer and checks the various status of faulty telephone number like spare
no. Safe custody or disconnected due to non-payment.

If the faulty telephone no. is working then it further checks whether any complaint
is already booked. In case fault is already pending, the IVRS will extract the
docket number i.e. ***, if no complaint is booked against the number it will ask
the subscriber to dial he complaint type. After accepting the complaint type, it
gets the new docket number from FRS computer and it announces that “your
complaint has been booked and the docket no. is “***”.
Page 47 of 75
6.5 FMS (Financial Management System)

* Objective and Goals

 Automate the process of file creation & movement within the office to
hasten the entire process.
 To track the complete life cycle and expedited action at any stage, if
necessary.
 Define flow of the file created.
 Allow initiation of a new file by attaching any circular/ instruction or any
documents /material available on intranet application.

* Process
 Officers can create documents.
 Officers can send to another officer for processing.
 Mode of sending may be of different types:
.Check: giving to his subordinate for checking
.Move: giving the document control to another person entirely
.Process: giving the document for further processing.
 Create can track the file at any time
 View the list of received documents
 Attachments possible- unlimited in no.
 Comments made & submitted are read only
 Each comment to bear user name, date & time- use of approval
password.
 PA, on behalf of the manager can view/post comments
 Some statistically feasible reports would be provided.
 Alert on login time- to denote new/pending files.
 Validity & new life will be indicated.
Page 48 of 75
MTNL SYSTEMS SOFTWARE
7.1 INTRODUCTION

MTNL Systems Software is designed to store all the data of networking elements
installed in the MTNL Systems (CSMS/FRS & FMS). In general, three networking
items are used in these systems. These are:

SWITCH
LTS (Line Terminal Server)
LAN Bridge

Software stores and retrieves the information about all these networking
elements in separate databases. Each database stores information about each
networking element separately. It keeps record of several data entities specific to
each networking item in each database.

Each form shows all the contents of a specific networking item. The development
of software for MTNL systems progressed through following stages:

 Designing the database


 Building the application

7.2 WHY THIS SOFTWARE?

The basic connection in MTNL using these networking elements is shown below:

Copper
Janak Puri pair
Maya Puri
MODEM

Server MUX
MODEM

MUX
Switch LTS
Page 49 of 75
It is visible that in this connection a LTS, a multiplexer (MUX) and a MODEM
(modulator/demodulator) is used and for connection twisted cable is used. At
other site through a single multiplexer many terminals are connected.

This type of connection is useful where computer concentration is more but it has
certain disadvantages:
 Here many networking elements are used therefore its cost is more.
 Also as many networking elements therefore fault chances are more.

Another new technique which has evolved in these days and acquired by MTNL
is the use of a LAN BRIDGE (L.B). Following picture shows this type of
connection:

Server

Copper Pair

Switch L.B L.B LTS

Here it is seen that a bridge is directly connecting switch at one site to the LTS of
another site which is further connected to various terminals through its sixteen
ports. It overcomes all the disadvantages of the first connection.
First, its cost is less than previous one and secondly as here items are less
therefore chances of fault is much less.

If concentration of computers is less than connectivity through first or second


way will lead to the wastage of many ports. Therefore an alternate is used. A
separate modem is connected at each site for a particular terminal. Its figure is
shown below:
Page 50 of 75

A B

Server Terminal

Terminal

Switch LTS

Terminal

Terminal

C
MODEM

According to network requirements best suited way for the connection is used in
which cost is less or most cheap and maintenance is less. Specially, LAN Bridge
is used where we know that expansion is going to be made in future.

With the advent of new technologies, comes the requirement of data handling
related with new equipment. For e.g. it is required to keep the details of data
entities related to LAN Bridge, LTS and switches. Earlier all the data was stored
manually. This software keeps data on computer.

7.3 DESIGNING THE DATABASE

This stage involves the designing the table structure of the server side database.
The various tables designed in the Microsoft Access database are:
• SWITCH
• LTSDETAIL
• LANBRIDGE
• LTSDETAILS

Each of these tables holds the various entities or data elements which are
required.

Description of each of the entity set of the MTNL Systems is given as follows:
Page 51 of 75
SWITCH: It consists of the following attributes:-

• TTY NO. : it shows the switch identification number that is constrained by


primary key to establish the relationship with other entity sets.
• LOCATION : it gives the location of the respective switch.
• ADDRESS : it gives the address of the respective switch.
• PAIR DETAIL : it gives the detail of the twisted pair cable used as the
transmission medium.

LTSDETAIL: It consists of the following attributes:-

• SNO : it is the primary key representing the identification of the respective


line terminal server.
• LOCATION: it gives the location of the respective LTS.
• ADDRESS: it gives the address of the respective LTS.
• IP ADDRESS: it gives the internet linking address.
• TYPEOFLTS: it gives the type of LTS, i.e., either HCL or VXL.
• TTY1-16: it keeps the data of 16 ports.

LTSDETAILS: it consists of the same attributes as LTSDETAIL contains but for


the FMS system.

LANBRIDGE: it consists of the following attributes:

• SWITCH : it gives the details of the switch connected to this bridge.


• TC : it gives the details of the LTS whose SNO is given in this set.
• LOCATION: it gives the location of the bridge.
• PAIR DETAIL: it gives the detail of the twisted cable connected to the
respective bridge.

Visual Data Manager

The key component of this project is Visual Data Manager. The Visual Data
Manager is a Visual Basic tool for designing databases. Although it’s rather
crude, we can use it to create and modify tables, to implement security, and to
experiment with SQL. When we open an existing database, the Visual Data
Manager displays a database window listing the tables and properties of that
database.

New tables can be created by right-clicking the database window and selecting
New Table from the shortcut menu. New fields can be added to the table by
clicking the Add Field button, which opens an Add Field dialog box. This dialog
box has various options available. Some of them are as follows:
Page 52 of 75
 Name: The name of the field
 OrdinalPosition: The position of the field within the field roster
 Type: The field type. A field can have the usual types of any variable, plus
two additional types: Binary and Memo.
 Size: The field’s size in bytes
 FixedField: The field must have a fixed length.
 VariableField: The field can have variable length.

We can use the Visual Data Manager for data entry. Double-clicking the name of
a table in the database window opens a table in data entry mode, and we can
edit, add, and delete records.

7.4 BUILDING THE APPLICATION

Data-Bound Grid Control

The data-bound Grid control is one of the most flexible and powerful Visual Basic
controls. The data-bound Grid control looks like the MSFlexGrid control, with two
major differences:

 It is populated automatically from a RecordSet.


 It has built-in data entry mechanisms with which we can edit the
RecordSet (if it can be updated)

To fill the control with the data in a RecordSet, we have to set its DataSource
property to a Data control. The grid is filled with the rows of the RecordSet. We
can use this control to display the results of the SQL statements.

Once the database design is over, we move on to Application Building step. The
application building involves the design of the following forms which are as
follows:
Page 53 of 75

MAIN FORM

SWITCH (CSMS/FRS) FORM


Page 54 of 75

LTS DETAIL (CSMS/FRS) FORM


Page 55 of 75

LAN BRIDGE FORM


Page 56 of 75

QUERY FORM

LTS DETAILS (FMS) FORM


Page 57 of 75
Page 58 of 75
REFERENCES

1) Evangelos Petroutsos, “Mastering Visual Basic 6.0 “, 2001, BPB


Publications.
2) Alan Eliason & Ryan Malarkey, “Visual Basic 5.0 “, 1998, Prentice Hall of
India.
3) Nathan Gurewich & Ori Gurewich, “Visual Basic 5.0 in 21 days “, 1997,
Techmedia.
4) Gini Courter & Annette Marquis, “Mastering Microsoft Office 2000 “, 2000,
BPB Publications.
5) Dinesh Maidasani, “Straight to the Point, Microsoft Office 2000 “, 2004,
Firewell Media.
6) Faithe Wempen, “Microsoft Access 2002 “, 2003, Prentice Hall of India.
7) Stephen Copestake, “Access 2002 “, 2002, Dreamtech.
8) Sumita Arora & Gautam Sarkar, “Computer Science C++ “, 1999, Prentice
Hall of India.
9) Andrew S.Tanenbaum, “Computer Networks “, 1999, Prentice Hall of
India.
10) Uyless Black, “Data Networks Concepts, Theory and Practice “, 1989,
Prentice Hall, Englewood Cliffs.
11) www.erg.abdn.ac.uk/users/gorry/course/lan-pages/bridge.html
Page 59 of 75

APPENDIX
PROGRAM LISTING
MAIN FORM
Private Sub Command1_Click()
MsgBox "CREATED BY:" + "ANKITA AGARWAL"
End Sub

Private Sub Form_Load()


Label2.Caption = Time
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As


Single, Y As Single)
Picture1.Visible = False
Timer2.Enabled = False
End Sub

Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As


Single, Y As Single)
Picture1.Visible = True
Timer2.Enabled = True
End Sub

Private Sub mnuexit_Click()


End
End Sub

Private Sub mnulanbridge_Click()


frm7.Show
End Sub

Private Sub mnults_Click()


frm5.Show
End Sub

Private Sub mnultsdetail_Click()


frm3.Show
End Sub

Private Sub mnuswitch_Click()


frm2.Show
End Sub

Private Sub Timer2_Timer()


Page 60 of 75
If Command1.Visible = True Then
Command1.Visible = False
Label2.Visible = False
Timer2.Interval = 50
Else
Command1.Visible = True
Label2.Visible = True
Timer2.Interval = 1000
End If
End Sub

Private Sub Timer3_Timer()


Label2.Caption = Time
Timer3.Interval = 1000
End Sub

SWITCH FORM

Option Explicit

Private Sub cmdFirst_Click()


Data1.Recordset.MoveFirst
End Sub

Private Sub cmdLast_Click()


Data1.Recordset.MoveLast
End Sub

Private Sub cmdNext_Click()


Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
MsgBox "you are on the last record"
Data1.Recordset.MoveLast
End If
End Sub

Private Sub cmdPrevious_Click()


Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
MsgBox "you are on the first record"
Data1.Recordset.MoveFirst
End If
End Sub

Private Sub cmdQuery_Click()


frm8.Show
frm8.Text2.Text = 2
End Sub
Page 61 of 75

Private Sub cmdSave_Click()


If Text1.Text = "" And Text2.Text = "" And Text3.Text = "" And Text4.Text =
"" Then
MsgBox "NO DATA ENTERED"
Else
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
cmdSave.Enabled = False
cmdAdd.Enabled = True
cmdDelete.Enabled = True
cmdModify.Enabled = True
cmdPrevious.Enabled = True
cmdFirst.Enabled = True
cmdLast.Enabled = True
cmdNext.Enabled = True
cmdQuery.Enabled = True
cmdGoback.Enabled = True
End If
End Sub

Private Sub cmdModify_Click()


Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdPrevious.Enabled = False
cmdFirst.Enabled = False
cmdLast.Enabled = False
cmdNext.Enabled = False
cmdQuery.Enabled = False
cmdGoback.Enabled = False
End Sub

Private Sub cmdAdd_Click()


Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
Page 62 of 75
cmdModify.Enabled = False
cmdPrevious.Enabled = False
cmdFirst.Enabled = False
cmdLast.Enabled = False
cmdNext.Enabled = False
cmdQuery.Enabled = False
cmdGoback.Enabled = False
Data1.Recordset.AddNew
End Sub

Private Sub cmdDelete_Click()


Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub

Private Sub cmdGoback_Click()


Form1.Show
Unload frm2
End Sub

Private Sub Form_Load()


Text1.ForeColor = vbBlack
Text2.ForeColor = vbBlack
Text3.ForeColor = vbBlack
Text4.ForeColor = vbBlack
End Sub

LTS DETAIL (CSMS/FRS) FORM

Private Sub cmdGoon_Click()


Dim df As String
df = Text4.Text
frm4.Show
frm4.Data1.Recordset.FindFirst "SNO = " + df
End Sub

Private Sub cmdGoback_Click()


Form1.Show
Unload frm3
Unload frm4
End Sub

Private Sub cmdDelete_Click()


Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub

Private Sub cmdFirst_Click()


Page 63 of 75
Data1.Recordset.MoveFirst
End Sub

Private Sub cmdLast_Click()


Data1.Recordset.MoveLast
End Sub

Private Sub cmdNext_Click()


Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
MsgBox "you are on the last record"
Data1.Recordset.MoveLast
End If
End Sub

Private Sub cmdPrevious_Click()


Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
MsgBox "you are on the first record"
Data1.Recordset.MoveFirst
End If
End Sub

Private Sub cmdQuery_Click()


frm8.Show
frm8.Text2.Text = 3
End Sub

Private Sub cmdSave_Click()


If Text1.Text = "" And Text2.Text = "" And Text3.Text = "" And Text4.Text =
"" And Text5.Text = "" Then
MsgBox "NO DATA ENTERED"
Else
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
cmdSave.Enabled = False
cmdAdd.Enabled = True
cmdDelete.Enabled = True
cmdModify.Enabled = True
cmdPrevious.Enabled = True
cmdFirst.Enabled = True
cmdLast.Enabled = True
cmdNext.Enabled = True
cmdQuery.Enabled = True
cmdGoback.Enabled = True
Page 64 of 75
cmdGoon.Enabled = True
End If
End Sub

Private Sub cmdModify_Click()


Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdPrevious.Enabled = False
cmdFirst.Enabled = False
cmdLast.Enabled = False
cmdNext.Enabled = False
cmdQuery.Enabled = False
cmdGoback.Enabled = False
cmdGoon.Enabled = False
End Sub

Private Sub cmdAdd_Click()


Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdPrevious.Enabled = False
cmdFirst.Enabled = False
cmdLast.Enabled = False
cmdNext.Enabled = False
cmdQuery.Enabled = False
cmdGoback.Enabled = False
cmdGoon.Enabled = False
Data1.Recordset.AddNew
End Sub

LTS DETAIL (CSMS/FRS) – 16 PORTS FORM

Private Sub cmdGoback_Click()


frm3.Show
End Sub
Page 65 of 75

Private Sub cmdDelete_Click()


Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub

Private Sub cmdSave_Click()


Text17.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
Text11.Enabled = False
Text12.Enabled = False
Text13.Enabled = False
Text14.Enabled = False
Text15.Enabled = False
Text16.Enabled = False
cmdSave.Enabled = False
cmdAdd.Enabled = True
cmdDelete.Enabled = True
cmdModify.Enabled = True
cmdGoback.Enabled = True
End Sub

Private Sub cmdModify_Click()


Text17.Enabled = True
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
Text11.Enabled = True
Text12.Enabled = True
Text13.Enabled = True
Text14.Enabled = True
Text15.Enabled = True
Page 66 of 75
Text16.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdGoback.Enabled = False
End Sub

Private Sub cmdAdd_Click()


Text17.Enabled = True
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
Text11.Enabled = True
Text12.Enabled = True
Text13.Enabled = True
Text14.Enabled = True
Text15.Enabled = True
Text16.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdGoback.Enabled = False
Data1.Recordset.AddNew
End Sub

LAN BRIDGE FORM

Private Sub cmdGoback_Click()


Form1.Show
Unload frm7
End Sub

Private Sub cmdTcdetail_Click()


Dim df As String
df = Text2.Text
frm3.Show
frm3.Data1.Recordset.FindFirst "SNO = " + df
frm3.cmdAdd.Enabled = False
frm3.cmdDelete.Enabled = False
Page 67 of 75
frm3.cmdModify.Enabled = False
frm3.cmdFirst.Enabled = False
frm3.cmdPrevious.Enabled = False
frm3.cmdNext.Enabled = False
frm3.cmdLast.Enabled = False
frm3.cmdSave.Enabled = False
frm3.cmdQuery.Enabled = False
frm4.cmdAdd.Enabled = False
frm4.cmdDelete.Enabled = False
frm4.cmdModify.Enabled = False
frm4.cmdSave.Enabled = False
Unload frm7
End Sub

Private Sub cmdDelete_Click()


Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub

Private Sub cmdFirst_Click()


Data1.Recordset.MoveFirst
End Sub

Private Sub cmdLast_Click()


Data1.Recordset.MoveLast
End Sub

Private Sub cmdNext_Click()


Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
MsgBox "you are on the last record"
Data1.Recordset.MoveLast
End If
End Sub

Private Sub cmdPrevious_Click()


Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
MsgBox "you are on the first record"
Data1.Recordset.MoveFirst
End If
End Sub

Private Sub cmdQuery_Click()


frm8.Show
frm8.Text2.Text = 7
End Sub
Page 68 of 75
Private Sub cmdSave_Click()
If Text1.Text = "" And Text2.Text = "" And Text3.Text = "" And Text4.Text =
"" Then
MsgBox "NO DATA ENTERED"
Else
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
cmdSave.Enabled = False
cmdAdd.Enabled = True
cmdDelete.Enabled = True
cmdModify.Enabled = True
cmdPrevious.Enabled = True
cmdFirst.Enabled = True
cmdLast.Enabled = True
cmdNext.Enabled = True
cmdQuery.Enabled = True
cmdGoback.Enabled = True
cmdTcdetail.Enabled = True
End If
End Sub

Private Sub cmdModify_Click()


Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdPrevious.Enabled = False
cmdFirst.Enabled = False
cmdLast.Enabled = False
cmdNext.Enabled = False
cmdQuery.Enabled = False
cmdGoback.Enabled = False
cmdTcdetail.Enabled = False
End Sub

Private Sub cmdAdd_Click()


Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
Page 69 of 75
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdPrevious.Enabled = False
cmdFirst.Enabled = False
cmdLast.Enabled = False
cmdNext.Enabled = False
cmdQuery.Enabled = False
cmdGoback.Enabled = False
cmdTcdetail.Enabled = False
Data1.Recordset.AddNew
End Sub

LAN BRIDGE (FMS) FORM

Private Sub cmdGoon_Click()


Dim df As String
df = Text1.Text
frm6.Show
frm6.Data1.Recordset.FindFirst "SNO = " + df
End Sub

Private Sub cmdGoback_Click()


Form1.Show
Unload frm5
Unload frm6
End Sub

Private Sub cmdDelete_Click()


Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub

Private Sub cmdFirst_Click()


Data1.Recordset.MoveFirst
End Sub

Private Sub cmdLast_Click()


Data1.Recordset.MoveLast
End Sub

Private Sub cmdNext_Click()


Data1.Recordset.MoveNext
If Data1.Recordset.EOF Then
MsgBox "you are on the last record"
Data1.Recordset.MoveLast
End If
End Sub
Page 70 of 75
Private Sub cmdPrevious_Click()
Data1.Recordset.MovePrevious
If Data1.Recordset.BOF Then
MsgBox "you are on the first record"
Data1.Recordset.MoveFirst
End If
End Sub

Private Sub cmdQuery_Click()


frm8.Show
frm8.Text2.Text = 5
End Sub

Private Sub cmdSave_Click()


If Text1.Text = "" And Text2.Text = "" And Text3.Text = "" And Text4.Text =
"" And Text5.Text = "" Then
MsgBox "NO DATA ENTERED"
Else
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
cmdSave.Enabled = False
cmdAdd.Enabled = True
cmdDelete.Enabled = True
cmdModify.Enabled = True
cmdPrevious.Enabled = True
cmdFirst.Enabled = True
cmdLast.Enabled = True
cmdNext.Enabled = True
cmdQuery.Enabled = True
cmdGoback.Enabled = True
cmdGoon.Enabled = True
End If
End Sub

Private Sub cmdModify_Click()


Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdPrevious.Enabled = False
Page 71 of 75
cmdFirst.Enabled = False
cmdLast.Enabled = False
cmdNext.Enabled = False
cmdQuery.Enabled = False
cmdGoback.Enabled = False
cmdGoon.Enabled = False
End Sub

Private Sub cmdAdd_Click()


Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdPrevious.Enabled = False
cmdFirst.Enabled = False
cmdLast.Enabled = False
cmdNext.Enabled = False
cmdQuery.Enabled = False
cmdGoback.Enabled = False
cmdGoon.Enabled = False
Data1.Recordset.AddNew
End Sub

LAN BRIDGE (FMS) – 16 PORTS FORM

Private Sub cmdGoback_Click()


frm5.Show
End Sub

Private Sub cmdDelete_Click()


Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub

Private Sub cmdSave_Click()


Text17.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Page 72 of 75
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
Text11.Enabled = False
Text12.Enabled = False
Text13.Enabled = False
Text14.Enabled = False
Text15.Enabled = False
Text16.Enabled = False
cmdSave.Enabled = False
cmdAdd.Enabled = True
cmdDelete.Enabled = True
cmdModify.Enabled = True
cmdGoback.Enabled = True
End Sub

Private Sub cmdModify_Click()


Text17.Enabled = True
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
Text11.Enabled = True
Text12.Enabled = True
Text13.Enabled = True
Text14.Enabled = True
Text15.Enabled = True
Text16.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdGoback.Enabled = False
End Sub

Private Sub cmdAdd_Click()


Text17.Enabled = True
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Page 73 of 75
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
Text11.Enabled = True
Text12.Enabled = True
Text13.Enabled = True
Text14.Enabled = True
Text15.Enabled = True
Text16.Enabled = True
cmdSave.Enabled = True
cmdAdd.Enabled = False
cmdDelete.Enabled = False
cmdModify.Enabled = False
cmdGoback.Enabled = False
Data1.Recordset.AddNew
End Sub

QUERY FORM

Private Sub cmdExecute_Click()


If Text2.Text = 2 Then
Data1.DatabaseName = "C:\sys5.mdb"
ElseIf Text2.Text = 7 Then
Data1.DatabaseName = "C:\sys4.mdb"
ElseIf Text2.Text = 3 Then
Data1.DatabaseName = "C:\sys2.mdb"
ElseIf Text2.Text = 5 Then
Data1.DatabaseName = "C:\sys3.mdb"
End If
Data1.RecordSource = Text1.Text
Data1.Refresh
End Sub

Private Sub cmdGoback_Click()


Unload frm8
End Sub

You might also like