Diploma in Computer Applications: Mbika Upta
Diploma in Computer Applications: Mbika Upta
mbika upta
1
INTRODUCTION TO PROGRAMMING
TECHNIQUES
2
Various Programming Techniques
A Program is a set of instructions written in a particular manner
to achieve a goal. A program is written in a Programming Language
and converted into assembly Language by the computer and then
converted into Machine Language which is understandable by the
computer.
Unstructured Programming: -
In this approach programmer put all code at one place. When lines of
code increases, situation starts getting unmanageable. Problems of
duplicity and redundancy of code may occur. Code becomes
unreadable.
Structured/Procedural Programming: -
3
Modular Programming: -
All modules can have their own data and also they are capable to
maintain their internal state.
4
Object-Oriented Programming: -
5
Introduction to Programming History
The first Programming is over 175 years old and was written by
a woman, Ada Lovelace in Assembly Language.
6
Contracted by the US Department of Defense in 1977 for
developing large software systems.
7
OVERVIEW OF SQL SERVER
(Structured Query Language)
Introduction
Components of SQL
SQL Integrity Constraints
Key Constraints
Creating Database & Tables
Data Types
Querying & Modifying Data
Subqueries & Joins
Views & Derived Tables
Triggers
8
Introduction
Database
A database is a collection of data (Here data is the raw information
which is fed into the database). This data then forms the base for all
further activities like performing mathematical, logical or any other
operations. The databases which support Structured Query Language
are all Relational databases. A Relational database is a collection of
related information. Concept of RDBMS was introduced by E F Codd.
Table (Relation)
a table is a place in database where all data is stored and organized.
a table is made up of rows (tuples) and columns (fields).
Record/Row
a row is a record of data in database. It is an individual entry that
exists in the table.
Column
A column specifies a particular data. It also corresponds to the name
given to it.
Field
A field is designed to maintain specific information about every
record.
9
Data Base Management Systems
A DBMS is the tools that support operations on databases. It enables
users to create and maintain databases. MySQL is a powerful RDBMS
tool that provide access, manipulation, retrieval, updating of data.
SQL
SQL is a language of database. It includes database creation,
modification, retrieval, updating and back-up. It is the standard
language for RDBMS. All RDBMS like MS-Access, Oracle, Sybase, SQFL
Server and Informix use SQL.
Components of SQL
11
mysql>CREATE INDEX INDEX_NAME ON TABLE_NAME
(COLUMN_NAME);
Keys Constraints
Primary Key
A Primary Key uniquely identifies each row in a table. Oracle tables
must have only one Primary Key.
Candidate Key
Candidate Keys are the attributes that can uniquely identifies the
row.
Alternative/Surrogate Key
It is used in case there is no possibility of naming a Primary Key. then
we can assign another Key as Primary Key.
Foreign Key
A Foreign Key is normally a single field directly references a Primary
Key in another table to enforce referential integrity.
12
Creating Database and Tables
Creating a database:
Creating a table:
mysql>SHOW DATABASES;
mysql>USE STUDENT;
mysql>CREATE TABLE TABLENAME (COL_1 TYPE(MAX_LENGTH),
COL_2 TYPE(MAX_LENGTH), COL_N TYPE(MAX_LENGTH));
13
Data Types
14
Querying and Modifying Data
Query
SELECT * FROM TABLE_NAME;
WHERE Clause
WHERE Clause is used to extract only the records that fulfill the
specified condition.
UPDATE Statement
Update command is used to modify data values within one or more
columns for one or more rows of a table. Syntax:
mysql>UPDATE TABLE_NAME SET COLUMN_NAME = VALUE
EXPRESSION;
Subqueries
A subquery is a query within another query also known as nested
query. It is used to return data that will be used in the main query as
a condition to further restrict the data to be retrieved.
Joins
JOIN is the most powerful feature of SQL. Without JOIN entire
RDBMS concept would not be feasible. It is the capability to select
data from multiple tables. A JOIN combines two or more tables to
retrieve data according to the needs of Query.
15
Views & Derived Tables
A View is a single table that is derived from other tables. These other
tables could be base tables or previously defined views. A view does
not necessarily exist in physical form, means a view does not contain
data. it is considered a virtual table. In fact, a view is a way of
specifying a table.
Triggers
The Event Events are usually database update operations that are
explicitly applied to the database.
The Condition It determines whether the rule action should be
executed.
The Action Usually a sequence of SQL statements, a database
transaction or an external program that will executed automatically
if the condition applied is true.
16
Practical_1
Consider the table Employee(Emp_No, Emp_Name,
Date_Of_Joining, Basic_Salary)
Write query to create above table with proper data type and define
Emp_No as PRIMARY KEY.
Write query to insert data / record of 2 employees to the above
table.
Write query to display records of employees from Employee table
whose Date_Of_Joining is less than 01_01_2013 & Basic_Salary
between 5000 and 6500.
17
Practical_2
18
SELECT * FROM EXAMINATION WHERE SEMESTER=2 AND
COURSE_NAME=”DCA”;
MYSQL>_
19
System Analysis & Design
Definition
Types of a System
Characteristics of a System
Elements of a System
Base for planning for System analysis
Duties and Job Description of system analyst
System Development Life Cycle and its Phases
Tools of Structured Analysis – DFD, Data Dictionary
20
Definition
The word “System” has been derived from Greek word “Systema”,
which means an organized relationship among functioning units and
components. A System is designed to achieve an objective.
A metro railway works as a system. Stations, Control room, trains,
employees, all work together to achieve a goal.
Computer System is also a collection of components organized to
accomplish specific functions.
Types of a System
DSS
ES
21
Open & Closed Systems: -
Open systems can interact with outer environment. These can
change as per in environment. On the other hand, closed systems do
not interact with external environment, has a very short survival time
and are very rare.
Information systems: -
An Information System is an arrangement of people, data, processes,
interfaces and geography that are integrated for the purpose of
improving day-to-day operations in a business. Information system
has been categorized into several types based on their processes and
functions. Most common Information systems are:
Expert system
ES are special Systems that are designed to manipulate knowledge
rather than information.
Characteristics of a System
Central Objective: -
A System has a core objective which needs be fulfilled.
Organization: -
A System is laid out according to the manner in which the work
flows.
Integration: -
The entire system as a whole is weaved together as one for the
procurement of desired output.
Interaction: -
The change or process in one component of a system affect other
subsystems because all components interact with each other.
Interdependence: -
A system is said successful when it’s all components or subsystems
function properly and provide input and output to each other.
23
Elements of System
Inputs: -
In order to operate and functions a system needs inputs.
Processor: -
a part of the system which processes or manipulate input into output
(data into result).
Outputs: -
This is the element for which the entire system is built. Output is the
result that is desired by the user.
Control: -
For any system to operate efficiently and effectively, control is
required over all inputs, processes, outputs and other activities.
Environment: -
All the components which affect the performance of the system
constitute the environment of the system.
Feedback: -
When the output is obtained, it is compared with the standard result
and the information gathered is called feedback.
Boundaries/Interface: -
each System has certain limitations and it has to work under those
defined limitations.
24
Base for planning for system Analysis
A System is planned to achieve a Top Management
goal. To achieve this goal an
organization set up various Middle Management
strategies. So it is necessary to
have strategic planning for a Operational Management
System.
Sequential Models: -
Classical waterfall Model
Interactive Waterfall Model
Rapid Application Developments Model
Prototype Models: -
Incremental Model
Spiral Model
Component Based Development Model
25
Waterfall Model
26
System Development Life Cycle and its
phases
SDLC is a process divided into phases from starting point to
implementation of a System. This is a long term process and divided
into several phases.
Phases of SDLC: -
Initial Investigation: -
It is the first phase of SDLC. A System is made to solve the problem.
So process is start with recognition of needs. This step is called
problem definition. This phase involves primary survey, investigation
expectations and objectives.
Feasibility study: -
Feasibility study is an evaluation to determine the difficulty in
carrying out of task. A framework called PIECES is formulated in this
phase for identifying problems.
P Performance
I Information
E Economy
C Control
E Efficiency
S Services
27
Feasibility study is evaluated on the basis of economic, operational,
technical and legal aspects. This phase may result in the decision that
System is found to be feasible.
Analysis: -
In this phase System boundaries are determined. The focus in this
phase is to understand the relevant facts and to determine what will
be needed to solve the problem. At the end of this phase a detailed
logical model of required System is available along with pertinent
data.
Design: -
In Design phase “when and what the System is to do?” is converted
to “how the system shall do it?” This phase involves:
Development: -
Development is the stage where the actual system is constructed.
Therefore, this phase is also called Construction phase. This phase
composed of:
Programming of System.
Testing at various levels (Units, Systems, User’s acceptance).
At the end of this phase the System is ready and is tested by
the developers.
Implementation: -
28
This phase involves to install the System, to train the users for using
the System and to provide them the documentation. At the end of
this phase the user start using the System for actual operation.
Maintenance: -
Once the System is implemented, it is to remain in use for as long as
it continues to solve its objectives. Maintenance are the on-going
activities required for the System to operate smoothly. Typically, this
phase is the longest in the SDLC as this phase involves fixing the
bugs, detecting hardware problems, enhance the System, correcting
code and documentation.
29
Tools of Structured Analysis
Algorithms
Step by step Instructions that solve a problem are called Algorithm.
Flow Charts
A Flow Chart is the graphical representation of an operation or a
process.
Data Flow
30
Data Dictionaries
A Data dictionary is a catalogue of the data elements in the system. It
stores the details and the descriptions of data flows, data stores and
processes. It also specifies values and units for the information in the
data flows and data stores.
31
INTRODUCTION TO C
32
1. Historical Development of C .................................................... 34
2. First C Program......................................................................... 35
3. Datatypes and variables ........................................................... 36
4. Constants, Literals and Type Conversion .................................. 37
5. C Keywords, Identifiers and Operators .................................... 38
6. Decision, Control Structure and Loops ..................................... 39
7. Pointers, Arrays & Strings ........................................................ 40
8. Functions.................................................................................. 41
9. Structure and Storage Classes .................................................. 42
10. File Handling ............................................................................ 43
11. Accept 50 numbers in Array ..................................................... 44
12. Two-Dimensional array ............................................................ 46
13. Sort Elements in Array ............................................................. 48
14. Calculate Sum & Average in Array ............................................ 50
33
Historical Development of C
C is a general purpose high level programming language. It was
developed by Dennis M. Ritchie at the Bell Lab to develop Unix
Operating system. C was first implemented on Pop-II computer in
December 1972.
Parts of C Languages: -
Operating system
Language Compilers
Language Interpreters
Language Assemblers
Network Drivers
Print Spoolers
Text Editors
Databases
Utilities
34
First C Program
//Print some text on screen
#include<stdio.h>
void main()
{
printf("Hello!");
getch();
}
Character Set
Alphabet: A . . . . . .Z & a . . . . . .. .z
Digits: 0 . . .. . . . . . .9
Special symbols: All symbols in a standard keyboard
35
Datatypes and variables
Variables: -
A variable is a storage location. Variables are used to hold values that
may vary during the execution of the program.
36
Constants, Literals and Type Conversion
A constant is an entity that never change its value during the
execution of the program.
Type Conversion: -
37
C Keywords, Identifiers and Operators
Keywords: -
Keywords are special reserved words which are already explained in
C Language. These keywords cannot be used as variable names.
There are 32 keywords in C.
Identifiers: -
Identifiers are the name of variables, constants, functions, arrays or
classes.
Operators: -
Operators are symbols that are used with variables to perform a
mathematical, comparison or logical operation.
38
Decision, Control Structure and Loops
Decision: -
C provides if, if-else, if-else-if conditions for decision making.
Switch-Case: -
The control statement that allows us to make a decision from the
number of choices is called a switch or switch-case-default.
Loops: -
Loops are used to perform repetitive tasks. C provides three type of
loops: for, while and do-while.
39
Pointers, Arrays & Strings
Pointers: -
A Pointer is a variable that holds the location/Address of other
variable.
Arrays: -
Strings: -
A string is a one-dimensional array of characters terminated by a null
(‘\0’). For example: -
char name[] = {‘H’, ‘A’, ‘R’, ‘T’, ‘R’, ‘O’, ‘N’, ‘\0’};
char name[] = “HARTRON”;
40
Functions
A function is a block of statements that perform a task. Functions
fulfill the paradigm of “Write Once Use Anywhere Anytime.” Each C
program is a collection of one or more functions.
c = sum(a, b);
printf(“%d”,c);
getch();
}
int sum(int x, int y)
{
return(x + y);
}
41
Structure and Storage Classes
Structure: -
C provides a special data type called Structure for dealing with
different types of variables. A Structure is a collection of mixed data
types referenced by a single name.
Storage Class: -
42
File Handling
There are different operations in C that can be carried out on a file.
these are: -
43
Accept 50 numbers in Array
44
Output
45
Two-Dimensional array
46
Output
47
Sort Elements in Array
Output
48
49
Calculate Sum & Average in Array
50
Introduction to C++ with OOPs
51
Object-Oriented Programming
OOPs approach is designed around the data being processed. In fact,
data is the soul of any program and OOPs defines the relationship
between the data and its associated operations in such a way that the
access to data is allowed only through its code or functions.
52
Characteristics of OOPs
Objects: -
An Object can be an item, place, person, entity, activity, concept or a
thing. All objects have identity and have some features such an apple
has a shape, a color, a taste.
Class: -
A class can be defined as a group of objects with similar properties
(attributes) or common operations.
Attributes: -
An attribute is a data value held by the objects in a class. Name, Color
and taste are attributes of Fruit class. All objects in a class share the
same properties.
53
Inheritance: -
Inheritance is the feature of sharing similarities among classes while
preserving their differences. A class that share features of other class
is called derived class and other class is called base class.
Association: -
Associations are the means for establishing relationship among
objects and classes.
Aggregation: -
Aggregation is the “part-whole” or “a-part-of” relationship in which
objects representing the components of something are associated
with an object representing the entire assembly.
Abstraction: -
Abstraction means to hide the internal details from users.
Encapsulation
Encapsulation is the way of combining data and functions into an
independent entity called class.
Overriding: -
Overriding is the concept of using features of a base class in a modified
way.
54
About C++
C++ is an Object Oriented Programming Language. It was developed
by Bjarne Stroustrup at AT&T Bell Lab in Murray Hill, New Jersey USA
in early 1980’s.
First Program
55
Difference between Multilevel and Multiple Inheritance?
Multiple Inheritance is the feature when one derived class has more
than one base class.
56
Polymorphism
Is the concept of single interface having multiple forms. It is of two
types: -
Function Overloading
More than one function with same name.
Operator Overloading
Provides a way for new implementation of existing operator to work
with user defined data types.
Dynamic Polymorphism
Virtual Function
58
VISUAL BASIC
(An Integrated Development Environment)
59
Introduction to Visual Basic: -
Visual Basic is a graphic version of old BASIC (Beginner’s & All
Purpose Symbolic Instruction Code) language that was quite popular
among programmers. VB is a GUI (Graphical User Interface) based
platform that is highly interactive. It increases the productivity of
programmer by providing various features to create effective and
robust application with minimum effort and time.
Environment: -
Visual Basic is an Integrated Development Environment (IDE). It is a
composition of various components and tools as well as provides
code editors for each component. It includes the features of auto
completion and error detecting while compilation.
Components of VB Window: -
Menu Bar: -
It has many items along with sub menu options. Each option
performs a particular action to build VB Application. Such as Save,
Open, Run, etc.
Tool Bar: -
60
It consists of various buttons that provide quick access to commonly
used menu items.
Tool Box: -
It includes various components/controls that are used to design the
VB application.
Project Explorer
A VB project may contain multiple forms, modules and controls.
Project Explorer Window provides quick access to these elements.
We can navigate any of all in one click. VB allows to open one project
at a time but we can open form window or code window from other
existing form.
Properties (F4)
Each control in Visual Basic has its own attributes (properties). Some
are quite common while some are unique. Property window explore
these properties associated with selected control.
Code Window
Code is edited in code window only. Code window has two parts.
Object Box
the combination box at the left side of window displays the name of
all objects associated with the application.
Procedure Box
It displays the list of events associated with the form and other
control which are used to perform different actions for selected
control. Such as click event.
Form Designer
61
Objects are placed and then arranged on Form Designer Window.
List box control is used to display a list of items while Combo box is
used to display a drop-Down list of items from which the user can
select one item at one time.
62
Difference between Picture box and Image box?
Image control is a lightweight control that has no device context or
its own. The Picture box has a device context and is a true window.
63
Exercise: -
A variable is used to store the __________.
IDE stands for _______________________________
Str () converts ____________ data to _____________.
Code window consists of a _________ box and procedure list
box.
Variables of different data types when combined as single value
to hold several related information called as _________ data
types.
SDI are often implemented as a single process. But MDI interface can
be implemented as multiple processes. (Google Chrome is an
example of MDI). In an SDI interface we cannot show multiple
documents at the same time in the same window. This can be
achieved in an MDI interface.
For Loop: -
65
COMMUNICATION SKILL
66
Introduction to Communication Skill
Passing of Information from one person to other is called
communication. It is a two-way process.
Importance: -
Import and Export of thoughts.
To provide Information for decision making.
To clarify responsibility for result.
Self-Satisfaction: -
Clarity: -
Attention: -
Adequacy: -
Integration: -
67
Communication must aim at strengthening the organization to
achieve its goal.
Feedback: -
Types of Communications
According to Direction: -
Downward Level: -
When an upper level person communicates with lower level person,
it is called downward level. Such as a manager communicates with a
clerk.
Upward Level: -
Opposite to Downward Level, in this type of communication a lower
level person communicates with upper level person.
Horizontal Level: -
When both persons are of same levels in communication, it is called
Horizontal Level. Such as two teachers discuss on a topic.
Formal: -
Communication created for some objective is called formal/official
communication.
Informal: -
A time pass activity like jokes sharing. It is an in vain process that
provide no commercial benefit.
68
According to Expressions: -
Written: -
Communicate through some hard medium like Rules, Regulations,
Instructions, Magazines etc.
Oral: -
Communicate through voice only like Personally, Face-to-face,
Lecture,
Body Language: -
69
Listening Skills
Listening is to give attention to one’s sound. It is the ability to
accurately receive the message conveyed by someone.
70
Reading Skills
Reading is a mean of communication and of sharing information and
ideas.
Importance of Reading: -
Increase our knowledge.
Explore yourself to new things.
Self-Improvement.
Tools of communicating.
Connects you with the world.
Boost Imaginations and Creativity.
Types/Techniques of Reading: -
Scanning: -
Scanning involves looking only for specific information.
Skimming: -
Skimming involves reading more in less time.
Intensive Reading: -
It is the most time consuming process of all the Reading Techniques.
The main goal here is to retain information for the long term.
Extensive Reading: -
Extensive Reading focuses on reading for pleasure.
71
Employment Skills
Contents of good Resume: -
Experience
Academic Qualification
Professional Qualification
Courses/Training attended
Extra-Curricular Activities
Remuneration
Personal Information
Interview Skills: -
72