Professional Documents
Culture Documents
Information System Management Lab File
Information System Management Lab File
Information System Management Lab File
BBA 212
SUBMITTED BY: SUBMITTED TO:
1
CONTENTS
1. PRACTICAL 1 3-7
2. PRACTICAL 2 8
3. PRACTICAL 3 9-13
4. PRACTICAL 4 14-18
5. PRACTICAL 5 19-23
6. PRACTICAL 6 24-28
7. PRACTICAL 7 29-33
2
PRACTICAL 1
Q1. Write short note on SQL and Oracle Database SQL.
SQL
Why SQL?
3
A brief history of SQL:
SQL Process:
When you are executing an SQL command for any RDBMS, the system
determines the best way to carry out your request and SQL engine figures out
how to interpret the task.
Query Dispatcher
Optimization Engines
Classic Query Engine
SQL Query Engine etc.
A classic query engine handles all the non-SQL queries, but a SQL query
engine won’t handle logical files.
4
SQL Commands
The standard SQL commands to interact with relational databases are CREATE,
SELECT, INSERT, UPDATE, DELETE and DROP. These commands can be
classified into the following groups based on their nature-
5
DML-Data Manipulation Language:
ORACLE DATABASE
Oracle DB runs out on most major platforms, including Windows, UNIX, Linux
and Mac OS. Different software versions are available, based on requirements
and budget. Oracle DB editions are hierarchically broken down as follows:
6
Enterprises Edition: Offers all features, including superior performances
and security, and is the most robust.
Standard Edition: Contains base functionally for users that do not require
Enterprise Edition’s robust package.
Oracle Lite: For mobile devices.
7
PRACTICAL 2
Eaddres
s
n 1
Employee Work Company
s
Enumber
8
PRACTICAL 3
Q3. Write a program to study basic SQL commands (create table, insert, select
and execute the following queries using SQL commands:-
a) Create a database employ in that create table EMP with attributes Ename,
Ecity, Esalary, Enumbers, Eaddress and Department name.
b) Create another table company with attributes Cname, Ccity, Cnumber,
Enumber in database employ.
PRACTICAL COMMAND
a) EMPLOYEE TABLE
(Ename varchar(10) not null, Ecity varchar(10), Esalary number(10) not null,
Eaddress varchar(15), DepartmentName varchar(10), Enumber number(12)
primary key);
DESC Employee
9
INSERT INTO EMPLOYEE VALUES ('ISHAN','SONIPAT',85000,'H-65
devcolony','marketing',9645787456)
b) COMPANY TABLE
desc COMPANY;
10
insert into COMPANY values('Sharekhan','Delhi',5462,89561);
OUTPUT
a)
b)
11
c)
d)
12
PRACTICAL 4
Q4. To study viewing command (select, where, update) and execute the
following queries using these commands:
PRACTICAL COMMAND
desc EMPLOYEE;
DESC Employee
13
INSERT INTO EMPLOYEE VALUES ('GAURAV','GURUGRAM',96000,'H-
52 nangloi','FINANCE',8547689512)
COMPANY TABLE
desc COMPANY
14
insert into COMPANY values('L V','California',9874,2345);
OUTPUT
a.
15
b.
c.
16
d.
17
PRACTICAL 5
Q5. Write a program to study alter SQL command and execute the following
queries:
PRACTICAL COMMAND
DESC Employee
18
INSERT INTO EMPLOYEE VALUES ('HARPREET','DELHI',63000,'H-98
moti nagar','operations',9312279451)
COMPANY TABLE
desc COMPANY
19
insert into COMPANY values('Wipro','Mumbai',8965,32145);
OUTPUT
a.
20
b.
c.
21
d.
22
PRACTICAL 6
Q6. To study the command that involve compound conditions between like and
execute the full queries using these commands:
a) Find the Name of all Employees who live in Delhi and whose salary is
between 80000 to 90000.
b) Find the Names of all the Employees whose Name either begin with ‘D’
OR ‘K’.
c) Find the Company Name where the Company City is Delhi and Number
of Employees is not between 80000 and 85000.
d) Find Name of all the Companies that do not end with ‘n’.
PRACTICAL COMMAND
DESC Employee
23
INSERT INTO EMPLOYEE VALUES ('ISHAN','SONIPAT',85000,'H-65
devcolony','marketing',9645787456)
COMPANY TABLE
desc COMPANY
24
insert into COMPANY values('L V','California',9874,2345);
25
OUTPUT
a)
b)
26
c)
d)
27
PRACTICAL 7
Q7. To study aggregate functions (sum, max, avg.) and execute the following
queries using these commands: -
a) Find sum and average of the salary of all the employees of all
Department.
b) Find the number of employees who lives in New Delhi.
c) Find maximum and minimum salary of all the department.
PRACTICAL COMMAND
DESC Employee
28
INSERT INTO EMPLOYEE VALUES ('HARPREET','DELHI',63000,'H-98
moti nagar','operations',9312279451)
29
OUTPUT
a)
30
b)
c)
31
32