ISM by Aniket
ISM by Aniket
ON
INFORMATION SYSTEM MANAGEMENT-LAB
1
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
CERTIFICATE
This is to certify that the practical titled “Information System Management-Lab” submitted by
ANIKET KUSHWAHA to New Delhi Institute of Management, Guru Gobind Singh Indraprastha
University in partial fulfilment of requirement for the award of the Bachelor of Business Administration
degree is an original piece of work carried out under my guidance and may be submitted for evaluation.
The assistance rendered during the study has been duly acknowledged.
No part of this work has been submitted for any other degree.
2
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
ACKNOWLEDGEMENT
Any accomplishment requires the effort of many people and this work is not different.
Regardless of the source, I wish to express my gratitude to those who may have
contributed to this work, even though anonymously.
My final thank goes out to my parents, family members, teachers and friends who
encouraged me countless times to persevere through this entire process.
ANIKET KUSHWAHA
3
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
INDEX Page
No.
1 Explain Information System Management.
a. DSS
b. EIS 5-7
c. TPS
2 Introduction of Database Management System. 7
7-8
3 Introduction to the following Concepts.
a. DDL
b. DML
c. TCL
d. Aggregate Function with example 9-18
4
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
1.Explain Information System Management
Information management system A term sometimes used synonymously with database management
system (DBMS) although normally used in a more general sense. The term has no widely accepted
definition and thus can be applied to any system of software that facilitates the storage, organization,
and retrieval of information within a computer system, without the implication that it need have all
the essential characteristics of a DBMS. The information held may include sound fragments, images,
and video sequences in addition to the usual textual and numerical information. These newer forms of
computer-held information are sometimes argued as being a defining characteristic of the term,
notwithstanding that DBMS are developing to provide for such forms of information.
A decision support system (DSS) is an information system that aids a business in decision-making
activities that require judgment, determination, and a sequence of actions. The information system
assists the mid- and high-level management of an organization by analysing huge volumes of
unstructured data and accumulating information that can help to solve problems and help in decision-
making. A DSS is either human-powered, automated, or a combination of both.
5
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
b. EIS
An executive information system (EIS) is a decision support system (DSS) used to assist senior
executives in the decision-making process. It does this by providing easy access to important data
needed to achieve strategic goals in an organization. An EIS normally features graphical displays on
an easy-to-use interface. Executive information systems can be used in many different types of
organizations to monitor enterprise performance as well as to identify opportunities and problems.
Early executive information systems were developed as computer-based programs on mainframe
computers to provide a company’s description, sales performance and/or market research data for
senior executives. However, senior executives were not all computer literate or confident. Moreover,
EIS data was only supporting executive-level decisions but not necessarily supporting the entire
company or enterprise.
Current EIS data is available company- or enterprise-wide, facilitated by personal computers and
workstations on local area networks (LANs). Employees can access company data to help decision-
making in their individual workplaces, departments, divisions, etc. This allows employees to provide
pertinent information and ideas both above and below their company level. The typical EIS has four
components: hardware, software, user interface and telecommunication.
c. TPS
A transaction process system (TPS) is an information processing system for business transactions
involving the collection, modification and retrieval of all transaction data. Characteristics of a TPS
include performance, reliability and consistency. TPS is also known as transaction processing or real-
time processing. A transaction process system and transaction processing are often contrasted with a
batch process system and batch processing, where many requests are all executed at one time. The
former requires the interaction of a user, whereas batch processing does not require user involvement.
In batch processing the results of each transaction are not immediately available. Additionally, there
is a delay while the many requests are being organized, stored and eventually executed. In transaction
processing there is no delay and the results of each transaction are immediately available. During the
delay time for batch processing, errors can occur. Although errors can occur in transaction
6
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
processing, they are infrequent and tolerated, but do not warrant shutting down the entire system. To
achieve performance, reliability and consistency, data must be readily accessible in a data warehouse,
backup procedures must be in place and the recovery process must be in place to deal with system
failure, human failure, computer viruses, software applications or natural disasters.
7
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
combined to form information. Hence, information is interpreted data - data provided with semantics.
MS. ACCESS is one of the most common examples of database management software.
• Users: Users may be of any kind such as DB administrator, System developer, or database
users.
• Database application: Database application may be Departmental, Personal, organization's
and / or Internal.
• DBMS: Software that allows users to create and manipulate database access,
• Database: Collection of logical data as a single unit.
ADVANTAGE OF DBMS
A DBMS manages data and has many benefits. These are:
8
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
3. Introduction to the following Concepts.
a. DDL (Data Definition Language)
DDL stands for Data Definition Language. It is a language used for defining and modifying the data
and its structure. It is used to build and modify the structure of your tables and other objects in the
database.
DDL commands are as follows,
1. CREATE
2. DROP
3. ALTER
4. RENAME
5. TRUNCATE
These commands can be used to add, remove or modify tables within a database. DDL has pre-
defined syntax for describing the data.
1.CREATE
CREATE command is used for creating objects in the database.
It creates a new table.
Syntax:
CREATE TABLE <table_name>
( column_name1 datatype,
column_name2 datatype,
.
.
.
column_name_n datatype
2. DROP COMMAND
DROP command allows to remove entire database objects from the database. It removes entire data
structure from the database. It deletes a table, index or view.
Syntax:
DROP TABLE <table_name>;
OR
DROP DATABASE <database_name>;
9
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
3. ALTER COMMAND
An ALTER command allows to alter or modify the structure of the database. It modifies an existing
database object. Using this command, you can add additional column, drop existing column and even
change the data type of columns.
Syntax:
ALTER TABLE <table_name>
ADD <column_name datatype>;
OR
4.RENAME COMMAND
5.TRUNCATE COMMAND
• TRUNCATE command is used to delete all the rows from the table permanently.
• It removes all the records from a table, including all spaces allocated for the records.
• This command is same as DELETE command, but TRUNCATE command does not generate
any rollback data.
Syntax:
TRUNCATE TABLE <table_name>;
Example:
TRUNCATE TABLE employee;
10
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
b. DML
Introduction to DML
• DML stands for Data Manipulation Language.
• It is a language used for selecting, inserting, deleting and updating data in a database.
• It is used to retrieve and manipulate data in a relational database.
DDL commands are as follows,
1. SELECT
2. INSERT
3. UPDATE
4. DELETE
• DML performs read-only queries of data.
1. SELECT COMMAND
Syntax:
SELECT*FROM<table_name>;
2. INSERT COMMAND
11
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
3. UPDATE COMMAND
c. TCL
Transaction Control Language (TCL) commands are managed transactions in the database. These are
managed the changes made to the data in a table by DML statements. It also allows statements to be
grouped commonly into logical transactions.
• Commit
• Savepoint
• Rollback
Commit;
Save-point Command: -
SAVEPOINT command is used to tentatively save a transaction so that you can rollback to that point
whenever needed.
Using this command, we can name the various states of our data in any table and then rollback to that
state using the ROLLBACK command whenever needed.
12
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
Savepoint [name of savepint];
Rollback Command: -
This command returns the database to the last committed state. It is also used with the SAVEPOINT
command to jump to a savepoint with its name in a current transaction.
If we have used the UPDATE command to make some modifications into the database, and realize
that those modifications were not required, then we can use the ROLLBACK command to rollback
those modifications, if they were not committed using the COMMIT command.
Rollback;
Aggregate Functions in DBMS: Aggregate functions are those functions in the DBMS which takes
the values of multiple rows of a single column and then form a single value by using a query. These
functions allow the user to summarizing the data. These functions ignore the NULL values except the
count function.
In Database Management System, following are the five aggregate functions:
1. AVG
2. COUNT
3. SUM
4. MIN
5. MAX
13
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
1. COUNT FUNCTION
COUNT function is used to Count the number of rows in a database table. It can work on both numeric
and non-numeric data types.
COUNT function uses the COUNT(*) that returns the count of all the rows in a specified table.
COUNT(*) considers duplicate and Null.
Syntax
1. COUNT(*)
2. or
3. COUNT( [ALL|DISTINCT] expression )
4. Sample table:
5. PRODUCT_MAST
Item1 Com1 2 10 20
Item2 Com2 3 25 75
14
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
Item3 Com1 2 30 60
Item4 Com3 5 10 50
Item5 Com2 2 20 40
Item6 Cpm1 3 25 75
Item8 Com1 3 10 30
Item9 Com2 2 25 50
Example: COUNT()
1. SELECT COUNT(*)
2. FROM PRODUCT_MAST;
Output:10
1. SELECT COUNT(*)
2. FROM PRODUCT_MAST;
3. WHERE RATE>=20;
Output:7
15
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
Output:3
Output:com1 5
com2 3
Com3 2
Output: com1 5
Com2 3
2. SUM Function
Sum function is used to calculate the sum of all selected columns. It works on numeric fields only.
Syntax
1. SUM()
2. or
3. SUM( [ALL|DISTINCT] expression )
Example: SUM()
1. SELECT SUM(COST)
2. FROM PRODUCT_MAST;
16
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
Output: 670
1. SELECT SUM(COST)
2. FROM PRODUCT_MAST
3. WHERE QTY>3;
Output: 320
1. SELECT SUM(COST)
2. FROM PRODUCT_MAST
3. WHERE QTY>3
4. GROUP BY COMPANY;
Com2 170
Output:com1 335
Com3 170
4. MAX Function
MAX function is used to find the maximum value of a certain column. This function determines the
largest value of all selected values of a column.
Syntax
17
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
1. MAX()
2. or
3. MAX( [ALL|DISTINCT] expression )
Example:
1. SELECT MAX(RATE)
2. FROM PRODUCT_MAST;
Output: 30
5. MIN Function
MIN function is used to find the minimum value of a certain column. This function determines the
smallest value of all selected values of a column.
Syntax
1. MIN()
2. or
3. MIN( [ALL|DISTINCT] expression )
Example:
1. SELECT MIN(RATE)
2. FROM PRODUCT_MAST;
Output: 10
18
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
ER Diagrams contain different symbols that use rectangles to represent entities, ovals to define
attributes and diamond shapes to represent relationships.
At first look, an ER diagram looks very similar to the flowchart. However, ER Diagram includes
many specialized symbols, and its meanings make this model unique. The purpose of ER Diagram is
to represent the entity framework infrastructure.
• Entities
• Attributes
• Relationships
19
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
EXAMLE:
• The library management system has a database that shows the relationships between the
entities such as a book, publisher, and member. Since this is a simple system, it has only three
entities. Other systems can be more complex with a more significant number of entities such as
staff etc. book entity can have attributes like book_ID, title, price, and availability. Publisher
entity can have attributes like publisher_ID, publisher_address, and publisher_name. member
entity can have attributes like member_ID, member_date, member_type, member_address,
member_name, and expiry_date.
20
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
• Member Entity: It has member_ID, member_date, member_type, member_address,
member_name, and expiry_date.
• STEP – 1
• CREATE TABLE EMPLOYEE
• (EMP_ID INT , EMP_NAME VARCHAR(255) , EMP_DEPT VARCHAR(255) ,
EMP_ADDRESS VARCHAR(255), MOBILE_NUMBER INT , EMP_SALARY INT);
• STEP- 2
• INSERT INTO EMPLOYEE
• (EMP_ID, EMP_NAME ,EMP_DEPT, EMP_ADDRESS, MOBILE_NUMBER,
EMP_SALARY)
• VALUES('101', 'Luffy', 'HR', 'Faridabad', '9874354656', '65000');
21
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
QUERIES FOR THE SAME:
SUM( )
SELECT SUM(EMP_SALARY) from Employee ;
MAX( )
SELECT MAX(EMP_SALARY) from Employee ;
22
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
MIN( )
SELECT MIN(EMP_SALARY) from Employee ;
AVG( )
SELECT AVG(EMP_SALARY) from Employee ;
GROUP BY :
SELECT EMP_NAME,EMP_ID,EMP_SALARY from Employee GROUP BY EMP_NAME;
23
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
COUNT(*):
SELECT EMP_NAME,
COUNT(*) FROM EMPLOYEE GROUP BY EMP_ID ;
UPDATE:
UPDATE EMPLOYEE SET EMP_SALARY = "1000000" WHERE EMP_ID = "104" ;
24
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
LIKE:
SELECT * FROM EMPLOYEE WHERE EMP_NAME LIKE "M%" ;
DELETE:
DELETE FROM EMPLOYEE WHERE EMP_ID = "104" ;
6.QUERY
1. ALTER COMMAND
Consider the CUSTOMERS table having the following records
25
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
| 2 | Sanji | 25 | Delhi | 1500.00 |
| 3 | Zoro | 23 | Kota | 2000.00 |
| 4 | Nami | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Brook | 24 | FBD | 10000.00 |
Syntax
The basic syntax of an ALTER TABLE command to add a New Column in an existing table is as
follows.
ALTER TABLE table_name ADD column_name datatype;
The basic syntax of an ALTER TABLE command to DROP COLUMN in an existing table is as
follows.
ALTER TABLE table_name DROP COLUMN column_name;
EXAMPLE: 1
ALTER TABLE CUSTOMERS ADD SEX char(1);
OUTPUT:
ID | NAME | AGE | ADDRESS | SALARY | SEX |
| 1 | Luffy | 32 | GGN | 2000.00 | NULL |
| 2 | Luffy | 25 | Delhi | 1500.00 | NULL |
| 3 | Zoro | 23 | Kota | 2000.00 | NULL |
| 4 | Zoro | 25 | Mumbai | 6500.00 | NULL |
| 5 | Hardik | 27 | Bhopal | 8500.00 | NULL |
| 6 | Komal | 22 | MP | 4500.00 | NULL |
| 7 | Brook | 24 | FBD | 10000.00 | NULL |
EXAMPLE 2:
ALTER TABLE CUSTOMERS DROP SEX;
OUTPUT:
ID | NAME | AGE | ADDRESS | SALARY
| 1 | Luffy | 32 | GGN | 2000.00 |
| 2 | Luffy | 25 | Delhi | 1500.00 |
| 3 | Zoro | 23 | Kota | 2000.00 |
| 4 | Zoro | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
26
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Brook | 24 | FBD | 10000.00 |
2 INSERT COMMAND
Syntax
EXAMPLE :
INSERT INTO CUSTOMERS (ID,NAME,AGE,ADDRESS,SALARY)
VALUES (1, 'Ramesh', 32, 'GGN', 2000.00 );
OUTPUT:
ID | NAME | AGE | ADDRESS | SALARY |
| 1 | Luffy | 32 | GGN | 2000.00 |
| 2 | Sanji | 25 | Delhi | 1500.00 |
| 3 | Zoro | 23 | Kota | 2000.00 |
| 4 | Nami | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
27
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
| 6 | Komal | 22 | MP | 4500.00 |
3 UPDATE COMMAND
Syntax:
The basic syntax of the UPDATE query with a WHERE clause is as follows −
UPDATE table_name
SET column1 = value1, column2 = value2...., columnN = valueN
WHERE [condition];
EXAMPLE:
UPDATE CUSTOMERS
SET ADDRESS = 'Pune'
WHERE ID = 6;
OUTPUT:
28
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
4 LIKE COMAND
Syntax
The basic syntax of % and _ is as follows −
SELECT FROM table_name
WHERE column LIKE 'XXXX%'
or
or
or
or
29
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
WHERE SALARY LIKE '2_%_%'
4
Finds any values that start with 2 and are at least 3 characters in length.
EXAMPLE:
Consider the CUSTOMERS table having the following records −
OUTPUT:
30
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720
ID | NAME | AGE | ADDRESS | SALARY |
| 1 | Luffy | 32 | GGN | 2000.00 |
| 3 | Zoro | 23 | Kota | 2000.00
31
Aniket Kushwaha
4th Sem Section D Enrollment no. 00650601720