Goysha ISM Lab File (FINAL) - 3
Goysha ISM Lab File (FINAL) - 3
Practical file on
INFORMATION SYSTEMS MANAGEMENT - LAB (BBA 307)
NAAC Accredited: A Grade (3rd Cycle), Category A+ Institution (by SFRC, Govt of NCT of
Delhi)
(Approved by AICTE, HRD Ministry, Govt. of India) Affiliated to Guru Gobind Singh
I am deeply indebted to Mr. Mohit Khatri, Assistant Professor at Rukmini Devi Institute of
Advanced Studies (RDIAS), for his invaluable guidance, support, and mentorship throughout the
preparation of this practical file on Information Systems Management - Lab (BBA 307). His
I would also like to extend my sincere gratitude to the esteemed faculty members of RDIAS, who
My heartfelt thanks go to my peers for their collaborative spirit and my family for their unwavering
support and encouragement, which have played a crucial role in motivating me to give my best.
This is to certify that the practical file titled "Information Systems Management - Lab (BBA
307)" has been successfully completed and submitted by Goysha Vishnoi, Roll No: 04615901722,
The work presented in this practical file is the result of the student’s dedicated efforts and has been
completed under my guidance during the academic session 2024–2025. The file includes the
practical application of concepts and tasks related to database management, SQL, and entity-
I hereby affirm that the content of this practical file is original and meets the standards of academic
Page
S.No LIST OF QUESTIONS No.
Reg_no Varchar 10
2 3-4
Name Char 30
DOB date
Address Varchar 50
A. Insert records to the table with row 4 having JOB entry as default value.
B. Enter Salary as 100 to verify the running of Check constraint.
C. DELETE the third row.
D. Add Attribute experience as varchar(10). Fill the records in the column
using reference of empno and name.
7 21 - 24
Solve the following SQL queries using table (Employee) created in the
question above.
A. Write a query to display the records of employees in alphabetical order of
their name.
B. Write a query to display name, job and hiredate of salesman only.
C. Write the query to display name of employee having in their names ‘ll' or ‘tt’.
D. Write a query to display employees who are analyst or salesman in
8 25 - 28
descending order of names.
E. Write the query to display name, empno, job and hiredate of employees
hired between '08–jun–1981' and '16–apr–1982';
F. Write the query to display employees who are managers and have salary
above 2500.
G. Write the query to display employees who are NOT analyst.
H. Write the query to display the distinct jobs.
Use the table Employee given in Q7 and solve the following queries to understand
the usage of AGGREGATE FUNCTIONS
A. Count the number of job available.
Count number of clerks.
9 29 - 31
B. Find the total of EMPNO and SAL.
C. Find minimum and maximum salary of Managers.
D. Find the average of salary and name it AverageSalary.
E. Write a query to get the difference between the highest and lowest salaries.
10 32 - 34
1
B) Cheat sheet of all the Basic DDL commands
4. TRUNCATE: Removes all rows from a table but keeps its structure.
For example:- TRUNCATE TABLE table_name;
2
Q-2 Create a table Student using the following Schema
Reg_no Varchar 10
Name Char 30
DOB date
Address Varchar 50
3
- The table shows column_name, data_type, data_length
4
Q-3 Design an Entity Relationship (ER) model for a college database in MS word. Say we
have the following statements.
5
Q-4 Dept_identify any 5 tables from above case study , create them and add at least 5 rows
in each.
1. Department Table - This table stores the details of departments in the college.
6
- Table Created
2. Instructor Table - This table stores the details of instructors working in different
departments.
7
- Inserting 5 rows into Instructor table
- Table Created
8
3. Course Table- This table stores information about courses offered by departments.
9
- Table Created
4. Student Table - This table stores information about students in the college.
10
- Inserting 5 rows into studentss table
- Table Created
11
5. Enrollment Table - This table stores information about which students have enrolled in
which courses.
12
- Table Created
13
Q-5 Using the table you created (Student) in question 3 (Annexure 1) solve the following
queries using DDL commands.
14
c) Single line and Multi line comment
15
e) DROP the table Student.
16
Q-6 Solve the following queries making use of DDL commands:
Columns Data Type & constraints
EMP_NO Number
EName Varchar (20), NOT NULL
JOB Varchar(10), DEFAULT ‘MANAGER’
HIREDATE number, UNIQUE
SAL number, CHECK (SAL>=800)
A. Create table Employee as per the data provided above in the table.
B. Add new Column email as varchar(15) .
C. Change the data type of Column Hiredate to date in the table.
D. Which field will you choose as primary key? Why? Apply to it primary key
constraint.
E. Drop the attribute email.
17
b) ALTER TABLE Employee
ADD email VARCHAR(15);
18
d) The EMP_NO field should be chosen as the primary key because it is unique for each
employee and serves as a unique identifier for each record.
ALTER TABLE Employee
ADD CONSTRAINT pk_employee PRIMARY KEY (EMP_NO);
19
Q-7 Perform following SQL DML commands using table (Employee) created in the
question above.
E. Insert records to the table with row 4 having JOB entry as default value.
H. Add Attribute experience as varchar(10). Fill the records in the column using
reference of empno and name.
Ans 7 a) insert records insert into employee (emp_no, ename, job, hiredate, sal) values (7369,
'smith', 'clerk', to_date('1980-12- 17', 'yyyy-mm-dd'), 800);
insert into employee (emp_no, ename, job, hiredate, sal) values (7499, 'allen', 'salesman',
to_date('1981- 02-20', 'yyyy-mm-dd'), 1600);
insert into employee (emp_no, ename, job, hiredate, sal) values (7521, 'ward', 'salesman',
to_date('1981- 02-22', 'yyyy-mm-dd'), 1250);
insert into employee (emp_no, ename, job, hiredate, sal) values (7566, 'jones', default,
to_date('1981-04- 02', 'yyyy-mm-dd'), 2975);
insert into employee (emp_no, ename, job, hiredate, sal) values (7654, 'martin', 'salesman',
to_date('1981-09-28', 'yyyy-mm-dd'), 1250);
insert into employee (emp_no, ename, job, hiredate, sal) values (7698, 'blake', 'manager',
to_date('1981- 05-01', 'yyyy-mm-dd'), 2850);
insert into employee (emp_no, ename, job, hiredate, sal) values (7782, 'clark', 'manager',
to_date('1981- 06-09', 'yyyy-mm-dd'), 2450);
insert into employee (emp_no, ename, job, hiredate, sal) values (7788, 'scott', 'analyst',
to_date('1987- 04-19', 'yyyy-mm-dd'), 3000);
insert into employee (emp_no, ename, job, hiredate, sal) values (7839, 'king', 'president',
to_date('1981- 11-17', 'yyyy-mm-dd'), 5000);
insert into employee (emp_no, ename, job, hiredate, sal) values (7844, 'turner', 'salesman',
to_date('1981-09-08', 'yyyy-mm-dd'), 1500);
20
b) insert into employee values('7844','turner','salesman','8-sep-81','100');
21
c) delete from employee where emp_no=7521
22
update employee set experience='three' where emp_no='7499';
23
Q- 8 Solve the following SQL queries using table (Employee) created in the
question above.
I. Write a query to display the records of employees in alphabetical order of their name.
J. Write a query to display name, job and hiredate of salesman only.
K. Write the query to display name of employee having in their names ‘ll' or ‘tt’.
L. Write a query to display employees who are analyst or salesman in descending order of
names.
M. Write the query to display name, empno, job and hiredate of employees hired between '08–
jun–1981' and '16–apr–1982';
N. Write the query to display employees who are managers and have salary above 2500.
O. Write the query to display employees who are NOT analyst.
Write the query to display the distinct jobs.
24
Part-c select* from employee where ename like'%ll%' or ename like'%tt%';
Part-d select* from employee where job='salesman' or job='analyst' order by ename desc;
25
Part-e select ename, emp_no, job, heridate from employee where heridate between ('08-jun
1981') and ('16-apr-1982');
26
Part-g select* from employee where job<>'analyst';
27
Q-9 Use the table Employee given in Q7 and solve the following queries to understand the
usage of AGGREGATE FUNCTIONS
A. Count the number of job available. Count number of clerks.
B. Find the total of EMPNO and SAL
C. Find minimum and maximum salary of Managers.
D. Find the average of salary and name it AverageSalary.
E. Write a query to get the difference between the highest and lowest salaries.
28
B) Find the total of EMPNO and SAL.
Command - Select Sum(EMP_NO), Sum(SAL) from
employee;
29
D) Find the average of salary and name it AverageSalary.
Command - SELECT AVG(SAL) FROM Employee;
E) Write a query to get the difference between the highest and lowest salaries.
Command - Select Max(sal) - min(sal) from employee;
30
Q-10 Write the Query to get the given output.
D. Display data of table having salary greater than the average salary of all employees in
descending order of names.
E. Display name, hiredate and job of the employees having salary equal to the
averagesalary of all staff members in ascending order of names.
31
B) Command – Select Max(sal) as HIGHEST_BONUS , Min(sal) as LOWEST_BONUS,
Sum(sal) as TOTAL_BONUS, avg(sal) as AVERAGE_BONUS from employee;
OUTPUT –
OUTPUT –
32
D) Display data of table having salary greater than the average salary of all employees in
descending order of names.
OUTPUT –
E) Display name, hiredate and job of the employees having salary equal to the average salary of
all staff members in ascending order of names.
33