You are on page 1of 7

INFORMATION SYSTEM MANAGEMENT

SUBMITTED IN THE PARTIAL FULFILLMENT OF THE REQUIREMENT


OF BACHELORS IN BUSINESS ADMINISTRATION

UNDER THE GUIDANCE OF


MS SUPREET KAUR
SUBMITTED BY:
MEHAK LUTHRA
Enrolment Number-05590201720

Sri Guru Tegh Bahadur Institute of Management and Information


Technology
(Affiliated to Guru Gobind Singh Indraprastha University, Delhi)

(2020-2023)
ISM ASSIGNMENT

ANSWER NO.-1

CREATE SCHEMA IF NOT EXISTS EMP;

USE EMP

CREATE TABLE EMPLOYEE (ename char (20), gender char(1), ecity char(10),
esalary int, enumber int, eaddress char(30), departmentname char(20),
monthofjoining char(10), officecity char(20), emailid char(60));

INSERT INTO employee (ename, gender, ecity, esalary, enumber, eaddress,


departmentname, monthofjoining, officecity, emailid)

VALUES

('raaj', "M", 'delhi', 15000, 987654321, "37-tilak nagar", "finance", "January",'delhi',


"raaj@abc.com");

('deepika', "F", 'agra', 20000, 873483489, '32-ashok vihar', 'management', "June",


"Lucknow", "dp@dfc.com");

('anushka', "F", 'kanpur', 10000, 498382984, '34-ghatkopar', 'tally', "September",


"Kanpur", "weeq@ghn.com");

('jatin', "M", 'delhi', 12000, 98392802, '24-moti nagar', 'accounts', "May",


"Mumbai", "jatin@qwe.com");

('sangeeta',"F", 'rajasthan', 30000, 872293892, '83-kirti nagar', 'finance', "May",


"Mumbai", "saag@qwe.com");

('rahul', "M", 'delhi', 25000, 687777989, '14-manipur', 'banking', "January",'delhi',


"rahu@abc.com");
('dhruv', "M", 'kanpur',20000, 78657477, '16-andheri', 'HR', "June", "Mumbai",
"dhruv@dfc.com");

('rahika', "F", 'delhi', 15000, 87298299, '123-pitampura', 'insurance',


"March",'delhi', "rahi@abc.com");

('avinash', "M", 'kanpur', 30000, 38983930, '18-karnal road', 'HR', "January",'delhi',


"avinash@abc.com");

('daksh', "M", 'delhi', 20000, 847749922, '24-shastri nagar', 'tally', "April",'delhi',


"daksh@abc.com");

('Shanta', "F", 'delhi', 20000, 847749452, '26-shastri nagar', 'tally', "September",


"Kanpur", "shandd@ghn.com");

select * from employee;

ALTER TABLE employee


DROP email id;

OUTPUT
UPDATE employee
SET esalary= esalary+1000
WHERE ename= ‘jatin’;
Select* from employee;
ANSWER NO.-2

These SQL commands are mainly categorized into four categories as:

• DDL – Data Definition Language


• DQl – Data Query Language
• DML – Data Manipulation Language
• DCL – Data Control Language

 DDL (Data Definition Language):

DDL or Data Definition Language actually consists of the SQL commands that can
be used to define the database schema. It simply deals with descriptions of the
database schema and is used to create and modify the structure of database objects
in the database.

 List of DDL commands:


• CREATE: This command is used to create the database or its objects (like
table, index, function, views, store procedure, and triggers).

Syntax: CREATE TABLE table_name

• DROP: This command is used to delete objects from the database.

Syntax: DROP TABLE table_name;

• ALTER: This is used to alter the structure of the database.

Syntax: ALTER TABLE table_name ADD column_name datatype;

 DQL (Data Query Language):

DQL statements are used for performing queries on the data within schema objects.
The purpose of the DQL Command is to get some schema relation based on the
query passed to it.

 List of DQL:
• SELECT: It is used to retrieve data from the database.

Syntax: SELECT column1, column2 FROM table1, table2 WHERE


column2=’value’;

 DML(Data Manipulation Language):

The SQL commands that deals with the manipulation of data present in the database
belong to DML or Data Manipulation Language and this includes most of the SQL
statements. It is the component of the SQL statement that controls access to data and
to the database. Basically, DCL statements are grouped with DML statements.

 List of DML commands:


• INSERT: It is used to insert data into a table.

Syntax: INSERT INTO TABLE_NAME (column1, column2, column3,…columnN)

• UPDATE: It is used to update existing data within a table.

Syntax: UPDATE table_name

• DELETE: It is used to delete records from a database table.

Syntax: DELETE FROM table_name WHERE condition;

 DCL (Data Control Language):

DCL includes commands such as GRANT and REVOKE which mainly deal with
the rights, permissions, and other controls of the database system.

 List of DCL commands:


• GRANT: This command gives users access privileges to the database.

Syntax: GRANT privileges_names ON object TO user;

• REVOKE: This command withdraws the user’s access privileges given by


using the GRANT command.

Syntax: REVOKE EXECUTE ON [ PROCEDURE | FUNCTION ] object FROM


user;

You might also like