Académique Documents
Professionnel Documents
Culture Documents
2. Computer Network
4. Data structure
Computer Network
System of interconnected computers and computerized peripherals such as
printers is called computer network .This interconnection among computers
facilitates information sharing among them. Computers may connect to each
other by either wired or wireless media.
Characteristics of a NetworkA network is a group of systems that are
connected to allow sharing of resourcessuch as files or printersor sharing
of services-such as an Internet connection .There are two aspects of setting up a
network: the hardware used to connect the systems together and the software installed on the computers to
allow them to communicate.
ServersThe server is a special computer that contains more disk space and memory than are found on client
workstations. The server has special software installed that allows it to function as a server. This special
software can provide file and print services (to allow sharing of files and printers), provide web pages to
clients, or provide e-mail functionality to the company.
Workstations The workstation also is known as a client, which is just a basic computer running a client
operating system such as Windows XP or Linux. These users typically store their files on a central server so
that they can share the files with other users on the network.
HostsThe term host refers to any computer or device that is connected to a network and sends or receives
information on that network. A host can be a server, a workstation, a printer with its own network card, or a
device such as a router. We can summarize by saying that any system or
device that is connected to the network is known as a host.
Types of NetworksOrganizations of different sizes, structures, and budgets need different
types of networks. Networks can be divided into one of two categories:
peer-to-peer or server-based networks.
1. Peer-to-Peer Network
2. Server-Based Networks
Page 1
Peer-to-Peer Network-
Page 2
information about these user accounts such as address, city, phone number, and fax number. A directory
service is designed to be a central database that can be used to store everything about such objects as users and
printers.
Ethernet-:
Ethernet is a widely deployed LAN technology. This technology was invented by Bob Metcalfe and
D.R. Boggs in the year 1970. It was standardized in IEEE 802.3 in 1980. Ethernet shares media. Network
which uses shared media has high probability of data collision. Ethernet uses Carrier Sense Multi
Access/Collision Detection (CSMA/CD) technology to detect collisions. On the occurrence of collision in
Ethernet, all its hosts roll back, wait for some random amount of time, and then re-transmit the data. Ethernet
connector is network interface card equipped with 48-bits MAC address. This helps other Ethernet devices to
identify and communicate with remote devices in Ethernet. Traditional Ethernet uses 10BASE-T
specifications. The number 10 depicts 10MBPS speed, BASE stands for baseband, and T stands for Thick
Ethernet. 10BASE-T Ethernet provides transmission speed up to 10MBPS and uses coaxial cable or Cat-5
twisted pair cable with RJ-5 connector. Ethernet follows Star topology with segment length up to 100 meters.
All devices are connected to a hub/switch in a star fashion.
Fast-Ethernet-:
To encompass need of fast emerging software and hardware technologies, Ethernet extends
itself as Fast-Ethernet. It can run on UTP, Optical Fiber, and wirelessly too. It can provide speed up to
100MBPS. This standard is named as 100BASE-T in IEEE 803.2 using Cat-5 twisted pair cable. It uses
CSMA/CD technique for wired media sharing among the Ethernet hosts and CSMA/CA (CA stands for
Collision Avoidance) technique for wireless Ethernet LAN. Fast Ethernet on fiber is defined under 100BASEFX standard which provides speed up to 100MBPS on fiber. Ethernet over fiber can be extended up to 100
meters in half-duplex mode and can reach maximum of 2000 meters in full-duplex over multimode fibers.
Giga-Ethernet-:
After being introduced in 1995, Fast-Ethernet retained its high speed status only for three
years till Giga-Ethernet introduced. Giga-Ethernet provides speed up to 1000 mbits/seconds. IEEE802.3ab
standardizes Giga-Ethernet over UTP using Cat-5, Cat-5e and Cat-6 cables. IEEE802.3ah defines GigaEthernet over Fiber.
Internet, Intranet and Extranet-:
Internet
Intranet
Extranet
Page 3
Network Topologies-:
A network topology is the physical layout of computers, cables, and other components
on a network. There are a number of different network topologies, and a network may be built using multiple
topologies. The different types of network layouts are
1. Bus topology 2.Star topology 3.Mesh topology 4. Ring topology 5. Hybrid topology
6. Wireless topology
Network Media and Connectors-:
Cabling is the medium for the transmission of data between hosts on the
LANs. LANs can be connected together using a variety of cable types, such as unshielded twisted-pair, coax,
or fiber. Each cable type has its own advantages and disadvantages, which you will examine in this section.
There are three primary types of cable media that can be used to connect systems to a networkcoaxial cable,
twisted-pair cable, and fiber-optic cable. Transmission rates that can be
supported on each of these physical media are measured in millions of bits
per second, or megabits per second (Mbps).
Coaxial Cable-:
Coaxial, or coax, cable looks like the cable used to bring
the cable TV signal to your television. One strand (a solid-core copper
wire) runs down the middle of the cable. There are two types of coax
cabling: thinnet and thicknet. The two differ in thickness and maximum
cable distance that the signal can travel.
Twisted-Pair Cable-:
Coaxial cable is not as popular today as it was a few years ago; today the popularity
contest has been dominated by twisted-pair cabling. Twisted-pair cabling gets its name by having four pairs of
wires that are twisted to help reduce crosstalk or interference from outside electrical devices. (Crosstalk is
interference from adjacent wires.) there are two forms of twisted-pair cablingunshielded twisted-pair (UTP)
and shielded twisted-pair (STP).
Fiber-Optic Cable-:
The third type of cabling that we want to discuss is
fiber-optic cabling. Fiber-optic cabling is unlike coax and twisted-pair,
because both of those types have a copper wire that carries the electrical
signal. Fiber-optic cables use optical fibers that carry digital data signals
in the form of modulated pulses of light. An optical fiber consists of an
extremely thin cylinder of glass, called the core, surrounded by a
concentric layer of glass, known as the cladding. There are two fibers per
cable-one to transmit and one to receive. The core also can be an opticalquality clear plastic, and the cladding can be made up of gel that reflects
signals back into the fiber to reduce signal loss. There are two types of
fiber-optic cables: single-mode fiber (SMF) and multimode fiber (MMF).
1. Single-mode fiber Uses a single ray of light, known as a mode, to
carry the transmission over long distances.
2. Multimode fiber Uses multiple rays of light (modes) simultaneously, with each ray of light running at a
different reflection angle to carry the transmission over short distances
Cable
Thinnet
Thicknet
CAT 3 (UTP)
CAT 5 (UTP)
CAT 5e
CAT 6
Fiber
M ax Distance
185 m
500 m
100 m
100 m
100 m
100 m
2 km
Transfer Rate
10 Mbps
10 Mbps
10 Mbps
100 Mbps
1 Gbps
10 Gbps
1+ Gbps
Connector Used
BNC
AUI
RJ-45
RJ-45
RJ-45
RJ-45
SC, ST
Page 4
Network devices-:
Network devices are components used to connect computers or other electronic devices
together so that they can share files or resources like printers or fax machines. Devices used to setup a Local
Area Network (LAN) are the most common types of network devices used by the public. A LAN requires a
hub, router, cabling or radio technology, network cards, and if online access is desired, a high-speed
modem. This is much less complicated than it might sound to someone new to networking.
HUB-:
A hub is used in a wired network to connect Ethernet cables from
a number of devices together. The hub allows each device to talk to the
others. Hubs arent used in networks with only wireless connections, since
network devices such as routers and adapters communicate directly with
one another. Hubs are such simple devices they require no
configuration, and have no manuals that their function is now included
in other devices such as routers and modems.
Router -:
A router is a communications device that connects multiple
computers or other routers together and transmits data to its correct
destination on the network. A router can be used on any size of network.
On the largest scale, routers along the Internet backbone forward data
packets to their destination using the fastest available path. For smaller
business and home networks, a router allows multiple computers to share
a single high-speed Internet connection such as through a cable modem
or DSL modem. These routers connect from 2 to 250 computers. To
prevent unauthorized users from accessing files and computers, many
routers are protected by a built-in antivirus protection. Routers also
support wireless communications, eliminating the need for a separate
wireless access point in a wireless network. If network has a separate
wireless access point, it connects to the router via a cable. Some routers
also include additional functionality such as including a built-in print server.
Modem-:
A computers digital signals must be converted to analog signals
before they are transmitted over standard telephone lines. The
communications devices that perform this conversion in a modem,
sometimes called a dial-up modem. The word, modem, is derived from the
combination of the words, modulation, to change into an analog signal,
and demodulation, to convert an analog signal into a digital signal. Both the
sending and receiving ends o a standard telephone line (communications
channel) must have a dial-up modem or data transmission to occur. For
example, a dial-up modem connected to a sending computer converts the
computers digital signals into analog signals. The analog signals then can travel over a standard telephone
line. At the receiving end, another dial-up modem converts the analog signals
back into digital signals that a receiving computer can process.
Bridge-:
A bridge reads the outermost section of data on the data packet, to
tell where the message is going. It reduces the traffic on other network
segments, since it does not send all packets. Bridges can be programmed to
reject packets from particular networks. Bridging occurs at the data link layer
of the OSI model, which means the bridge cannot read IP address, but only
the outermost hardware address of the packet. In our case the bridge can read
Page 5
the Ethernet data which gives the hardware address of the destination address, not the IP address. Bridges
forward all broadcast messages. Only a special bridge called a translation bridge will allow two networks of
different architectures to be connected. Bridges do not normally allow connection of networks with different
architectures. The hardware address is also called the MAC (media access control) address. To determine the
network segment a MAC address belongs to, bridges use one of the following
Transparent Bridging :
They build a table of addresses (bridging table) as they receive packets. If the
address is not in the bridging table, the packet is forwarded to all segments other than the one it came from.
This type of bridge is used on Ethernet networks.
Source Route Bridging :
The source computer provides path information inside the packet. This is used on
Token Ring networks. A gateway can translate information between different network data formats or network
architectures. It can translate TCP/IP to AppleTalk so computers supporting TCP/IP can communicate with
Apple brand computers. Most gateways operate at the application layer, but can operate at the network or
session layer o the OSI model. Gateways will start at the lower level and strip information until it gets to the
required level and repackage the information and work its way back toward the hardware layer of the OSI
model. To confuse issues, when talking about a router that is used to interface to another network, the word
gateway is often used. This does not mean the routing machine is a gateway as defined here, although it could
be.
OSI Reference Model :
OSI (Open Systems Interconnection) is reference model for how messages should
be transmitted between any two points in a telecommunication network. A reference model is a framework for
understanding relationships. The purpose of the OSI reference model is to guide vendors and developers so
that the digital communication products and software programs they create will interoperate. The OSI
reference model defines seven layers of functions that take place at each end of a communication.
Layers of OSI -:
Layer 7-:
The application layer - This is the layer at
which communication partners are identified,
quality of service (QoS) is identified, user
authentication and privacy are considered, and any
constraints on data syntax are identified. (This layer
is not the application itself, although some
applications may perform application layer
functions.)
Layer 6-:
The presentation layer - This is a layer, usually part of an operating system (OS), that converts
incoming and outgoing data from one presentation format to another (for example, from a text stream into a
popup window with the newly-arrived text).
Layer 5-:
The session layer - This layer sets up, coordinates, and terminates conversations, exchanges, and
dialogs between the applications at each end. It deals with session and connection coordination.
Layer 4-:
The transport layer - This layer manages the end-to-end control (for example, determining whether all
packets have arrived) and error-checking. It ensures complete data transfer.
Layer 3-:
Page 6
The network layer - This layer handles the routing of the data (sending it in the right direction to the
right destination on outgoing transmissions and receiving incoming transmissions at the packet level). The
network layer does routing and forwarding.
Layer 2-:
The data-link layer - This layer provides synchronization for the physical level and does bit-stuffing
for strings of 1's in excess of 5. It furnishes transmission protocol knowledge and management. This layer has
two sub layers, the Logical Link Control Layer and the Media Access Control Layer.
Layer 1-:
The physical layer - This layer conveys the
bit stream through the network at the electrical and
mechanical level. It provides the hardware means of
sending and receiving data on a carrier network.
TCP/IP Model -:
The Transmission Control Protocol
/ Internet Protocol (TCP/IP) was created by the
Department of Defense (DoD) to make sure and
protect data integrity, and also maintained
communications in the time of disastrous war.
However, if designed and deployed properly
according to standard, a TCP/IP network can be a
truly reliable and flexible one. Essentially, the
Department of Defense (DoD) Model is a reduced version of the OSI Reference Model. The DoD model based
on four layers:
Layer
Description
4.
Application
3. Transport
2. Internet
1. Network
interface/
Access
Protocols
HTTP, Telnet, FTP, TFTP,
SNMP, DNS, SMTP,
X Windows, other
application protocols
TCP, UDP, RTP
IP Address-:
Every machine on a network has a unique identifier. Most networks today, including all
computers on the Internet, use the TCP/IP protocol as the standard for how to communicate on the network. In
the TCP/IP protocol, the unique identifier for a computer is called its IP address.
Page 7
Page 8
avoid confusion with the developing information space known as the World Wide Web. The first Web
browser with a graphical user interface was Mosaic, which appeared in 1993. Many of the user interface
features in Mosaic went into Netscape Navigator. Microsoft followed with its Internet Explorer (IE).
Bandwidth -:
Bandwidth describes the rate at which data can be transferred to your computer from a website
or internet service within a specific time. Therefore the amount of bandwidth you have (the bandwidth
'strength') determines the efficiency and speed of your internet activity that is, when you open web pages,
download files and so on. A useful analogy is a pipe with water running through it the wider the pipe, the
greater the volume of water that can flow through it. The same applies to bandwidth strength and the flow of
the volume of data. Bandwidth is generally measured in bits per second' or sometimes bytes per second'.
ARPANET- :
Advanced Research Projects Agency Network, ARPANET or ARPAnet began development
in 1966 by the United States ARPA. ARPANET was a Wide Area Network linking many Universities and
research centers, was first to use packet switching, and was the beginning of what we consider the Internet
today. Some of the reasons for creating ARPANET include making it easier for people to access computers, to
improve computer equipment, and to have a more effective communication method for the military.
Bookmark - :
When referring to the Internet or a browser, a bookmark or electronic bookmark is a method of
saving a web page's address. For example, with most browsers pressing Ctrl + D will bookmark the page you
are viewing.
Bounce - :
A description of what occurs when an e-mail message returns back to the sender as undeliverable.
Some e-mail programs also have a bounce or bounce back feature built into them, which allows the user to
bounce messages back to the sender causing the e-mail address to appear invalid.
Cyber Law-:
Cyber law is the part of the overall legal system that deals with the Internet, cyberspace, and
their respective legal issues. Cyber law covers a fairly broad area, encompassing several subtopics including
freedom of expression, access to and usage of the Internet, and online privacy. Generically, cyber law has been
referred to as the Law of the Internet.
DNS-:
Domain Name System or Domain Name Service, a DNS is an Internet or other network server that
helps to point domain names or the hostname to their associated IP address that was introduced by Paul
Mockapetris and Jon Postel in1984. If a domain name is not found within the local database, the server may
query other domain servers to obtain the address of a domain name. For example, when a user is accessing the
ibtindia domain a user would enter the easy to remember domain: ibtindia.com. When entered that domain
name is looked up on a Domain Name System to translate that name into an IP address that can be better
understood by computer, e.g. 69.72.169.241. Using that IP address the computers can then find the computer
containing the ibtindia web page and forward that information to your computer.
Phishing-:
Page 9
Search engine-:
A firewall is a software utility or hardware device that limits outside network access to a computer
or local network by blocking or restricting network ports. Firewalls are a great step for helping prevent unauthorized access to a company or home network. The picture is an example of a hardware firewall, the
ZyXEL ZyWALL a Unified Security Gateway with a Firewall and other security features. In addition to
hardware firewalls like that shown above, basic hardware firewalls are also commonly found in most network
routers and can be configured and setup through the router setup. Software firewalls are designed to protect the
computer they are installed onto by blocking any unrestricted programs from sending and receiving
information from the network or Internet. A good example of a software Firewall is the Windows Firewall that
is included with Microsoft Windows.
Hacking-:
Hacking in simple terms means an illegal intrusion into a
computer system and/or network. There is an equivalent term to
hacking i.e. cracking, but from Indian Laws perspective there is no
difference between the term hacking and cracking. Every act
committed towards breaking into a computer and/or network is
hacking. Hackers write or use ready-made computer programs to
attack the target computer. They possess the desire to destruct and
they get the kick out of such destruction. Some hackers hack for
personal monetary gains, such as to stealing the credit card
information, transferring money from various bank accounts to their
own account followed by withdrawal of money. They extort money
from some corporate giant threatening him to publish the stolen
information which is critical in nature.
Message Switching-:
Page 10
Packet Switching -:
The basic approach is not much
different from message switching. It is also based on the
same store-and-forward approach. However, to overcome
the limitations of message switching, messages are divided
into subsets of equal length called packets. This approach
was developed for long-distance data communication
(1970) and it has evolved over time. In packet switching
approach, data are transmitted in short packets (few
Kbytes). A long message is broken up into a series of
packets as shown in Fig. Every packet contains some
control information in its header, which is required for
routing and other purposes. Main difference between
Packet switching and Circuit Switching is that the
communication lines are not dedicated to passing messages
from the source to the destination. In Packet Switching,
different messages (and even different packets) can pass
through different routes, and when there is a "dead time" in the communication between the source and the
destination, the lines can be used by other sources.
Circuit switching-:
A networking technology that provides a
temporary, but dedicated, connection between two stations no
matter how many switching devices the data are routed
through. Circuit switching was originally developed for the
analog-based telephone system in order to guarantee steady,
consistent service for two people engaged in a phone
conversation. Analog circuit switching Frequency Division
Multiplexing (FDM) has given way to digital circuit switching
Time Division Multiplexing (TDM), and the digital
counterpart still maintains the connection until broken.
Encryption and Decryption-:
Page 11
each one. Private key encryption is essentially the same as a secret code that the two computers must each
know in order to decode the information. The code would provide the key to decoding the message. Think of it
like this. You create a coded message to send to a friend where each letter is substituted by the letter that is
second from it. So "A" becomes "C" and "B" becomes "D". You have already told a trusted friend that the
code is "Shift by 2". Your friend gets the message and decodes it. Anyone else who sees the message will only
see nonsense.
Public key encryption -:
Public key encryption uses a combination of a private key and a public key. The
private key is known only to your computer while the public key is given by your computer to any computer
that wants to communicate securely with it. To decode an encrypted message, a computer must use the public
key provided by the originating computer and it's own private key.
Digital signature-:
Page 12
A database is a logically coherent collection of data with some inherent meaning, representing
some aspect of real world and which is designed, built and populated with data for a specific purpose.
DBMS-:
It is a collection of programs that enables user to create and maintain a database. In other words it is
general-purpose software that provides the users with the processes of defining, constructing and manipulating
the database for various Applications.
Advantages of DBMS-:
1. Redundancy is controlled.
2. Unauthorized access is restricted.
3. Providing multiple user interfaces.
4. Enforcing integrity constraints.
5. Providing backup and recovery.
III-tier Architecture -:
Three levels of data abstraction (III-tier Architecture)-:
They are three levels of abstraction are given below,
1. Physical level: The lowest level of abstraction
describes how data are stored. (How to store the
data?)
2. Logical level: The next higher level of abstraction,
describes what data are stored in database and what
relationship among those data. (What type of data to
be stored?)
3. View level: The highest level of abstraction describes
only part of entire database. (How to show the data?)
Integrity rules-:
There are two types of Integrity rules
1. Entity Integrity: States that "Primary key cannot have NULL value"
2. Referential Integrity: States that "Foreign Key can be either a NULL value or should be Primary
Key value of other relation.
Data Independence-:
Data independence means that "the application is independent of the storage structure
and access strategy of data". In other words, the ability to modify the schema definition in one level should not
affect the schema definition in the next higher level.
Two types of Data Independence:
1. Physical Data Independence: Modification in physical level should not affect the logical level.
2. Logical Data Independence: Modification in logical level should affect the view level.
The people who use the database can be categorized a) Database users
b) Database administrator (DBA)
Database users are of 4 different types that are given below:
1) Naive users:
These are the unsophisticated users who interact with the system by invoking one of the
application programs that have been written previously. E.g. consider a user who checks for account balance
information over the World Wide Web. Such a user access a form, enters the account number and password
etc. And the application program on the internet then retrieves the account balance using given account
information which is passed to the user.
Page 13
2) Application programmers-:
These users write specialized database applications to retrieve data. These applications
can be used to retrieve data with complex data types e.g. graphics data and audio data.
b) Database Administrator (DBA):
A person having who has central control over data and programs that
access the data is called DBA. DBA functions are given below:
1) Schema definition: DBA creates database schema by executing Data Definition Language (DDL)
statements.
2) Storage structure and access method definition
3) Schema and physical organization modification: If any changes are to be made in the original
schema, to fit the need of your organization, then these changes are carried out by the DBA.
4) Granting of authorization for data access: DBA can decide which parts of data can be accessed by
which users. Before any user access the data, dbms checks which rights are granted to the user by
the DBA.
5) Routine maintenance: DBA has to take periodic backups of the database, ensure that enough disk
space is available to store new data, ensure that performance of dbms ix not degraded by any
operation carried out by the users.
SQL-:
SQL stands for Structured Query Language. SQL is used to communicate with a database.
According to ANSI (American National Standards Institute), it is the standard language for relational database
management systems. SQL statements are used to perform tasks such as update data on a database, or retrieve
data from a database. Some common relational database management systems that use SQL are: Oracle,
Sybase, Microsoft SQL Server, Access, Ingres, etc. Although most database systems use SQL, most of them
also have their own additional proprietary extensions that are usually only used on their system. However, the
standard SQL commands such as "Select", "Insert", "Update", "Delete", "Create", and "Drop" can be used to
accomplish almost everything that one needs to do with
a database. This tutorial will provide you with the
instruction on the basics of each of these commands as
well as allow you to put them to practice using the SQL
Interpreter.
Relational Model-:
Page 14
Page 15
If we use multiple attributes to create a Primary Key then that Primary Key is called
Composite Key (also called a Compound Key or Concatenated Key). E.g. of Composite Key, if we have used
Name, Address as a Primary Key then it will be our Composite Key.
(VI) Alternate Key:
Alternate Key can be any of the Candidate Keys except for the Primary Key. E.g. of
Alternate Key is Name, Address as it is the only other Candidate Key which is not a Primary Key.
(VII) Secondary Key:
The attributes that are not even the Super Key but can be still used for identification
of records (not unique) are known as Secondary Key. E.g. of Secondary Key can be Name, Address, Salary,
Department_ID etc. as they can identify the records but they might not be unique.
SQL Commands- :
SQL have the different type of commands that are given below 1. DDL (Data Definition Language)-: A data base schema is specifies by a set of definitions expressed
by a special language called DDL. Example of DDL commands are given below-:
CREATE - to create objects in the database.
ALTER - alters the structure of the database.
DROP - delete objects from the database.
TRUNCATE - remove all records from a table, including all spaces allocated for the records
are removed.
COMMENT - add comments to the data dictionary.
RENAME - rename an object.
2. DML (Data Manipulation Language)-: This language that enable user to access or manipulate data
as organized by appropriate data model. Procedural DML or Low level: DML requires a user to
specify what data are needed and how to get those data. Non-Procedural DML or High level: DML
requires a user to specify what data are needed without specifying how to get those data.
SELECT - retrieve data from the a database
INSERT - insert data into a table
UPDATE - updates existing data within a table
DELETE - deletes all records from a table, the space for the records remain
MERGE - UPSERT operation (insert or update)
CALL - call a PL/SQL or Java subprogram
EXPLAIN PLAN - explain access path to data
LOCK TABLE - control concurrency
3. DCL-: Data Control Language (DCL) statements. Some examples:
GRANT - gives user's access privileges to database
REVOKE - withdraw access privileges given with the GRANT command
4. TCL-: Transaction Control (TCL) statements are used to manage the changes made by DML
statements. It allows statements to be grouped together into logical transactions.
COMMIT - save work done
SAVEPOINT - identify a point in a transaction to which you can later roll back
ROLLBACK - restore database to original since the last COMMIT
SET TRANSACTION - Change transaction options like isolation level and what rollback
segment to use
5. VDL (View Definition Language) -: It specifies user views and their mappings to the conceptual
schema.
6. SDL (Storage Definition Language)-: This language is to specify the internal schema. This language
may specify the mapping between two schemas.
Data dictionary-:
A data dictionary is a collection of descriptions of the data objects or items in a data model
for the benefit of programmers and others who need to refer to them. A first step in analyzing a system of
objects with which users interact is to identify each object and its relationship to other objects. This process is
called data modeling and results in a picture of object relationships. After each data object or item is given a
Page 16
descriptive name, its relationship is described (or it becomes part of some structure that implicitly describes
relationship), the type of data (such as text or image or binary value) is described, possible predefined values
are listed, and a brief textual description is provided. This collection can be organized for reference into a book
called a data dictionary.
ER model-:
The ER model defines the conceptual view of a database. It works around real-world entities and
the associations among them. At view level, the ER model is considered a good option for designing databases.
Entity-:
An entity can be a real-world object, either
animate or inanimate, that can be easily identifiable. For
example, in a school database, students, teachers, classes,
and courses offered can be considered as entities. All these
entities have some attributes or properties that give them their identity.
Entity set-:
An entity set is a collection of similar types of entities. An entity set may contain entities with
attribute sharing similar values. For example, a Students set may contain all the students of a school; likewise a
Teachers set may contain all the teachers of a school from all faculties. Entity sets need not be disjoint.
Attributes-:
Entities are represented by means of their properties, called attributes. All attributes have values.
For example, a student entity may have name, class, and age as attributes. There are different type of attributes
that are given below1. Simple attribute:
Simple attributes are atomic values, which cannot be divided further. For example, a
student's phone number is an atomic value of 10 digits.
2. Composite attribute:
Composite attributes are made of more than one simple attribute. For example, a
student's complete name may have first_name and last_name.
3. Derived attribute :
Derived attributes are the attributes that do not exist in the physical database, but
their values are derived from other attributes present in the database. For example, average_salary in a
department should not be saved directly in the database, instead it can be derived. For another example, age
can be derived from data_of_birth.
4. Single-value attribute:
Single-value
attributes
contain
single
value.
For
example
Social_Security_Number.
5. Multi-value attribute:
Multi-value attributes may contain more than one values. For example, a person
can have more than one phone number, email_address, etc.
Generalization-:
As mentioned above, the process of generalizing entities,
where the generalized entities contain the properties of all the generalized
entities is called generalization. In generalization, a number of entities
are brought together into one generalized entity based on their similar
characteristics. For example, pigeon, house sparrow, crow and dove can
all be generalized as Birds.
Specialization-:
Specialization is the opposite of generalization. In specialization, a group of entities is
divided into sub-groups based on their characteristics. Take a group Person for example. A
person has name, date of birth, gender, etc. These properties are common in all persons,
human beings. But in a company, persons can be identified as employee, employer,
Page 17
customer, or vendor, based on what role they play in the company. Similarly, in a school database, persons can
be specialized as teacher, student, or a staff, based on what role they play in school as entities.
Normalization-:
If a database design is not perfect, it may contain anomalies, which are like a bad dream for any
database administrator. Managing a database with anomalies is next to impossible.
Update anomalies :
If data items are scattered and are not linked to each other properly, then it could lead to
strange situations. For example, when we try to update one data item having its copies scattered over several
places, a few instances get updated properly while a few others are left with old values. Such instances leave
the database in an inconsistent state.
Deletion anomalies -:
We tried to delete a record, but parts of it was left undeleted because of unawareness,
the data is also saved somewhere else.
Insert anomalies -:
We tried to insert data in a record that does not exist at all. Normalization is a method to
remove all these anomalies and bring the database to a consistent state.
First Normal Form-:
First Normal Form is defined in the definition of relations (tables) itself. This rule defines
that all the attributes in a relation must have atomic domains. The values in an atomic domain are indivisible
units. We re-arrange the relation (table) as below, to convert it to First Normal Form.
Each attribute must contain only a single value from its pre-defined domain.
Second Normal Form-:
Before we learn about the second normal form, we need to understand the following
1. Prime attribute : An attribute, which is a part of the prime-key, is known as a prime attribute.
2. Non-prime attribute : An attribute, which is not a part of the prime-key, is said to be a non-prime
attribute. If we follow second normal form, then every non-prime attribute should be fully functionally
dependent on prime key attribute. That is, if X A holds, then there should not be any proper subset Y of X,
for which Y A also holds true. We see here in Student_Project relation that the prime key attributes are
Stu_ID and Proj_ID. According to the rule, non-key attributes, i.e. Stu_Name and Proj_Name must be
dependent upon both and not on any of the prime key attribute individually. But we find that Stu_Name can be
identified by Stu_ID and Proj_Name can be identified by Proj_ID independently. This is called partial
dependency, which is not allowed in Second Normal Form. We broke the relation in two as depicted in the
above picture. So there exists no partial dependency.
Page 18
For a relation to be in Third Normal Form, it must be in Second Normal form and the
following must satisfy No non-prime attribute is transitively dependent on prime key attribute. For any nontrivial functional dependency, X A, then either X is a super key or, A is prime attribute. We find that in
the above Student_detail relation, Stu_ID is the key and only prime key attribute. We find that City can be
identified by Stu_ID as well as Zip itself. Neither Zip is a super key nor is City a prime attribute. Additionally,
Stu_ID Zip City, so there exists transitive dependency. To bring this relation into third normal form, we
break the relation into two relations as follows-
Atomicity This property states that a transaction must be treated as an atomic unit, that is, either all
of its operations are executed or none. There must be no state in a database where a transaction is left
partially completed. States should be defined either before the execution of the transaction or after
the execution/abortion/failure of the transaction.
Consistency The database must remain in a consistent state after any transaction. No transaction
should have any adverse effect on the data residing in the database. If the database was in a
consistent state before the execution of a transaction, it must remain consistent after the execution of
the transaction as well.
Durability The database should be durable enough to hold all its latest updates even if the system
fails or restarts. If a transaction updates a chunk of data in a database and commits, then the database
will hold the modified data. If a transaction commits but the system fails before the data could be
written on to the disk, then that data will be updated once the system springs back into action.
Isolation In a database system where more than one transaction are being executed simultaneously
and in parallel, the property of isolation states that all the transactions will be carried out and
executed as if it is the only transaction in the system. No transaction will affect the existence of any
other transaction.
OLAP-:
On Line Analytical Processing (OLAP) is a Business Intelligence (BI) reporting system. OLAP
provides the user with the capability to sum, count, average and do other simple arithmetic operations on
groups of data. An OLAP report has measures and dimensions. Measures are the data values to be displayed.
Page 19
Dimensions are characteristics of the measures. OLAP reports are called OLAP cubes, although such reports
are not limited to three dimensions.
ODBC-:
ODBC is a standard that contains an interface that provides a common language for application
programs to access and process SQL databases. In order to use ODBC, a driver, server name, database name,
user id, and password are required. ODBC is important for Internet applications and has gained wide
acceptance.
ODBC- :
ODBC is a standard that contains an interface that provides a common language for application
programs to access and process SQL databases. In order to use ODBC, a driver, server name, database name,
user id, and password are required. ODBC is important for Internet applications and has gained wide
acceptance.
Entity-:
It is a 'thing' in the real world with an independent existence.
Entity type-:
It is a collection (set) of entities that have same attributes.
Entity set-:
It is a collection of all entities of particular entity type in the database.
Weak Entity set-:
An entity set may not have sufficient attributes to form a primary key, and its primary key
compromises of its partial key and primary key of its parent entity, then it is said to be Weak Entity set.
Database Trigger-:
A database trigger is a PL/SQL block that can defined to automatically execute for insert,
update, and delete statements against a table. The trigger can e defined to execute once for the entire statement
or once for every row that is inserted, updated, or deleted. For any one table, there are twelve events for which
you can define database triggers. A database trigger can call database procedures that are also written in
PL/SQL.
Cold backup and hot backup (in case of Oracle)-:
Cold Backup-:
It is copying the three sets of files (database files, redo logs, and control file) when the instance
is shut down. This is a straight file copy, usually from the disk directly to tape. You must shut down the
instance to guarantee a consistent copy. If a cold backup is performed, the only option available in the event of
data file loss is restoring all the files from the latest backup. All work performed on the database since the last
backup is lost.
Hot Backup-:
Some sites (such as worldwide airline reservations systems) cannot shut down the database
while making a backup copy of the files. The cold backup is not an available option.
SQL view-:
A SQL view is a virtual table built from other tables or views. Views are used to
(1) Hide columns or rows,
(2) show the results of computed columns,
(3) Hide complicated SQL syntax,
(4) Layer built-in functions,
(5) provide a level of indirection between application programs and tables,
(6) Assign different sets of processing permissions to tables, and
(7) To assign different sets of triggers to the same table.
What is Trigger-:
A trigger is a SQL procedure that initiates an action when an event (INSERT, DELETE or
UPDATE) occurs. Triggers are Stored in and managed by the DBMS. Triggers are used to maintain the
referential integrity of data by changing the data in a systematic fashion. A trigger cannot be called or
executed; DBMS automatically fires the trigger as a result of a data modification to the associated table.
Page 20
Triggers can be viewed as similar to stored procedures in that both consist of procedural logic that is stored at
the database level. Stored procedures, however, are not event-drive and are not attached to a specific table as
triggers are. Stored procedures are explicitly executed by invoking a CALL to the procedure while triggers are
implicitly executed. In addition, triggers can also execute stored procedures.
What is Cursor-:
Cursor is a database object used by applications to manipulate data in a set on a row-by- row
basis, instead of the typical SQL commands that operate on all the rows in the set at one time.
In order to work with a cursor we need to perform some steps in the following order:
1. Declare cursor
2. Open cursor
3. Fetch row from the cursor
4. Process fetched row
5. Close cursor
6. Deallocate cursor
Different Types of Join-:
Cross Join a cross join that does not have a WHERE clause produces the Cartesian
product of the tables involved in the join. The size of a Cartesian product result set is the number of rows in the
first table multiplied by the number of rows in the second table. The common example is when company wants
to combine each product with a pricing table to analyze each product at each price.
Inner Join- A join that displays only the rows that have a match in both joined tables is known as inner Join.
This is the default type of join in the Query and View Designer.
Outer Join- A join that includes rows even if they do not have related rows in the joined table is an Outer
Join. You can create three different outer join to specify the unmatched rows to be included:
Left Outer Join- In Left Outer Join all rows in the first-named table i.e. "left" table, which appears leftmost in
the JOIN clause are included. Unmatched rows in the right table do not appear.
Right Outer Join- In Right Outer Join all rows in the second-named table i.e. "right" table, which appears
rightmost in the JOIN clause are included. Unmatched rows in the left table are not included.
Full Outer Join- In Full Outer Join all rows in all joined tables are included, whether they are matched or not.
Self Join-This is a particular case when one table joins to itself, with one or two aliases to avoid confusion. A
self join can be of any type, as long as the joined tables are the same. A self join is rather unique in that it
involves a relationship with only one table. The common example is when company has a hierarchal reporting
structure whereby one member of staff reports to another. Self Join can be Outer Join or Inner Join.
Data Warehousing-:
Subject-oriented, meaning that the data in the database is organized so that all the data
elements relating to the same real world event or object are linked together; Time-variant, meaning that the
changes to the data in the database are tracked and recorded so that reports can be produced showing changes
over time; Non-volatile, meaning that data in the database is never over-written or deleted, once committed,
the data is static, read-only, but retained for future reporting. Integrated, meaning that the database contains
data from most or all of an organization's operational applications, and that this data is made consistent.
Page 21
DATA STRUCTURE
DATA STRUCTURE-:
A data structure is said to be linear if its elements from any sequence. There are
basically two ways of representing such linear structure in memory.
a) One way is to have the linear relationships between the elements represented by means of sequential
memory location. These linear structures are called arrays.
b) The other way is to have the linear relationship between the elements represented by means of pointers or
links. These linear structures are called linked lists. The common examples of linear data structure are arrays,
queues, stacks and linked lists.
Non-linear Data Structure-:
This structure is mainly used to represent data containing a hierarchical
relationship between elements. E.g. graphs, family trees and table of contents.
Page 22
Array-:
The simplest type of data structure is a linear (or one dimensional) array. A list of a finite number n of
similar data referenced respectively by a set of n consecutive numbers, usually 1, 2, 3 . . . . . . . n. if we choose
the name A for the array, then the elements of A are denoted by subscript notation.
Linked List-:
A linked list or one way list is a linear collection of data elements, called nodes, where the linear
order is given by means of pointers. Each node is divided into two parts:
1.The first part contains the information of the element/node
2.The second part contains the address of the next node (link /next pointer field) in the list.
There is a special pointer Start/List contains the address of first node in the list. If this special pointer contains
null, means that List is empty.
Abstract Data Type-:
It can be defined as a collection of data items together with the operations on the data.
The word abstract refers to the fact that the data and the basic operations defined on it are being studied
independently of how they are implemented. It involves what can be done with the data, not how has to be
done. For ex, in the below figure the user would be involved in checking that what can be done with the data
collected not how it has to be done.
Queue- :
A queue is a linear list of elements in
which deletion can take place only at one end,
called the front, and insertions can take place only
at the other end, called the rear. The term front
and rear are used in describing a linear list only
when it is implemented as a queue. Queue is also
called first-in-first-out (FIFO) lists. Since the first
element in a queue will be the first element out of
the queue. In other words, the order in which elements enters a queue is the order in which they leave.
There are main two ways to implement a queue:
1. Circular queue using array
2. Linked Structures (Pointers)
Primary queue operations:
Enqueue : insert an element at the rear of the queue.
Dequeue : remove an element from the front of the queue Following is the algorithm which describes the
implementation of Queue using an Array.
Priority queue-:
Priority queue is a linear data structure. It is having a list of items in which each item has
associated priority. It works on a principle add an element to the queue with an associated priority and remove
the element from the queue that has the highest priority. In general different items may have different
priorities. In this queue highest or the lowest priority item are inserted in random order. It is possible to delete
an element from a priority queue in order of their priorities starting with the highest priority. While priority
queues are often implemented with heaps, they are
conceptually distinct from heaps. A priority queue is an
abstract concept like "a list" or "a map"; just as a list can be
implemented with a linked list or an array, a priority queue
can be implemented with a heap or a variety of other
methods such as an unordered array.
Stack-:
It is an ordered group of homogeneous items of
elements. Elements are added to and removed from the top
of the stack (the most recently added items are at the top of
the stack). The last element to be added is the first to be
removed (LIFO: Last In, First Out).
Page 23
Stack Operations-:
These are two basic operations associated with stack:
1. Push() is the term used to insert/add an element into a stack.
2. Pop() is the term used to delete/remove an element from a stack.
Tree - :
A node is a structure which may contain a value, a condition, or represent a separate data structure
(which could be a tree of its own). Each node in a tree has zero or more child nodes, which are below it in the
tree (by convention, trees grow down, not up as they do in nature). A node that has a child is called the child's
parent node (or ancestor node, or superior). A node has at most one parent. Nodes that do not have any
children are called leaf nodes. They are also referred to as terminal nodes. The height of a node is the length
of the longest downward path to a leaf from that node. The height of the root is the height of the tree. The
depth of a node is the length of the path to its root (i.e., its root path).
Binary Tree -:
The binary tree is a fundamental data structure
used in computer science. The binary tree is a useful data
structure for rapidly storing sorted data and rapidly retrieving
stored data. A binary tree is composed of parent nodes, or
leaves, each of which stores data and also links to up to two
other child nodes (leaves) which can be visualized spatially as
below the first node with one placed to the left and with one
placed to the right. It is the relationship between the leaves
linked to and the linking leaf, also known as the parent node,
which makes the binary tree such an efficient data structure. It is
the leaf on the left which has a lesser key value (i.e, the value
used to search for a leaf in the tree), and it is the leaf on the right
which has an equal or greater key value. As a result, the leaves
on the farthest left of the tree have the lowest values, whereas
the leaves on the right of the tree have the greatest values. More
importantly, as each leaf connects to two other leaves, it is the beginning of a new, smaller, binary tree. Due to
this nature, it is possible to easily access and insert data in a binary tree using search and insert functions
recursively called on successive leaves.
Complete Binary Tree -:
Page 24
This traversal visits nodes by levels from top to bottom and from left to right. As an example consider the
following tree and its four traversals:
PreOrder - 8, 5, 9, 7, 1, 12, 2, 4, 11, 3
InOrder - 9, 5, 1, 7, 2, 12, 8, 4, 3,11
PostOrder - 9, 1, 2, 12, 7, 5, 3, 11,4, 8
In the next picture we demonstrate the order of node visitation. Number 1 denotes the first node in a particular
traversal and 7 denote the last node.
Page 25
returned. Otherwise, if the search key is less than the middle element's key, then the algorithm repeats its
action on the sub-array to the left of the middle element or, if the search key is greater, on the sub-array to the
right. If the remaining array to be searched is empty, then the key cannot be found in the array and a special
"not found" indication is returned.
Graph-:
Data sometimes contains a relationship between
pairs of elements which is not necessarily hierarchical in
nature, e.g. an airline flights only between the cities
connected by lines. This data structure is called Graph.
Graph representation: a graph is a collection of vertices
(or nodes), pairs of which are joined by edges (or lines).
Graph operations and representation-:
1. Path problems: Since a graph may have more than one path between two vertices, we may be interested
in finding a path with a particular property. For example, find a path with the minimum length from the
root to a given vertex (node).
2. Simple path: a path in which all vertices, except possibly the first and last, are different.
3. Undirected graph: a graph whose vertices do not specify a specific direction.
4. Directed graph: a graph whose vertices do specify a specific direction.
5. Connected graph: there is at least one path between every pair of vertices.
6. Bipartite graphs: graphs that have vertexes that are partitioned into 2 subsets A and B, where every edge
has one endpoint in subset A and the other endpoint in subset B.
7. A complete graph: an n-vertex undirected graph with n(n-1)/2 edges is a complete graph.
8. A complete digraph: (denoted as Kn) for n-vertices a complete digraph contains exactly n(n-1) directed
edges
9. Incident: the edge (i, j) is incident on the vertices i and j (there is a path between i and j)
10. In-degree: the in-degree d of vertex i is the # of edges incident to i (the # of edges coming into this vertex)
11. The out-degree: the out-degree d of vertex i is the # of edges incident from vertex i (the # of edges
leaving vertex i)
12. The degree of a vertex: the degree d of vertex i of an undirected graph is the number of edges incident on
vertex i
13. Connected component: a maximal sub-graph that is connected, but you cannot add vertices and edges
from the original graph and retain connectedness. A connected graph has EXACTLY one component
14. Communication network: Each edge is a feasible link that can be constructed. Find the components and
create a small number of feasible links so that the resulting network is connected
15. Cycles: the removal of an edge that is on a cycle does not affect the networks connectedness (a cycle
creates a sort of loop between certain vertices, for example there is a path that links vertex a to b to c and
then back to a)
Spanning problems:
A spanning tree: is a sub-graph that includes all vertices of the original graph without
cycles. Start a breadth-first search at any vertex of the graph. If the graph is connected, the n-1 edges are used
to get to the unvisited vertices define the spanning tree (breadth-first Spanning tree)
Page 26
OPERATING SYSTEM
Operating system -:
An operating system is a
program that acts as an interface between the user and
the computer hardware and controls the execution of all
kinds of programs.
Following are some of important functions of an
operating System.
1. Memory Management
2. Processor Management
3. Device Management
4. File Management
5. Security
6. Control over system performance
7. Job accounting
8. Error detecting aids
9. Coordination between other software and users
Following are some of the important activities that Operating System does.
Security -- By means of password and similar other techniques, preventing unauthorized access to
programs and data.
Control over system performance -- Recording delays between request for a service and response
from the system.
Job accounting -- Keeping track of time and resources used by various jobs and users.
Error detecting aids -- Production of dumps, traces, error messages and other debugging and error
detecting aids.
Page 27
Coordination between other software and users -- Coordination and assignment of compilers,
interpreters, assemblers and other software to the various users of the computer systems.
Types of operating System-:
1. Real Time operating System-:
Real time system is defines as a data processing system in which the
time interval required to process and respond to inputs is so small that it controls the environment. Real time
processing is always on line whereas on line system need not be real time. The time taken by the system to
respond to an input and display of required updated information is termed as response time. So in this method
response time is very less as compared to the online processing. Real-time systems are used when there are
rigid time requirements on the operation of a processor or the flow of data and real-time systems can be used
as a control device in a dedicated application. Real-time operating system has well-defined, fixed time
constraints otherwise system will fail. For example Scientific experiments, medical imaging systems, industrial
control systems, weapon systems, robots, and home-applicance controllers, Air traffic control system etc.
There are two types of real-time operating systems.
a) Hard real-time systems-: Hard real-time systems guarantee that critical tasks complete on time. In
hard real-time systems secondary storage is limited or missing with data stored in ROM. In these
systems virtual memory is almost never found.
b) Soft real-time systems-: Soft real time systems are less restrictive. Critical real-time task gets priority
over other tasks and retains the priority until it completes. Soft real-time systems have limited utility
than hard real-time systems. For example, Multimedia, virtual reality, Advanced Scientific Projects
like undersea exploration and planetary rovers etc.
2. Distributed operating System-:
Distributed systems use multiple central processors to serve multiple
real time application and multiple users. Data processing jobs are distributed among the processors
accordingly to which one can perform each job most efficiently. The processors communicate with
one another through various communication lines (such as high-speed buses or telephone lines). These
are referred as loosely coupled systems or distributed systems. Processors in a distributed system may
vary in size and function. These processors are referred as sites, nodes, computers and so on.
3. Time-sharing operating systems-:
Time sharing is a technique which enables many people, located at
various terminals, to use a particular computer system at the same time. Time-sharing or multitasking is a
logical extension of multiprogramming. Processor's time which is shared among multiple users simultaneously
is termed as time-sharing. The main difference between Multiprogrammed Batch Systems and Time-Sharing
Systems is that in case of Multiprogrammed batch systems, objective is to maximize processor use, whereas in
Time-Sharing Systems objective is to minimize response time. Multiple jobs are executed by the CPU by
switching between them, but the switches occur so frequently. Thus, the user can receive an immediate
response. Operating system uses CPU scheduling and multiprogramming to provide each user with a small
portion of a time. Computer systems that were designed primarily as batch systems have been modified to
time-sharing systems.
Advantages of Timesharing operating systems are following-:
Provide advantage of quick response.
Avoids duplication of software.
Reduces CPU idle time.
Disadvantages of Timesharing operating systems are following.
Problem of reliability.
Question of security and integrity of user programs and data.
Problem of data communication.
4. Batch operating system-:
The users of batch operating system do not interact with the computer directly.
Each user prepares his job on an off-line device like punch cards and submits it to the computer operator. To
speed up processing, jobs with similar needs are batched together and run as a group. Thus, the programmers
left their programs with the operator. The operator then sorts programs into batches with similar requirements.
Page 28
5. Multitasking -:
Multitasking refers to term where multiple
jobs are executed by the CPU simultaneously by switching
between them. Switches occur so frequently that the users
may interact with each program while it is running. Operating
system does the following activities related to multitasking.
The user gives instructions to the operating system or to a
program directly, and receives an immediate response.
Operating System handles multitasking in the way that it can
handle multiple operations / executes multiple programs at a
time. Multitasking Operating Systems are also known as
Time-sharing systems. These Operating Systems were developed to provide interactive use of a computer
system at a reasonable cost.
A time-shared operating system uses concept of CPU scheduling and multiprogramming to provide each user
with a small portion of a time-shared CPU. Each user has at least one separate program in memory.
6. Multiprogramming-:
Page 29
Advantages-:
The spooling operation uses a disk as a very large buffer. Spooling is capable of overlapping I/O
operation for one job with processor operations for another job.
Process-:
A process is a program in execution. The execution of a process must progress in a sequential
fashion. Definition of process is following. A process is defined as an entity which represents the basic unit of
work to be implemented in the system.
Program-:
A program by itself is not a process. It is a static entity made up of program statement while process
is a dynamic entity. Program contains the instructions to be executed by processor. A program takes a space at
single place in main memory and continues to stay there. A program does not perform any action by itself.
Process States-:
As a process executes, it changes state. The state of a process is defined as the current activity
of the process. Process can have one of the following five states at a time.
S.N.
1
2
3
4
5
Process control block includes CPU scheduling, I/O resource management, file management information etc.
The PCB serves as the repository for any information which can vary from process to process. Loader/linker
sets flags and registers when a process is created. If that process get suspended, the contents of the registers are
saved on a stack and the pointer to the particular stack frame is stored in the PCB. By this technique, the
hardware state can be restored so that the process can be scheduled to run again.
Page 30
Schedulers-:
Schedulers are special system softwares which handles process scheduling in various ways.
Their main task is to select the jobs to be submitted into the system and to decide which process to run.
Schedulers are of three types Long Term Scheduler
Short Term Scheduler
Medium Term Scheduler
Long Term Scheduler -:
It is also called job scheduler. Long term scheduler determines which programs are
admitted to the system for processing. Job scheduler selects processes from the queue and loads them into
memory for execution. Process loads into the memory for CPU scheduling. The primary objective of the job
scheduler is to provide a balanced mix of jobs, such as I/O bound and processor bound. It also controls the
degree of multiprogramming. If the degree of multiprogramming is stable, then the average rate of process
creation must be equal to the average departure rate of processes leaving the system. On some systems, the
long term scheduler may not be available or minimal. Time-sharing operating systems have no long term
scheduler. When process changes the state from new to ready, then there is use of long term scheduler.
Short Term Scheduler-:
It is also called CPU scheduler. Main objective is increasing system performance in
accordance with the chosen set of criteria. It is the change of ready state to running state of the process. CPU
scheduler selects process among the processes that are ready to execute and allocates CPU to one of them.
Short term scheduler also known as dispatcher, execute most frequently and makes the fine grained decision of
which process to execute next. Short term scheduler is faster than long term scheduler.
Medium Term Scheduler-:
Medium term scheduling is part of the swapping. It removes the processes from
the memory. It reduces the degree of multiprogramming. The medium term scheduler is in-charge of handling
the swapped out-processes. Running process may become suspended if it makes an I/O request. Suspended
processes cannot make any progress towards completion. In this condition, to remove the process from
memory and make space for other process, the suspended process is moved to the secondary storage. This
process is called swapping, and the process is said to be swapped out or rolled out. Swapping may be
necessary to improve the process mix. Comparison between Scheduler-:
S.N.
1
2
3
4
5
Scheduling Algorithms-: there are different types of algorithms that are given below
1. First Come First Serve (FCFS) Scheduling 2. Shortest-Job-First (SJF) Scheduling
3. Priority Scheduling
4. Round Robin(RR) Scheduling
5. Multilevel Queue Scheduling
Page 31
Thread-:
A thread is a flow of execution through the process code, with its own program counter, system
registers and stack. A thread is also called a light weight process. Threads provide a way to improve
application performance through parallelism. Threads represent a software approach to improving performance
of operating system by reducing the overhead thread is equivalent to a classical process. Each thread belongs
to exactly one process and no thread can exist outside a process. Each thread represents a separate flow of
control. Threads have been successfully used in implementing network servers and web server. They also
provide a suitable foundation for parallel execution of applications on shared memory multiprocessors.
Following figure shows the working of the single and multithreaded processes.
Difference between Process and Thread
S.N.
1
Process
Process is heavy weight or resource intensive.
3
4
5
6
Thread
Thread is light weight taking lesser resources
than a process.
Thread switching does not need to interact
with operating system.
All threads can share same set of open files,
child processes.
While one thread is blocked and waiting,
second thread in the same task can run.
Multiple threaded processes use fewer
resources.
One thread can read, write or change another
thread's data.
Swapping- :
Swapping is a mechanism in which a process can be swapped temporarily out of main memory to
a backing store, and then brought back into memory for continued execution. Backing store is a usually a hard
disk drive or any other secondary storage which fast in access and large enough to accommodate copies of all
memory images for all users. It must be capable of providing direct access to these memory images. Major
time consuming part of swapping is transfer time. Total transfer time is directly proportional to the amount of
memory swapped. Let us assume that the user process is of size 100KB and the backing store is a standard
hard disk with transfer rate of 1 MB per second. The actual transfer of the 100K process to or from memory
will take 100KB / 1000KB per second
= 1/10 second
= 100 milliseconds
Page 32
Fragmentation- :
As processes are loaded and removed from memory, the free memory space is broken into
little pieces. It happens after sometimes that processes cannot be allocated to memory blocks considering their
small size and memory blocks remains unused. This problem is known as Fragmentation.
Paging-:
External fragmentation is avoided by using paging technique. Paging is a technique in which physical
memory is broken into blocks of the same size called pages (size is power of 2, between 512 bytes and 8192
bytes). When a process is to be executed, it's corresponding pages are loaded into any available memory
frames. Logical address space of a process can be non-contiguous and a process is allocated physical memory
whenever the free memory frame is available. Operating system keeps track of all free frames. Operating
system needs n free frames to run a program of size n pages. Address generated by CPU is divided into
Page number (p) - page number is used as an index into a page table which contains base address of each
page in physical memory.
Page offset [D] - page offset is combined with base address to define the physical memory address.
Segmentation-:
Segmentation is a technique to break memory into logical pieces where each piece represents a
group of related information. For example, data segments or code segment for each process, data segment for
operating system and so on. Segmentation can be implemented using or without using paging. Unlike paging,
segment are having varying sizes and thus eliminates internal fragmentation. External fragmentation still exists
but to lesser extent.
Deadlocks-:
The above points focus on preventing deadlocks. But what to do once a deadlock has
occurred. Following three strategies can be used to remove deadlock after its occurrence.
1. Preemption-:
We can take a resource from one process and give it to other. This will resolve the deadlock
situation, but sometimes it does causes problems.
Page 33
2. Rollback-:
In situations where deadlock is a real possibility, the system can periodically make a record of
the state of each process and when deadlock occurs, roll everything back to the last checkpoint, and restart, but
allocating resources differently so that deadlock does not occur.
3. Kill one or more processes-: This is the simplest way, but it works.
For IBPS- HR and
PERSONNEL Officer
Exams download this
file -
Page 34
Page 35
Page 36
Ans:-D
28. Which of the following is reliable service?
[A] TCP
[B] UDP
[C] Both [A] & (2)
[D] Either [A] nor (2)
[E] None of these
Ans:-A
29. Firewall is used in PC for
[A] Security
[B] Authentication
[C] Data transmission [D] All of these
[E] None of these
Ans:-A
30. A transmission in which receiver receives
the data simultaneously as it is relayed is called
[A] Video-conferencing
[B] Online transmission
[C] Real-time transmission
[D] Offline transmission
[E] None of these
Ans:-C
31. A protocol is:
[A] Service that helps in communicating
[B] Rules that help computer talk
[C] Way of transmission data over the net
[D] All of these
[E] None of these
Ans:-B
32. Which of the following are relational
integrity constraints?
[A] Null value
[B] Primary key
[C] Referential integrity [D] All the above
[E] None of these
Ans:-D
33. Which of the following do think is NOT to
develop an application for computer?
[A] Feasibility study
[B] Designing
[C] Testing
[D] All the above
[E] None of these
Ans:-D
34. Binary equivalent to 87 is:
[A] 1010111
[B] 1101111
[C] 1011111
[D] 10111111
[E] None of these
Ans:-A
35. In binary system the highest value of an 8bit number is
[A] 255
[B] 256
[C] 253
[D] 259
[E] None of these
Ans:-A
36. Which of them is true?
Page 37
Page 38
Page 39
Page 40
Page 41
Ans:-B
98. Auxiliary storage consists of
[A] Magnetic tapes
[B] CDs
[C] Both of these
[D] All of these
[E] None of these
Ans:-A
99. Who can provides access rights to users?
[A] Data custodian
[B] Data owner
[C] The data base administrator
[D] Management
[E] None of these
Ans:-C
100. Security policy of an organization need not
have
[A] The overall security philosophy of the
organization
[B] The authorization procedure for accessing data
[C] Security awareness program
[D] Highlights and identity of the sensitive
security features
[E] None of these
Ans:-D
101. In case of a virus getting into computer,
which of the following will help?
[A] Encryption
[B] NORTON
[C] Police complaint
[D] All of these
[E] None of these
Ans:-B
102. Which of the following do you think is
NOT necessary for computerization system in a
bank?
[A] Effective customer service
[B] Effective back office integration
[C] Focus on manual records
[D] All of these
[E] None of these
Ans:-C
103. Which of the following is reliable service?
[A] TCP
[B] UDP
[C] Both [A] & (2)
[D] Either [A] nor (2)
[E] None of these
Ans:-A
104. Firewall is used in PC for
[A] Security
[B] Authentication
[C] Data transmission
[D] All of these
[E] None of these
Ans:-A
105. A transmission in which receiver receives
the data simultaneously as it is relayed is called
[A] Video-conferencing
[B] Online transmission
[C] Real-time transmission
[D] Offline transmission
[E] None of these
Ans:-C
106. Which of the following are relational
integrity constraints?
[A] Null value
[B] Prim any key
[C] Referential integrity
[D] All the above
[E] None of these
Ans:-D
107. Which of the following do think is NOT to
develop an application for computer?
[A] Feasibility study
[B] Designing
[C] Testing
[D] All the above
[E] None of these
Ans:-D
108. Binary equivalent to 87 is:
[A] 1010111
[B] 1101111
[C] 1011111
[D] 10111111
[E] None of these
Ans:-A
109. Maximum storage space is available on
[A] CDs
[B] Floppies
[C] ROM
[D] Hard disc
[E] None of these
Ans:-D
110. ____________ deals with the restructuring
of existing source code in reverse engineering.
[A] Abstraction
[B] Completeness
[C] Users screen
[D] Directionality
[E] None of these
Ans:-D
Page 42
Page 43
[C]Locked cell
[D]data
Ans-A
131. The traditional file processing approach to
information systems results in a great deal of:
[A]loss of dat[A]
[B]data extraction.
[C]data redundancy.
[D]data integrity.
Ans-C
132. This is a collection of related files in which
each table contains data concerning only a
single entity.
[A]Database
[B]Spreadsheet
[C]Data set
[D]Presentation
Ans-A
133. What is the name for the rules that data
must follow to maintain integrity?
[A] Data standards
[B]Integrity rules
[C]Integrity constraints
[D]Database constraints
Ans-C
134. A software package that allows the user to
create a database, enter data into the database,
modify the data as required, and retrieve
information from the database is a:
[A]Database Management System
[B]Network Management System
[C]Data Retrieval System
[D]Data Query System
Ans-A
135. What stores data about the tables and
fields within the database?
[A]A data index
[B]A data directory
[C]A data form
[D]A data dictionary
Ans-B
136. Adding new data, modifying existing data,
and deleting data are called:
[A]data manipulation.
[B]data restoration.
[C]data operation.
[D]data maintenance.
Ans-D
137. What is the standard query language
supported by most DBMSs?
[A]Object-oriented language
[B]Report generator language
Page 44
[C]Abstract language
[D]data language
Ans-B
145. __________ are designed using a report
generator built into the DBMS.
[A]Queries
[B]Reports
[C]Repair
[D]Acess
Ans-B
146. Read-only __________ permits that user
only to look at the dat[A]
[A]privilege
[B]endorsement
[C]Memory
[D]Data
Ans-A
147. What is an organized set of related
components established to accomplish a certain
task?
[A]A group
[B]A system
[C]A department
[D]A team
Ans-B
148. The most widely used coding scheme is----------[A]ASCII
[B]Unicode
[C]EBCDIC
[D]Hexadecimal
Ans-A
149. A microprocessor is a:
[A]Central processing unit on a chip
[B]Motherboard
[C]Memory module
[D]TrAnsistor
Ans-A
150. A system bus:
[A]runs at 100 MHz
[B]Transports data between the CPU and memory.
[C]Uses a set of serial electrical paths.
[D]Is always the same size.
Ans-B
151. Expansion boards are also called:
[A]Adapter cards.
[B]Serial ports.
[C]USB ports.
[D]Parallel ports.
Ans-A
153. The IEEE 1394 bus is a(n):
[A]PC Card bus.
Page 45
[A]Pipelining
[B]Caching
[C]Buffering
[D]Real Time
Ans-A
161. The two parts of the __________ are the
control unit and the arithmetic/logic unit.
[A]central processing unit
[B]Primary storage
[C]RAM
[D]ROM
Ans-A
162. The __________ contains circuitry that
uses electrical signals to direct the entire
computer system to carry out, or execute,
stored program instructions.
[A]Arithmetic/logic unit (ALU)
[B]control unit
[C]CPU
[D]RAM
Ans-B
163. Memory is also known as primary storage,
primary memory, __________, internal storage,
and main memory.
[A]secondary storage
[B]main storage
[C]Primary storage
[D]secondary memory
Ans-B
164. Before an instruction can be executed,
program instructions and data must be placed
into memory from a(n) __________ or a
secondary storage device.
[A]diskette
[B]input device
[C]Output device
[D]CPU
Ans-B
165. The combination of I-time and E-time is
called the __________.
[A]instruction set
[B]machine cycle
[C]Pipeline
[D]Processing set
Ans-B
166. Which systems can interpret sustained
speech so that users can speak almost
normally?
[A]Continuous word
[B]Instant word
[C]Discrete word
[D]Virtual word
Page 46
Ans-A
167. Digital photographs are composed of:
[A]Points.
[B]Pixels.
[C]Frames.
[D]Digits.
Ans-B
168. Digital video consists of a series of:
[A]Media clips.
[B]Captures.
[C]Frames.
[D]Pictures.
Ans-C
169. The number of times an electron beam
refreshes a CRT screen is called the:
[A]Pulse rate.
[B]Image rate.
[C]Scan rate.
[D]CRT rate.
Ans-C
170. The graphics standard most commonly
used today is:
[A]SVGA
[B]LCD
[C]RGB
[D]VGA
Ans-A
172. A new class of displays based on flat panel
technology is called:
[A]Passive matrix.
[B]Smart displays.
[C]Active matrix.
[D]Liquid crystal display.
Ans-B
173. This printer places an image on a page
without physically touching the page.
[A]Line printer
[B]Impact printer
[C]Non-impact printer
[D]Dot-matrix printer
Ans-C
174. A set of rules designed for connecting
musical instruments, synthesizers, and
computers is:
[A]TFT.
[B]POS.
[C]COM.
[D]MIDI.
Ans-D
175. A combination of input and output devices
designed to capture retail sales data at the point
Page 47
[A]It is permanent.
[B]It is valid
[C]It is problem-free.
[D]It is reliable.
Ans-D
185. Which of the following items are magnetic
media?
[A]Microfiche
[B]Microfilm
[C]Hard disks
[D]Optical disks
Ans-C
186. What is the capacity of the newest Iomega
Zip drive?
[A]550 MB
[B]750 MB
[C]600 MB
[D]200 MB
Ans-B
187. Redundant array of independent disks
(RAID) __________
[A]Uses a group of two or more hard disks that
work together as a unit
[B]is an inexpensive technology
[C]is completely safe
[D]Uses a group of floppy diskettes
Ans-A
188. What is the name for a fixed number of
adjacent sectors that are treated as a unit of
storage by the operating system?
[A]Cylinder
[B]Cluster
[C]Zone
[D]Block
Ans-B
189. The time needed to access data directly on
a disk is called __________.
[A]Access speed
[B]Access time
[C]Run time
[D]Head speed
Ans-B
190. These devices store data using laser beam
technology.
[A]Optical disks
[B]Audio disks
[C]Scanners
[D]Hard disks
Ans-A
191. A disk device in which a computer can go
directly to the desired record on the disk is
Page 48
Ans-B
198. On a hard disk that has multiple platters, a
__________ consists of the track on each
surface that is beneath the read/write head at a
given position of the read/write arms.
[A]cylinder
[B]cluster
[C]Dot matrix
[D]Plater
Ans-A
199. The data __________ rate, which tells how
fast data can be transferred once it has been
found, is usually stated in terms of megabytes of
data per second[A]access
[B]transfer
[C]Copy
[D]Read
Ans-B
200. _______________uses an area of memory
to temporarily store data from disk that the
program might need soon.
[A]Disk caching
[B]Data transferring
[C]Data access
[D]Memory
Ans-A
201. __________ is a set of widely accepted
video compression standards.
[A]MPEG
[B]JPEG
[C]SIV
[D]ASF
Ans-A
202. __________ has a large storage capacity,
up to 17 GB if both layers and both sides are
used[A]DVD-ROM
[B]CD-ROM
[C]EPROM
[D]EEPROM
Ans-A
203. Computer systems that transmit data over
communications lines, such as telephone lines or
cables are:
[A]Data communications systems
[B]Data network
[C]Home-Based systems
[D]Centralized data systems
Ans-A
204. This method places all processing,
hardware, and software in one central location.
Page 49
[C]Teleconferencing
[D]Chatting
Ans-A
212. This method allows businesses to send
common business forms electronically.
[A]Electronic fund trAnsfer (EFT)
[B]Electronic data interchange (EDI)
[C]Facsimile technology (FAX)
[D]Front-end processor (FEP)
Ans-B
213. The most common communications devices
all use __________ transmission, a continuous
electrical signal in the form of a wave.
[A]automatic
[B]analog
[C]Digital
[D]Infrared
Ans-B
214. __________ cards and internal modems
have given portable computers full connectivity
capability outside the constraints of an office.
[A]Graphics
[B]PC
[C]HD
[D]Simple
Ans-B
215. A(n) __________ adapter can move data at
128,000 bps, more than double a standard
modem.
[A]fax
[B]ISDN
[C]Wireless
[D]Cable
Ans-B
216. The __________ modem uses the coaxial
television cables that are already in place
without interrupting normal cable TV
reception.
[A]cellular
[B]cable
[C]FAX
[D]Wireless
Ans-B
217. A popular communications medium is
__________ transmission, which uses line-ofsight transmission of data signals through the
atmosphere.
[A]microwave
[B]fiber optics
[C]Optical
[D]Analog
Ans-A
Page 50
[B]Telnet
[C]Internet
[D]Ethernet
Ans-B
232. __________ is the most-used feature of the
Internet, used even more than the We[B]
[A]E-mail
[B]Voice mail
[C]Transaction mail
[D]Notification mail
Ans-A
233. Internet retail activity is referred to as
__________ e-Commerce.
[A]Business-to-Consumer (B2C)
[B]Business-to-Business (B2B)
[C]Consumer-to-Consumer(C2C)
[D]Business-to-government(B2G)
Ans-A
234. __________ e-Commerce takes place over
the many online auction sites.
[A]Consumer-to-Consumer (C2C)
[B]Business-to-Business (B2B)
[C]Business-to-Consumer (B2C)
[D]Business-to-government(B2G)
Ans-A
235. The de facto standard for online
trAnsaction payments is the __________
protocol.
[A]Secure Sockets Layer (SSL)
[B]Secure Payment Transaction (SPT)
[C]Secure Electronic Transaction (SET)
[D]Standard payement
Ans-A
236. What major issue separates the computing
haves from the have-nots?
[A]Healthy computing
[B]Green computing
[C]Ergonomics
[D]The digital divide
Ans-D
237. What refers to human factors related to
the use of computers?
[A]Employee monitoring
[B]Energy management
[C]Ergonomics
[D]Child monitoring
Ans-C
238. What refers to addressing the
environmental impact of computer use in an
environmentally responsible manner?
[A]Ethical computing
[B]Fair use
Page 51
[C]Cyber squatting
[D]Green computing
Ans-D
239. What standards do many organizations
require all newly purchased computer
equipment to meet?
[A]HUD
[B]ACM
[C]DNR
[D]Energy Star
Ans-D
240. What features do current operating
systems contain that reduce the power
requirements of computer systems?
[A]Energy management features
[B]Power boosters
[C]Energy logos
[D]Surge protectors
Ans-A
241. What is the legislation that prohibits any
new taxes that single out Internet transactions,
such as taxes on Internet service?
[A]The Internet Nondiscrimination Act
[B]The U.S. Copyright Act
[C]The Communications Decency Act
[D]The Neighborhood Children_s Internet
Protection Act
Ans-A
242. What software attempts to prevent
children from accessing objectionable sites?
[A]Desktop management software
[B]Prevention software
[C]Blocking software
[D]Anti-virus software
Ans-C
243. What legislation attempted to prevent
people from preying on children on the
Internet, but was struck down by the Supreme
Court?
[A]The Communications Decency Act
[B]The U.S. Copyright Act
[C]The Internet Nondiscrimination Act
[D]The Digital Millennium Copyright Act
Ans-A
244. What refers to results of intellectual
activity in the industrial, scientific, literary, or
artistic fields?
[A]Copyrights
[B]Patents
[C]Intellectual property (IP)
[D]Trademarks
Ans-C
245. What involves registering common words
and phrases as domain names, with the
Page 52
Page 53
Ans-B
277. A __________ program finds spelling
errors you might have made when typing a
document.
[A]spelling checker
[B]grammar checker
[C]Remove
[D]Delete
Ans-A
278. Any line can be individually __________
between the left and right margins of the page.
[A]aligned
[B]centered
[C]Horizental
[D]Verticall
Ans-B
279. Accidental or incorrect deletions can
usually be repaired with the __________
command
[A]undo
[B]redo
[C]Copy
[D]Print preview
Ans-A
280. Forms that are used to organize business
data into rows and columns are called:
[A]Registers
[B]Spreadsheets
[C]Business forms
[D]TrAnsaction sheets
Ans-B
281. A computerized version of a manual
spreadsheet is a(n):
[A]Analysis sheet
[B] Electronic spreadsheet
[C]Planning sheet
[D]Journal
Ans-B
282. The greatest labor-saving aspect of the
electronic spreadsheet is:
[A]automatic recalculation.
[B]building formulas. [C]building functions.
[D]building charts.
Ans-A
283. The process of changing one or more
spreadsheet values and observing the results is:
[A]what-if analysis.
[B]formula analysis.
[C]business analysis.
[D] break-even analysis.
Ans-A
284. The letter and number of the intersecting
column and row is the:
[A]cell coordinates.
[B]cell location.
[C]cell position.
[D]cell address.
Ans-D
285. The cell in which you can type data is the:
[A]active cell.
[B]new cell.
[C]set cell.
[D]ready cell.
Ans-A
285. In the relational modes, cardinality is
termed as:
[A]Number of tuples. [B]Number of attributes.
[C]Number of tables. [D]Number of constraints.
Ans: A
286. Relational calculus is a
[A]Procedural language.
[B]Non- Procedural language.
[C]Data definition language.
[D]High level language.
Ans: B
287. The view of total database content is
[A]Conceptual view.
[B]Internal view.
[C]External view.
[D]Physical View.
Ans: A
288. Cartesian product in relational algebra is
[A]a Unary operator.
[B]a Binary operator.
[C]a Ternary operator.
[D]not defined.
Ans-B
289. AS clause is used in SQL for
[A]Selection operation. [B]Rename operation.
[C]Join operation.
[D]Projection operation.
Ans-B AS clause is used in SQL for rename
operation.
290. ODBC stands for
[A]Object Database Connectivity.
[B]Oral Database Connectivity.
[C]Oracle Database Connectivity.
[D]Open Database Connectivity.
Ans-D
291. Architecture of the database can be viewed
as
[A]two levels.
[B]four levels.
[C]three levels.
[D]one level.
Ans-C
292. In a relational model, relations are termed
as
[A]Tuples.
[B]Attributes
[C]Tables.
[D]Rows.
Ans-c
293. In the architecture of a database system
external level is the
[A]physical level.
[B]logical level.
[C]conceptual level
[D]view level.
Ans: D
294. An entity set that does not have sufficient
attributes to form a primary key is a
[A]strong entity set.
[B]weak entity set.
[C]simple entity set.
[D]primary entity set.
Ans: B
295. In a Hierarchical model records are
organized as
[A]Graph.
[B]List.
[C]Links.
[D]Tree.
Ans: D
Page 54
Page 55