You are on page 1of 40

ITM UNIT-2

SYLLABUS:

1. application and system software

2. programming language and their classification

3. assemblers, compilers, interpreters

4. process of software development

5. data analysis using spreadsheets operating system

6. functions of OS, types of OS (batch processing, multitasking,


multiprogramming, real time systems)

7. DBMS: traditional file concept and environment, data base management


systems concepts,

8. types of data models

9. ER modeling

10. Integrity constraints

11. SQL queries

SOFTWARE

Computer software, or just software, is a collection of computer programs and


related data that provides the instructions for telling a computer what to do
and how to do it. Any set of instructions that guides the hardware and tells it
how to accomplish each task. Sometimes abbreviated
as SW and S/W, software is a collection of instructions that enable the user to
interact with a computer, its hardware, or perform tasks. Without software,
most computers would be useless.
The computer programmer (or several computers programmers) write the
instructions using a programming language that tell the software how to
function and what to do. Once the program has been completed, it
is compiled into a language that the computer can understand.

1. SYSTEM SOFTWARE

System software is computer software designed to operate the computer


hardware to provide basic functionality and to provide a platform for running
application software.

• Refers to the operating system and all utility programs that manage
computer resources at a low level.

• The BIOS (basic input/output system) gets the computer system started after
you turn it on and manages the data flow between the operating system and
attached devices such as the hard disk, video adapter, keyboard, mouse, and
printer.

• The boot program loads the operating system into the computer's main
memory or random access memory (RAM).

• System software also includes system utilities, such as the disk defragmenter
and System Restore.
Systems software includes the programs that are dedicated to managing the
computer itself, such as the operating system, file management utilities, and
disk operating system (or DOS). The operating system manages the computer
hardware resources in addition to applications and data. Without systems
software installed in our computers we would have to type the instructions for
everything we wanted the computer to do!

2. PROGRAMMING SOFTWARE

• Programming software include tools in the form of programs or applications


that software developers use to create, debug, maintain, or otherwise support
other programs and applications.

• The term usually refers to relatively simple programs such as compilers,


debuggers, interpreters, linkers, and text editors,

• Example of programming language:

C ,C++ , C# , BASIC ,JAVA ,Visual Basic , Phyton, HTML , PHP

3. APPLICATION SOFTWARE
• A program or group of programs designed for end users

• Allows end users to accomplish one or more specific (non-computer related)


tasks.

Application software, or simply applications, are often called productivity


programs or end-user programs because they enable the user to complete
tasks, such as creating documents, spreadsheets, databases and publications,
doing online research, sending email, designing graphics, running businesses,
and even playing games! Application software is specific to the task it is
designed for and can be as simple as a calculator application or as complex as a
word processing application. When you begin creating a document, the word
processing software has already set the margins, font style and size, and the
line spacing for you. But you can change these settings, and you have many
more formatting options available. For example, the word processor
application makes it easy to add color, headings, and pictures or delete, copy,
move, and change the document’s appearance to suit your needs.

Microsoft Word is a popular word-processing application that is included in


the software suite of applications called Microsoft Office. A software suite is a
group of software applications with related functionality. For example, office
software suites might include word processing, spreadsheet, database,
presentation, and email applications

Examples of Computer Application Software • Word processor • Spreedsheet


• Presentation Software • Database Management System • Dekstop Publisher
• Graphic Editor • Web Browser

PROGRAMMING LANGUAGE

• A program is a set of instructions following the rules of the chosen language.


• Without programs, computers are useless. • A program is like a recipe. • It
contains a list of ingredients (called variables) and a list of directions (called
statements) that tell the computer what to do with the variables.
Programming Language • A vocabulary and set of grammatical rules (syntax)
for instructing a computer to perform specific tasks. • Programming languages
can be used to create computer programs. • The term programming language
usually refers to high-level languages, such as BASIC, C, C++, COBOL, FORTRAN,
Ada, and Pascal. • You eventually need to convert your program into machine
language so that the computer can understand it. • There are two ways to do
this: – Compile the program – Interpret the program • Compile is to transform
a program written in a highlevel programming language from source code into
object code. • This can be done by using a tool called compiler. • A compiler
reads the whole source code and translates it into a complete machine code
program to perform the required tasks which is output as a new file •
Interpreter is a program that executes instructions written in a high-level
language. • An interpreter reads the source code one instruction or line at a
time, converts this line into machine code and executes it. • Computer
programming is the process of writing, testing, debugging/troubleshooting,
and maintaining the source code of computer programs. • This source code is
written in a programming language like C++, JAVA, Perl etc.

Just as humans use language to communicate, and different regions have


different languages, computers also have their own languages that are specific
to them.
Different kinds of languages have been developed to perform different types
of work on the computer. Basically, languages can be divided into two
categories according to how the computer understands them.

– Machine language (Low-level language) – Assembly language (Low-level


language) – High-level language • Low-level languages are closer to the
language used by a computer, while high-level languages are closer to human
languages.

There are also other types of languages, which include


● System languages:These are designed for low-level tasks, like memory and
process management
● Scripting languages:These tend to be high-level and very powerful
● Domain-specific languages:These are only used in very specific contexts
● Visual languages:Languages that are not text-based
● Esoteric languages:Languages that are jokes or are not intended for serious
use
These languages are not mutually exclusive, and some languages can belong to
multiple categories. The terms low-level and high-level are also open to
interpretation, and some languages that were once considered high-level are
now considered low-level as languages have continued to develop.

Low-Level Languages
Low-level computer languages are either machine codes or are very close
them. A computer cannot understand instructions given to it in high-level
languages or in English. It can only understand and execute instructions given
in the form of machine language i.e. binary. There are two types of low-level
languages:
● Machine Language:a language that is directly interpreted into the hardware
● Assembly Language: a slightly more user-friendly language that directly
corresponds to machine language

Machine Language • Machine language is a collection of binary digits or bits


that the computer reads and interprets. • Machine languages are the only
languages understood by computers. • While easily understood by computers,
machine languages are almost impossible for humans to use because they
consist entirely of numbers.

Assembly Language • A program written in assembly language consists of a


series of instructions mnemonics that correspond to a stream of executable
instructions, when translated by an assembler, that can be loaded into memory
and executed. • Assembly languages use keywords and symbols, much like
English, to form a programming language but at the same time introduce a
new problem.

Assembly language was developed to overcome some of the many


inconveniences of machine language. This is another low-level but very
important language in which operation codes and operands are given in the
form of alphanumeric symbols instead of 0’s and l’s.
These alphanumeric symbols are known as mnemonic codes and can combine
in a maximum of five-letter combinations e.g. ADD for addition, SUB for
subtraction, START, LABEL etc. Because of this feature, assembly language is
also known as ‘Symbolic Programming Language.’
This language is also very difficult and needs a lot of practice to master it
because there is only a little English support in this language. Mostly assembly
language is used to help in compiler orientations. The instructions of the
assembly language are converted to machine codes by a language translator
and then they are executed by the computer.

• The problem is that the computer doesn't understand the assembly code, so
we need a way to convert it to machine code, which the computer does
understand. • Assembly language programs are translated into machine
language by a program called an assembler.

High Level Language • High-level languages allow us to write computer code


using instructions resembling everyday spoken language (for example: print, if,
while) which are then translated into machine language to be executed. •
Programs written in a high-level language need to be translated into machine
language before they can be executed. • Some programming languages use a
compiler to perform this translation and others use an interpreter.

High-level computer languages use formats that are similar to English. The
purpose of developing high-level languages was to enable people to write
programs easily, in their own native language environment (English).
High-level languages are basically symbolic languages that use English words
and/or mathematical symbols rather than mnemonic codes. Each instruction in
the high-level language is translated into many machine language instructions
that the computer can understand.

Advantages Disadvantages
A high-level language has
to be translated into the
machine language by a
High-level languages are translator, which takes up
user-friendly time
The object code
generated by a translator
They are similar to English might be inefficient
and use English compared to an
vocabulary and well- equivalent assembly
known symbols language program
They are easier to learn
They are easier to
maintain
They are problem-
oriented rather than
‘machine’-based
A program written in a
high-level language can
be translated into many
machine languages and
can run on any computer
for which there exists an
appropriate translator
The language is
independent of the
machine on which it is
used i.e. programs
developed in a high-level
language can be run on
any computer text

Types of High-Level Languages


Many languages have been developed for achieving a variety of different tasks.
Some are fairly specialized, and others are quite general.
These languages, categorized according to their use, are:
1) Algebraic Formula-Type Processing
These languages are oriented towards the computational procedures for
solving mathematical and statistical problems.
Examples include:
● BASIC (Beginners All Purpose Symbolic Instruction Code)
● FORTRAN (Formula Translation)
● PL/I (Programming Language, Version 1)
● ALGOL (Algorithmic Language)
● APL (A Programming Language)
2. Business Data Processing
These languages are best able to maintain data processing procedures and
problems involved in handling files. Some examples include:
● COBOL (Common Business Oriented Language)
● RPG (Report Program Generator)
3. String and List Processing
These are used for string manipulation, including search patterns and inserting
and deleting characters. Examples are:
● LISP (List Processing)
● Prolog (Program in Logic)
4. Object-Oriented Programming Language
In OOP, the computer program is divided into objects. Examples are:
● C++
● Java
5. Visual Programming Language
These programming languages are designed for building Windows-based
applications.Examples are:
● Visual Basic
● Visual Java
● Visual C
BASIC • Short for Beginner's All-purpose Symbolic Instruction Code. •
Developed in the 1950s for teaching University students to program and
provided with every selfrespecting personal computer in the 1980s, • BASIC
has been the first programming language for many programmers. • It is also
the foundation for Visual Basic.

Visual Basic • A programming language and environment developed by


Microsoft. • Based on the BASIC language, Visual Basic was one of the first
products to provide a graphical programming environment and a paint
metaphor for developing user interfaces.

C • Developed by Dennis Ritchie at Bell Labs in the mid 1970s. • C is much


closer to assembly language than are most other high-level languages. • The
first major program written in C was the UNIX operating system. • The low-
level nature of C, however, can make the language difficult to use for some
types of applications.

As stated earlier, any program that is not written in machine language has to
be translated in machine language before it is executed by the computer. The
means used for translation are themselves computer programs. There are
three types of translator programs i.e. Assembler, Compilers and Interpreters.
Assembler:
Assembler is a computer program which is used to translate program written in
Assembly Language in to machine language. The translated program is called
as object program. Assembler checks each instruction for its correctness and
generates diagnostic messages, if there are mistakes in the program. Various
steps of assembling are:

1. Input source program in Assembly Language through an input device.


2. Use Assembler to produce object program in machine language.
3. Execute the program.
Compiler:
A compiler is a program that translates a programme written in HLL to
executable machine language. The process of transferring HKK source program
in to object code is a lengthy and complex process as compared to assembling.
Compliers have diagnostic capabilities and prompt the programmer with
appropriate error message while compiling a HLL program. The corrections are
to be incorporated in the program, whenever needed, and the program has to
be recompiled. The process is repeated until the program is mistake free and
translated to an object code. Thus the job of a complier includes the following:
1. To translate HLL source program to machine codes.
2. To trace variables in the program
3. To include linkage for subroutines.
4. To allocate memory for storage of program and variables.
5. To generate error messages, if there are errors in the program.
Interpreter:
The basic purpose of interpreter is same as that of complier. In compiler, the
program is translated completely and directly executable version is generated.
Whereas interpreter translates each instruction, executes it and then the next
instruction is translated and this goes on until end of the program. In this case,
object code is not stored and reused. Every time the program is executed, the
interpreter translates each instruction freshly. It also has program diagnostic
capabilities. However, it has some disadvantages as below:
1. Instructions repeated in program must be translated each time they are
executed.
2. Because the source program is translated fresh every time it is used, it is
slow process or execution takes more time. Approx. 20 times slower than
complier.

It’s pretty evident that technology is accelerating at a rapid pace and humans
are becoming further dependent on it for every purpose. And with every new
day, software development is becoming more and more crucial since the
demand for software is fast rising from every corner imaginable. In fact, almost
every machine that we use can be a by-product of some software empowering
it. And going by the recent trends in the market, software development in India
is quite a bustling scene, what with India providing a huge chunk of software
intelligence that’s required to make this process successful.
The process of software development services in India goes through a series
of stages in step wise fashion that almost every developing company follows.
Known as the ‘software development life cycle,’ these six steps include
planning, analysis, design, development & implementation, testing &
deployment and maintenance. Let’s study each of these steps to know how
the perfect software is developed.
1. Planning: Without the perfect plan, calculating the strengths and
weaknesses of the project, development of software is meaningless. Planning
kicks off a project flawlessly and affects its progress positively.
2. Analysis: This step is about analyzing the performance of the software at
various stages and making notes on additional requirements. Analysis is very
important to proceed further to the next step.
3. Design: Once the analysis is complete, the step of designing takes over,
which is basically building the architecture of the project. This step helps
remove possible flaws by setting a standard and attempting to stick to it.
4. Development & Implementation: The actual task of developing the software
starts here with data recording going on in the background. Once the software
is developed, the stage of implementation comes in where the product goes
through a pilot study to see if it’s functioning properly.
5. Testing: The testing stage assesses the software for errors and documents
bugs if there are any.
6. Maintenance: Once the software passes through all the stages without any
issues, it is to undergo a maintenance process wherein it will be maintained and
upgraded from time to time to adapt to changes. Almost every software
development Indian company follows all the six steps, leading to the
reputation that the country enjoys in the software market today.
The cost of software development services in India is comparatively lower than
in other countries, making it a much sought after destination today. Custom
software development in India is a big hit among clients who are able to get
their business needs fulfilled at highly cost-effective rates.

ITM/U2 Topic 5 Data Analysis using Spreadsheets


21/06/2018thestreak

Microsoft Excel provides several means and ways to analyze and interpret
data. The data can be from various sources. The data can be converted and
formatted in several ways. It can be analyzed with the relevant Excel
commands, functions and tools – encompassing Conditional Formatting,
Ranges, Tables, Text functions, Date functions, Time functions, Financial
functions, Subtotals, Quick Analysis, Formula Auditing, Inquire Tool, What-if
Analysis, Solvers, Data Model, PowerPivot, PowerView, PowerMap, etc.
You will be learning these data analysis techniques with Excel as part of two
parts −
● Data Analysis with Excel and
● Advanced Data Analysis with Excel
Data Analysis is a process of collecting, transforming, cleaning, and modeling
data with the goal of discovering the required information. The results so
obtained are communicated, suggesting conclusions, and supporting decision-
making. Data visualization is at times used to portray the data for the ease of
discovering the useful patterns in the data. The terms Data Modeling and Data
Analysis mean the same.
Data Analysis Process consists of the following phases that are iterative in
nature −
● Data Requirements Specification
● Data Collection
● Data Processing
● Data Cleaning
● Data Analysis
● Communication

Data Requirements Specification


The data required for analysis is based on a question or an experiment. Based
on the requirements of those directing the analysis, the data necessary as
inputs to the analysis is identified (e.g., Population of people). Specific
variables regarding a population (e.g., Age and Income) may be specified and
obtained. Data may be numerical or categorical.
Data Collection
Data Collection is the process of gathering information on targeted variables
identified as data requirements. The emphasis is on ensuring accurate and
honest collection of data. Data Collection ensures that data gathered is
accurate such that the related decisions are valid. Data Collection provides
both a baseline to measure and a target to improve.
Data is collected from various sources ranging from organizational databases
to the information in web pages. The data thus obtained, may not be
structured and may contain irrelevant information. Hence, the collected data is
required to be subjected to Data Processing and Data Cleaning.
Data Processing
The data that is collected must be processed or organized for analysis. This
includes structuring the data as required for the relevant Analysis Tools. For
example, the data might have to be placed into rows and columns in a table
within a Spreadsheet or Statistical Application. A Data Model might have to be
created.
Data Cleaning
The processed and organized data may be incomplete, contain duplicates, or
contain errors. Data Cleaning is the process of preventing and correcting these
errors. There are several types of Data Cleaning that depend on the type of
data. For example, while cleaning the financial data, certain totals might be
compared against reliable published numbers or defined thresholds. Likewise,
quantitative data methods can be used for outlier detection that would be
subsequently excluded in analysis.
Data Analysis
Data that is processed, organized and cleaned would be ready for the analysis.
Various data analysis techniques are available to understand, interpret, and
derive conclusions based on the requirements. Data Visualization may also be
used to examine the data in graphical format, to obtain additional insight
regarding the messages within the data.
Statistical Data Models such as Correlation, Regression Analysis can be used to
identify the relations among the data variables. These models that are
descriptive of the data are helpful in simplifying analysis and communicate
results.
The process might require additional Data Cleaning or additional Data
Collection, and hence these activities are iterative in nature.
Communication
The results of the data analysis are to be reported in a format as required by
the users to support their decisions and further action. The feedback from the
users might result in additional analysis.
The data analysts can choose data visualization techniques, such as tables and
charts, which help in communicating the message clearly and efficiently to the
users. The analysis tools provide facility to highlight the required information
with color codes and formatting in tables and charts.
Excel Data Analysis – Overview
Excel provide commands, functions and tools that make your data analysis
tasks easy. You can avoid many time consuming and/or complex calculations
using Excel. In this tutorial, you will get a head start on how you can perform
data analysis with Excel. You will understand with relevant examples, step by
step usage of Excel commands and screen shots at every step.
Ranges and Tables
The data that you have can be in a range or in a table. Certain operations on
data can be performed whether the data is in a range or in a table.
However, there are certain operations that are more effective when data is in
tables rather than in ranges. There are also operations that are exclusively for
tables.
You will understand the ways of analyzing data in ranges and tables as well.
You will understand how to name ranges, use the names and manage the
names. The same would apply for names in the tables.
Data Cleaning – Text Functions, Dates and Times
You need to clean the data obtained from various sources and structure it
before proceeding to data analysis. You will learn how you can clean the data.
● With Text Functions
● Containing Date Values
● Containing Time Values
Conditional Formatting
Excel provides you conditional formatting commands that allow you to color
the cells or font, have symbols next to values in the cells based on predefined
criteria. This helps one in visualizing the prominent values. You will understand
the various commands for conditionally formatting the cells.
Sorting and Filtering
During the preparation of data analysis and/or to display certain important
data, you might have to sort and/or filter your data. You can do the same with
the easy to use sorting and filtering options that you have in Excel.
Subtotals with Ranges
As you are aware, PivotTable is normally used to summarize data. However,
Subtotals with Ranges is another feature provided by Excel that will allow you
to group / ungroup data and summarize the data present in ranges with easy
steps.
Quick Analysis
With Quick Analysis tool in Excel, you can quickly perform various data analysis
tasks and make quick visualizations of the results.
Understanding Lookup Functions
Excel Lookup Functions enable you to find the data values that match a defined
criteria from a huge amount of data.
PivotTables
With PivotTables you can summarize the data, prepare reports dynamically by
changing the contents of the PivotTable.
Data Visualization
You will learn several Data Visualization techniques using Excel Charts. You will
also learn how to create Band Chart, Thermometer Chart, Gantt chart,
Waterfall Chart, Sparklines and PivotCharts.
Data Validation
It might be required that only valid values be entered into certain cells.
Otherwise, they may lead to incorrect calculations. With data validation
commands, you can easily set up data validation values for a cell, an input
message prompting the user on what is expected to be entered in the cell,
validate the values entered with the defined criteria and display an error
message in case of incorrect entries.
Financial Analysis
Excel provides you several financial functions. However, for commonly
occurring problems that require financial analysis, you can learn how to use a
combination of these functions.
Working with Multiple Worksheets
You might have to perform several identical calculations in more than one
worksheet. Instead of repeating these calculations in each worksheet, you can
do it one worksheet and have it appear in the other selected worksheets as
well. You can also summarize the data from the various worksheets into a
report worksheet.
Formula Auditing
When you use formulas, you might want to check whether the formulas are
working as expected. In Excel, Formula Auditing commands help you in tracing
the precedent and dependent values and error checking.
Inquire
Excel also provides Inquire add-in that enables you compare two workbooks to
identify changes, create interactive reports, and view the relationships among
workbooks, worksheets, and cells. You can also clean the excessive formatting
in a worksheet that makes Excel slow or makes the file size huge.

Topic 6 Operating Systems – Functions and Types


21/06/2018thestreak

An Operating System (OS) is an interface between a computer user and


computer hardware. An operating system is a software which performs all the
basic tasks like file management, memory management, process management,
handling input and output, and controlling peripheral devices such as disk
drives and printers.
Some popular Operating Systems include Linux, Windows, OS X, VMS, OS/400,
AIX, z/OS, etc.
Definition
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.
● Memory Management
● Processor Management
● Device Management
● File Management
● Security
● Control over system performance
● Job accounting
● Error detecting aids
● Coordination between other software and users
Memory Management
Memory management refers to management of Primary Memory or Main
Memory. Main memory is a large array of words or bytes where each word or
byte has its own address.
Main memory provides a fast storage that can be accessed directly by the CPU.
For a program to be executed, it must in the main memory. An Operating
System does the following activities for memory management −
● Keeps tracks of primary memory, i.e., what part of it are in use by whom,
what part are not in use.
● In multiprogramming, the OS decides which process will get memory when
and how much.
● Allocates the memory when a process requests it to do so.
● De-allocates the memory when a process no longer needs it or has been
terminated.
Processor Management
In multiprogramming environment, the OS decides which process gets the
processor when and for how much time. This function is called process
scheduling. An Operating System does the following activities for processor
management −
● Keeps tracks of processor and status of process. The program responsible
for this task is known as traffic controller.
● Allocates the processor (CPU) to a process.
● De-allocates processor when a process is no longer required.
Device Management
An Operating System manages device communication via their respective
drivers. It does the following activities for device management −
● Keeps tracks of all devices. Program responsible for this task is known as
the I/O controller.
● Decides which process gets the device when and for how much time.
● Allocates the device in the efficient way.
● De-allocates devices.
File Management
A file system is normally organized into directories for easy navigation and
usage. These directories may contain files and other directions.
An Operating System does the following activities for file management −
● Keeps track of information, location, uses, status etc. The collective facilities
are often known as file system.
● Decides who gets the resources.
● Allocates the resources.
● De-allocates the resources.
Other Important Activities
Following are some of the important activities that an Operating System
performs −
● Security− By means of password and similar other techniques, it prevents
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.
● Coordination between other softwares and users− Coordination and
assignment of compilers, interpreters, assemblers and other software to
the various users of the computer systems.
Types of Operating System
Operating systems are there from the very first computer generation and they
keep evolving with time. In this chapter, we will discuss some of the important
types of operating systems which are most commonly used.
Batch operating system
The users of a 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. The programmers leave their
programs with the operator and the operator then sorts the programs with
similar requirements into batches.
The problems with Batch Systems are as follows −
● Lack of interaction between the user and the job.
● CPU is often idle, because the speed of the mechanical I/O devices is slower
than the CPU.
● Difficult to provide the desired priority.
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, the
objective is to maximize processor use, whereas in Time-Sharing Systems, the
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. For example, in a transaction processing, the processor executes
each user program in a short burst or quantum of computation. That is,
if nusers are present, then each user can get a time quantum. When the user
submits the command, the response time is in few seconds at most.
The 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 as follows −
● Provides the advantage of quick response.
● Avoids duplication of software.
● Reduces CPU idle time.
Disadvantages of Time-sharing operating systems are as follows −
● Problem of reliability.
● Question of security and integrity of user programs and data.
● Problem of data communication.
Distributed operating System
Distributed systems use multiple central processors to serve multiple real-time
applications and multiple users. Data processing jobs are distributed among
the processors accordingly.
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.
The advantages of distributed systems are as follows −
● With resource sharing facility, a user at one site may be able to use the
resources available at another.
● Speedup the exchange of data with one another via electronic mail.
● If one site fails in a distributed system, the remaining sites can potentially
continue operating.
● Better service to the customers.
● Reduction of the load on the host computer.
● Reduction of delays in data processing.
Network operating System
A Network Operating System runs on a server and provides the server the
capability to manage data, users, groups, security, applications, and other
networking functions. The primary purpose of the network operating system is
to allow shared file and printer access among multiple computers in a network,
typically a local area network (LAN), a private network or to other networks.
Examples of network operating systems include Microsoft Windows Server
2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare,
and BSD.
The advantages of network operating systems are as follows −
● Centralized servers are highly stable.
● Security is server managed.
● Upgrades to new technologies and hardware can be easily integrated into
the system.
● Remote access to servers is possible from different locations and types of
systems.
The disadvantages of network operating systems are as follows −
● High cost of buying and running a server.
● Dependency on a central location for most operations.
● Regular maintenance and updates are required.
Real Time operating System
A real-time system is defined 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. The time taken by the system to respond to an input and
display of required updated information is termed as the response time. So in
this method, the response time is very less as compared to 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. A real-time operating system
must have well-defined, fixed time constraints, otherwise the system will fail.
For example, Scientific experiments, medical imaging systems, industrial
control systems, weapon systems, robots, air traffic control systems, etc.
There are two types of real-time operating systems.

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 and the data is
stored in ROM. In these systems, virtual memory is almost never found.

Soft real-time systems

Soft real-time systems are less restrictive. A 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.
Operating System – Properties
Batch processing
Batch processing is a technique in which an Operating System collects the
programs and data together in a batch before processing starts. An operating
system does the following activities related to batch processing −
● The OS defines a job which has predefined sequence of commands,
programs and data as a single unit.
● The OS keeps a number a jobs in memory and executes them without any
manual information.
● Jobs are processed in the order of submission, i.e., first come first served
fashion.
● When a job completes its execution, its memory is released and the output
for the job gets copied into an output spool for later printing or processing.

Advantages

● Batch processing takes much of the work of the operator to the computer.
● Increased performance as a new job get started as soon as the previous job
is finished, without any manual intervention.

Disadvantages
● Difficult to debug program.
● A job could enter an infinite loop.
● Due to lack of protection scheme, one batch job can affect pending jobs.
Multitasking
Multitasking is when 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. An OS 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.
● The OS 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 the 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.
● A program that is loaded into memory and is executing is commonly
referred to as a process.
● When a process executes, it typically executes for only a very short time
before it either finishes or needs to perform I/O.
● Since interactive I/O typically runs at slower speeds, it may take a long time
to complete. During this time, a CPU can be utilized by another process.
● The operating system allows the users to share the computer
simultaneously. Since each action or command in a time-shared system
tends to be short, only a little CPU time is needed for each user.
● As the system switches CPU rapidly from one user/program to the next,
each user is given the impression that he/she has his/her own CPU, whereas
actually one CPU is being shared among many users.
Multiprogramming
Sharing the processor, when two or more programs reside in memory at the
same time, is referred as multiprogramming. Multiprogramming assumes a
single shared processor. Multiprogramming increases CPU utilization by
organizing jobs so that the CPU always has one to execute.
The following figure shows the memory layout for a multiprogramming
system.

An OS does the following activities related to multiprogramming.


● The operating system keeps several jobs in memory at a time.
● This set of jobs is a subset of the jobs kept in the job pool.
● The operating system picks and begins to execute one of the jobs in the
memory.
● Multiprogramming operating systems monitor the state of all active
programs and system resources using memory management programs to
ensures that the CPU is never idle, unless there are no jobs to process.

Advantages

● High and efficient CPU utilization.


● User feels that many programs are allotted CPU almost simultaneously.

Disadvantages

● CPU scheduling is required.


● To accommodate many jobs in memory, memory management is required.
Interactivity
Interactivity refers to the ability of users to interact with a computer system.
An Operating system does the following activities related to interactivity −
● Provides the user an interface to interact with the system.
● Manages input devices to take inputs from the user. For example, keyboard.
● Manages output devices to show outputs to the user. For example,
Monitor.
The response time of the OS needs to be short, since the user submits and
waits for the result.
Real Time System
Real-time systems are usually dedicated, embedded systems. An operating
system does the following activities related to real-time system activity.
● In such systems, Operating Systems typically read from and react to sensor
data.
● The Operating system must guarantee response to events within fixed
periods of time to ensure correct performance.
Distributed Environment
A distributed environment refers to multiple independent CPUs or processors
in a computer system. An operating system does the following activities
related to distributed environment −
● The OS distributes computation logics among several physical processors.
● The processors do not share memory or a clock. Instead, each processor has
its own local memory.
● The OS manages the communications between the processors. They
communicate with each other through various communication lines.
Spooling
Spooling is an acronym for simultaneous peripheral operations on line.
Spooling refers to putting data of various I/O jobs in a buffer. This buffer is a
special area in memory or hard disk which is accessible to I/O devices.

An operating system does the following activities related to distributed


environment −
● Handles I/O device data spooling as devices have different data access
rates.
● Maintains the spooling buffer which provides a waiting station where data
can rest while the slower device catches up.
● Maintains parallel computation because of spooling process as a computer
can perform I/O in parallel fashion. It becomes possible to have the
computer read data from a tape, write data to disk and to write out to a
tape printer while it is doing its computing task.

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.

DBMS: Traditional file concepts and Environment


21/06/2018thestreak
Database is a collection of related data and data is a collection of facts and
figures that can be processed to produce information.
Mostly data represents recordable facts. Data aids in producing information,
which is based on facts. For example, if we have data about marks obtained by
all students, we can then conclude about toppers and average marks.
A database management system stores data in such a way that it becomes
easier to retrieve, manipulate, and produce information.
Characteristics
Traditionally, data was organized in file formats. DBMS was a new concept
then, and all the research was done to make it overcome the deficiencies in
traditional style of data management. A modern DBMS has the following
characteristics −
● Real-world entity− A modern DBMS is more realistic and uses real-world
entities to design its architecture. It uses the behavior and attributes too.
For example, a school database may use students as an entity and their age
as an attribute.
● Relation-based tables− DBMS allows entities and relations among them to
form tables. A user can understand the architecture of a database just by
looking at the table names.
● Isolation of data and application− A database system is entirely different
than its data. A database is an active entity, whereas data is said to be
passive, on which the database works and organizes. DBMS also stores
metadata, which is data about data, to ease its own process.
● Less redundancy− DBMS follows the rules of normalization, which splits a
relation when any of its attributes is having redundancy in values.
Normalization is a mathematically rich and scientific process that reduces
data redundancy.
● Consistency− Consistency is a state where every relation in a database
remains consistent. There exist methods and techniques, which can detect
attempt of leaving database in inconsistent state. A DBMS can provide
greater consistency as compared to earlier forms of data storing
applications like file-processing systems.
● Query Language− DBMS is equipped with query language, which makes it
more efficient to retrieve and manipulate data. A user can apply as many
and as different filtering options as required to retrieve a set of data.
Traditionally it was not possible where file-processing system was used.
● ACID Properties− DBMS follows the concepts
of Atomicity, Consistency, Isolation, and Durability (normally shortened as
ACID). These concepts are applied on transactions, which manipulate data
in a database. ACID properties help the database stay healthy in multi-
transactional environments and in case of failure.
● Multiuser and Concurrent Access− DBMS supports multi-user environment
and allows them to access and manipulate data in parallel. Though there are
restrictions on transactions when users attempt to handle the same data
item, but users are always unaware of them.
● Multiple views− DBMS offers multiple views for different users. A user who
is in the Sales department will have a different view of database than a
person working in the Production department. This feature enables the
users to have a concentrate view of the database according to their
requirements.
● Security− Features like multiple views offer security to some extent where
users are unable to access data of other users and departments. DBMS
offers methods to impose constraints while entering data into the database
and retrieving the same at a later stage. DBMS offers many different levels
of security features, which enables multiple users to have different views
with different features. For example, a user in the Sales department cannot
see the data that belongs to the Purchase department. Additionally, it can
also be managed how much data of the Sales department should be
displayed to the user. Since a DBMS is not saved on the disk as traditional
file systems, it is very hard for miscreants to break the code.
Users
A typical DBMS has users with different rights and permissions who use it for
different purposes. Some users retrieve data and some back it up. The users of
a DBMS can be broadly categorized as follows −
● Administrators− Administrators maintain the DBMS and are responsible for
administrating the database. They are responsible to look after its usage
and by whom it should be used. They create access profiles for users and
apply limitations to maintain isolation and force security. Administrators
also look after DBMS resources like system license, required tools, and
other software and hardware related maintenance.
● Designers− Designers are the group of people who actually work on the
designing part of the database. They keep a close watch on what data
should be kept and in what format. They identify and design the whole set
of entities, relations, constraints, and views.
● End Users− End users are those who actually reap the benefits of having a
DBMS. End users can range from simple viewers who pay attention to the
logs or market rates to sophisticated users such as business analysts.

Database Management Systems Concepts


21/06/2018thestreak

DBMS – Architecture
The design of a DBMS depends on its architecture. It can be centralized or
decentralized or hierarchical. The architecture of a DBMS can be seen as either
single tier or multi-tier. An n-tier architecture divides the whole system into
related but independent n modules, which can be independently modified,
altered, changed, or replaced.
In 1-tier architecture, the DBMS is the only entity where the user directly sits on
the DBMS and uses it. Any changes done here will directly be done on the
DBMS itself. It does not provide handy tools for end-users. Database designers
and programmers normally prefer to use single-tier architecture.
If the architecture of DBMS is 2-tier, then it must have an application through
which the DBMS can be accessed. Programmers use 2-tier architecture where
they access the DBMS by means of an application. Here the application tier is
entirely independent of the database in terms of operation, design, and
programming.

3-tier Architecture
A 3-tier architecture separates its tiers from each other based on the
complexity of the users and how they use the data present in the database. It is
the most widely used architecture to design a DBMS.

● Database (Data) Tier− At this tier, the database resides along with its query
processing languages. We also have the relations that define the data and
their constraints at this level.
● Application (Middle) Tier− At this tier reside the application server and the
programs that access the database. For a user, this application tier presents
an abstracted view of the database. End-users are unaware of any existence
of the database beyond the application. At the other end, the database tier
is not aware of any other user beyond the application tier. Hence, the
application layer sits in the middle and acts as a mediator between the end-
user and the database.
● User (Presentation) Tier− End-users operate on this tier and they know
nothing about any existence of the database beyond this layer. At this layer,
multiple views of the database can be provided by the application. All views
are generated by applications that reside in the application tier.
Multiple-tier database architecture is highly modifiable, as almost all its
components are independent and can be changed independently.

Database Schema

A database schema is the skeleton structure that represents the logical view of
the entire database. It defines how the data is organized and how the relations
among them are associated. It formulates all the constraints that are to be
applied on the data.
A database schema defines its entities and the relationship among them. It
contains a descriptive detail of the database, which can be depicted by means
of schema diagrams. It’s the database designers who design the schema to
help programmers understand the database and make it useful.

A database schema can be divided broadly into two categories −


● Physical Database Schema− This schema pertains to the actual storage of
data and its form of storage like files, indices, etc. It defines how the data
will be stored in a secondary storage.
● Logical Database Schema− This schema defines all the logical constraints
that need to be applied on the data stored. It defines tables, views, and
integrity constraints.

Database Instance

It is important that we distinguish these two terms individually. Database


schema is the skeleton of database. It is designed when the database doesn’t
exist at all. Once the database is operational, it is very difficult to make any
changes to it. A database schema does not contain any data or information.
A database instance is a state of operational database with data at any given
time. It contains a snapshot of the database. Database instances tend to
change with time. A DBMS ensures that its every instance (state) is in a valid
state, by diligently following all the validations, constraints, and conditions that
the database designers have imposed.
If a database system is not multi-layered, then it becomes difficult to make any
changes in the database system. Database systems are designed in multi-layers
as we learnt earlier.

Data Independence

A database system normally contains a lot of data in addition to users’ data. For
example, it stores data about data, known as metadata, to locate and retrieve
data easily. It is rather difficult to modify or update a set of metadata once it is
stored in the database. But as a DBMS expands, it needs to change over time
to satisfy the requirements of the users. If the entire data is dependent, it
would become a tedious and highly complex job.
Metadata itself follows a layered architecture, so that when we change data at
one layer, it does not affect the data at another level. This data is independent
but mapped to each other.
Logical Data Independence
Logical data is data about database, that is, it stores information about how
data is managed inside. For example, a table (relation) stored in the database
and all its constraints, applied on that relation.
Logical data independence is a kind of mechanism, which liberalizes itself from
actual data stored on the disk. If we do some changes on table format, it
should not change the data residing on the disk.
Physical Data Independence
All the schemas are logical, and the actual data is stored in bit format on the
disk. Physical data independence is the power to change the physical data
without impacting the schema or logical data.
For example, in case we want to change or upgrade the storage system itself −
suppose we want to replace hard-disks with SSD − it should not have any
impact on the logical data or schemas.

Types of Data Models, ER Modeling


21/06/2018thestreak
Data models define how the logical structure of a database is modeled. Data
Models are fundamental entities to introduce abstraction in a DBMS. Data
models define how data is connected to each other and how they are
processed and stored inside the system.
The very first data model could be flat data-models, where all the data used are
to be kept in the same plane. Earlier data models were not so scientific, hence
they were prone to introduce lots of duplication and update anomalies.

Entity-Relationship Model

Entity-Relationship (ER) Model is based on the notion of real-world entities and


relationships among them. While formulating real-world scenario into the
database model, the ER Model creates entity set, relationship set, general
attributes and constraints.
ER Model is best used for the conceptual design of a database.
ER Model is based on −
● Entitiesand their
● Relationshipsamong entities.
These concepts are explained below.

● Entity− An entity in an ER Model is a real-world entity having properties


called attributes. Every attribute is defined by its set of values
called domain. For example, in a school database, a student is considered as
an entity. Student has various attributes like name, age, class, etc.
● Relationship− The logical association among entities is called relationship.
Relationships are mapped with entities in various ways. Mapping
cardinalities define the number of association between two entities.
Mapping cardinalities −

● one to one
● one to many
● many to one
● many to many
Relational Model
The most popular data model in DBMS is the Relational Model. It is more
scientific a model than others. This model is based on first-order predicate logic
and defines a table as an n-ary relation.

The main highlights of this model are −


● Data is stored in tables called relations.
● Relations can be normalized.
● In normalized relations, values saved are atomic values.
● Each row in a relation contains a unique value.
● Each column in a relation contains values from a same domain.

Topic 10 Integrity Constraints, SQL Queries


21/06/2018thestreak

SQL is a programming language for Relational Databases. It is designed over


relational algebra and tuple relational calculus. SQL comes as a package with all
major distributions of RDBMS.
SQL comprises both data definition and data manipulation languages. Using
the data definition properties of SQL, one can design and modify database
schema, whereas data manipulation properties allows SQL to store and
retrieve data from database.
SQL constraints are used to specify rules for the data in a table.
Constraints are used to limit the type of data that can go into a table. This
ensures the accuracy and reliability of the data in the table. If there is any
violation between the constraint and the data action, the action is aborted.
Constraints can be column level or table level. Column level constraints apply
to a column, and table level constraints apply to the whole table.
The following constraints are commonly used in SQL:
● NOT NULL – Ensures that a column cannot have a NULL value
● UNIQUE – Ensures that all values in a column are different
● PRIMARY KEY – A combination of a NOT NULL and UNIQUE. Uniquely
identifies each row in a table
● FOREIGN KEY – Uniquely identifies a row/record in another table
● CHECK – Ensures that all values in a column satisfies a specific condition
● DEFAULT – Sets a default value for a column when no value is specified
● INDEX – Used to create and retrieve data from the database very quickly
SQL Queries
SQL uses the following set of commands to define database schema −

CREATE

Creates new databases, tables and views from RDBMS.


For example −
Create database tutorialspoint;Create table article;Create view for_students;

DROP

Drops commands, views, tables, and databases from RDBMS.


For example−
Drop object_type object_name;Drop database tutorialspoint;Drop table
article;Drop view for_students;

ALTER

Modifies database schema.


Alter object_type object_name parameters;
For example−
Alter table article add subject varchar;
This command adds an attribute in the relation article with the name subjectof
string type.

You might also like