Uploaded by Rishik

ISM MAIN FILE (1)

advertisement
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
ISM LAB FILE
Subject Code: BBA-212
BACHELOR OF BUSINESS ADMINSTRATION
GURU GOBIND SINGH INDRAPRASTHA
UNIVERSITY, DELHI
Session 2019-2022
Submitted To:
Dr. Ranjeeta Kaur
Submitted By:
Name: HARDIK SHARMA
Enrollment No: 01417001719
Class: BBA 4th SEM “A”(MORNING SHIFT)
Page 1
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
INDEX
Sno
Particulars
1 WRITE A PROGRAM TO CREATE A DATABASE TABLE SOURCE CODE
WRITE A PROGRAM TO CREATE, INSERT, SELECT & UPDATE ROWS
2 AND COLUMNS.
3 WRITE A PROGRAM TO DELETE PARTICULAR RECORDS FROM TABLE.
4 WRITE A PROGRAM TO IMPLEMENT DISTINCT OPERATOR.
5 WRITE A PROGRAM TO DISPLAY TABLE VALUES.
WRITE A PROGRAM TO CREATE A DATABASE USING GROUP BY
6 CLAUSE OPERATOR.
WRITE A PROGRAM TO ARRANGE THE COLUMN VALUES
7 (ASCENDING ORDER) USING ORDER BY CLAUSE
WRITE A PROGRAM TO IMPLEMENT PRIMARY KEY AND UNIQUE KEY
8 CONSTRAINT WITH ALTER CONSTRAINT.
WRITE A PROGRAM TO IMPLEMENT LIKE AND WHERE CLAUSE
9 OPERATOR
CONSIDER A DATABASE FOR A BANKING ENTERPRISE. WRITE THE
10 QUERIES FOR THE FOLLOWING QUESTIONS:
CONSIDER THE DATABASE FOR A COLLEGE. WRITE THE QUERY FOR
11 THE FOLLOWING.
CONSIDER THE DATABASE FOR AN ORGANIZATION. WRITE THE
12 QUERIES FOR THE FOLLOWING,
CREATE THE DATABASE FOR A COLLEGE AND DESIGN AN ER
13 DIAGRAM.WRITE THE QUERY FOR THE FOLLOWING14 CREATE THE FOLLOWING TABLE
WRITE A PROGRAM TO CREATE A DATABASE USING AND,OR AND
15 NOT OPERATOR.
DISPLAY THE COMPLETE RECORDS OF EMPLOYEES WORKING IN
16 SALES DEPARTMENT.
WRITE A PROGRAM TO IMPLEMENT CHECK AND UNIQUE
17 CONSTRAINTS.
WRITE A PROGRAM TO CREATE PRIMARY KEYS WITH ALTER
18 COMMAND.
19 WRITE A PROGRAM TO CREATE TABLE TICKET
WRITE A PROGRAM TO DISPLAY THE TOTAL SALARY PAID TO A
20 SALESMAN
WRITE A PROGRAM TO PRINT THE LIST OF EMPLOYEES ACCORDING
21 TO ASCENDING ORDER OF SALARY
Page 2
Date
03Mar
03Mar
04Mar
10Mar
13Mar
16Mar
19Mar
22Mar
25Mar
31Mar
02Apr
09Apr
16Apr
19Apr
21Apr
26Apr
30Apr
04May
07May
17May
20May
Page
no.
4
5
7
8
9
10
11
12
13
15
17
19
21
24
26
27
28
29
30
31
32
Signature
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
Sno
Particulars
WRITE A PROGRAM TO FIND THE LEAST AND HIGHEST SALARIES
22 THAT AN EMPLOYEE DRAWNS.
23 CREATE TABLE AND ENTER 5 TUPLES INTO THE TABLE SUCH THAT24 DRAW AN ER-DIAGRAM OF LIBRARY MANAGEMENT SYSTEM
25 DRAW AN ER-DIAGRAM OF BANKING SYSTEM
Page 3
Date
24May
27May
31May
31May
Page
no.
33
34
35
36
Signature
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-1
AIM
WRITE A PROGRAM TO CREATE A DATABASE TABLE SOURCE CODE-USING SQL
OUTPUT
Page 4
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM- 2
AIM
WRITE A PROGRAM TO CREATE, INSERT, SELECT & UPDATE ROWS AND COLUMNS.
CODE- USING SQL.
OUTPUT
Page 5
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
Page 6
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-3
AIM
WRITE A PROGRAM TO DELETE PARTICULAR RECORDS FROM TABLE.
OUTPUT
Page 7
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-4
AIM
WRITE A PROGRAM TO IMPLEMENT DISTINCT OPERATOR.
OUTPUT
Page 8
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-5
AIM
WRITE A PROGRAM TO DISPLAY TABLE VALUES.
OUTPUT
Page 9
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-6
AIM
WRITE A PROGRAM TO CREATE A DATABASE USING GROUP BY
CLAUSE OPERATOR.
OUTPUT
Page
10
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-7
AIM
WRITE A PROGRAM TO ARRANGE THE COLUMN VALUES
(ASCENDING ORDER) USING ORDER BY CLAUSE
OUTPUT
Page
11
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-8
AIM
WRITE A PROGRAM TO IMPLEMENT PRIMARY KEY AND UNIQUE
KEY CONSTRAINT WITH ALTER CONSTRAINT.
OUTPUT
Page
12
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-9
AIM
WRITE A PROGRAM TO IMPLEMENT LIKE AND WHERE CLAUSE
OPERATOR
OUTPUT
Page
13
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
Page
14
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-10
AIM
CONSIDER A DATABASE FOR A BANKING ENTERPRISE. WRITE THE
QUERIES FOR THE FOLLOWING QUESTIONS:
A. INSERT AT LEAST FIVE TUPLES IN EACH TABLE.
B. DISPLAY THE BRANCH
C. LIST OF CUSTOMER OF MUMBAI CITY
D. LIST OF THE STATES HAVING MORE THAN ONE BRANCH
OUTPUT
Page
15
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
Page
16
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-11
AIM
CONSIDER THE DATABASE FOR A COLLEGE. WRITE THE QUERY
FOR THE FOLLOWING. INSERT AT LEAST 5 TUPLES INTO EACH
TABLE. (A) LIST THE DETAILS OF STUDENT IN THE ASCENDING
ORDER OF DATE OF BIRTH. (B) DISPLAY THE DETAILS OF
STUDENTS FROM COMPUTER DEPARMENT (C) LIST THE
FACULTIES IN THE DESCENDING ORDER OF SALARY (D) DISPLAY
THE TOTAL NO. OF STUDENTS IN EACH DEPARTMENT (E) DISPLAY
THE TOTAL NUMBER OF FACULTIES IN EACH DEPARTMENT WITH
SALARY GREATER THAN 25000
OUTPUT
Page
17
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
Page
18
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-12
AIM
CONSIDER THE DATABASE FOR AN ORGANIZATION. WRITE THE
QUERIES FOR THE FOLLOWING, ADD 5 ROWS IN THE EMPLOYEE &
DEPARTMENT TABLE. (A) DISPLAY ALL RECORDS FROM THE
ABOVE TABLES. (B) DISPLAY EMP_NO, EMP_NAME OF ALL THE
EMPLOYEES FROM DEPT_NO 2. (C) DISPLAY EMP_NO, EMP_NAME,
DESIGNATION, DEPT_NO AND SALARY IN THE DESCENDING
ORDER OF SALARY. (D) DISPLAY THE EMP_NO, EMP_NAME OF ALL
THE EMPLOYEES THOSE SALARY IS BETWEEN 2000 & 5000.
OUTPUT
Page
19
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-13
Page
20
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
AIM
CREATE THE DATABASE FOR A COLLEGE AND DESIGN AN ER DIAGRAM.
WRITE THE QUERY FOR THE FOLLOWINGCREATE THE TABLESTUDENT(SID,SNAME,GENDER,DOB,DNO)
DEPARTMENT(DNO,DNAME)
FACULTY(FID,FNAME,DESIGNATION,SALARY)
COURSE(CID,CNAME,CREDITS,DNO)
REGISTER(SID,CID,SEM)
TEACHING(FID,CID,SEM)
HOSTEL(HID,HNAME,SEATS)
A) DISPLAY ALL THE TABLE IN THE COLLEGE IN COLLEGE DATABASE
B) DESCRIBE THE STRUCTURE OF ALL THE TABLES.
C) MODIFY THE STUDENT TABLE TO ADD A NEW FIELD ‘GRADE’
D) SHOW THE RECORD IN FACULTY TABLE WITH HIGHEST SALARY
E) SHOW THE NAME OF HOSTEL & NUMBER OF SEATS AVAILABLE IN
HOSTEL
ER DIAGRAM
Page
21
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
STUDENT
SID
SNAME
GENDER
DOB
DNO
DEPARTMENT
REGISTER
SID
CID
SEM
TEACHING
FID
CID
SEM
DNO
DNAME
HOSTEL
HID
HNAME
SEATS
OUTPUT
Page
22
COURSE
CID
CNAME
CREDITS
DNO
FACULTY
FID
FNAME
DESIGNATION
SALARY
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
Page
23
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-14
AIM
CREATE THE FOLLOWING TABLE
A)EMPLOYEE(EMP_NO,EMP_NAME,DOB,ADDRESS,DOJ,MOBILE_NO,DEPT_NO
,SALARY)
B) DEPARTMENT(DEPT_NO,DEPT_NAME,LOCATION)
C) IT INCLUDE NECESSARY CONSTRAINTS.
D) LIST ALL THE TABLES IN THE CURRENT DATABASE
E) DISPLAY THE STRUCTURE OF THE EMPLOYEE TABLE
F) ADD A NEW COLUMN DESIGNATION IN THE EMPLOYEE TABLE
G) DROP THE COLUMN LOCATION FROM THE DEPARTMENT TABLE
H) DROP THE TABLES
I) DELETE THE DATABASE
OUTPUT
Page
24
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
Page
25
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-15
AIM
WRITE A PROGRAM TO CREATE A DATABASE USING AND,OR AND
NOT OPERATOR.
OUTPUT
Page
26
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-16
AIM
DISPLAY THE COMPLETE RECORDS OF EMPLOYEES WORKING IN
SALES DEPARTMENT.
OUTPUT
Page
27
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-17
AIM
WRITE A PROGRAM TO IMPLEMENT CHECK AND UNIQUE
CONSTRAINTS.
OUTPUT
Page
28
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-18
AIM
WRITE A PROGRAM TO CREATE PRIMARY KEYS WITH ALTER
COMMAND.
OUTPUT
Page
29
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-19
AIM
WRITE A PROGRAM TO CREATE TABLE TICKET
OUTPUT
Page
30
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-20
AIM
WRITE A PROGRAM TO DISPLAY THE TOTAL SALARY PAID TO A
SALESMAN
OUTPUT
Page
31
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-21
AIM
WRITE A PROGRAM TO PRINT THE LIST OF EMPLOYEES
ACCORDING TO ASCENDING ORDER OF SALARY
OUTPUT
Page
32
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-22
AIM
WRITE A PROGRAM TO FIND THE LEAST AND HIGHEST SALARIES
THAT AN EMPLOYEE DRAWNS.
OUTPUT
Page
33
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-23
AIM
CREATE TABLE AND ENTER 5 TUPLES INTO THE TABLE
A) DISPLAY ALL THE NUMBER OF EMPLOYEES WORKING IN
EACH DEPARTMENT
B) FIND THE SUM OF THE SALARIES OF ALL EMPLOYEES
OUTPUT
Page
34
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-24
AIM
DRAW AN ER-DIAGRAM OF LIBRARY MANAGEMENT SYSTEM
Pub_id
Address
Author
Price
Bookid
Name
Available
Title
Publisher
Published
by
Book
M_date
M_mno
M_id
Address
Expiry
date
Issue
Borrowed
by
Name
Member
Page
35
HARDIK SHARMA 01417001719 BBA-4-M-‘A’
PROGRAM-25
AIM
DRAW AN ER-DIAGRAM OF BANKING SYSTEM
Last Name
First Name
Address
Account
Number
Balance
Name
HAS
Account
Contact
User
Account
type
Savings
Account
Current
Account
Over-draft
accounting
ATM
number
Performs
Transactions
ATM
ATM Cash
Limit
ATM
Place
Page
36
Deposit
Cash
Deposit
Cheque
Withdraw
Cash
Download