Abhay Krishan - ISM LAB Converted 1 20
Abhay Krishan - ISM LAB Converted 1 20
Programme: BBA Semester: 4th Paper Code lab: 212 Session -2019
Assignment 6 1. Create table hotel and insert 3 records for the following attributes:- Hotelno
(primary key), Hotelname, city
2. Create table Room and insert 3 records for the following fields:- Room
no(primary key), hotelno(foreign key), type of room, price
3. Create table guest and insert 3 records into table:- Guest no(primary key),
gname, gaddress
4. Create table booking and insert 3 records for the following fields- Hotelno -
foreign key),guestno(foreign key),datefrom,dateto,roomno
5. Find average price of a room
6. List name and address of guest with booking for a hotel in ‘delhi’ ordered by
name
7. Find total income of all rooms of the hotel in Mumbai
8. List names of guest at hotel TAJ
9. Increase price of rooms of TAJ to 10%
10. Count the no of rooms of each type
Assignment 7 1. Create a table employee with following attributes eno(Primary Key) ,ename
,ecity, salary, deptno
2. Insert 5 records
3. Create a view having ename and ecity.
4. In the above view update the ecity to ‘Delhi’ where ename is ‘John’.
5. Insert a row in the view and see if it is visible in table created.
6. Create view containing ename,city,deptno and salary and update the view by
increasing the salary of all employees of department no 10 by Rs.1000.
7. Create view having details of employee working in deptno=10
8. Create a view having grouping functions like max(sal)and min(sal)
9. Update the above view and set the max salary to 90000.Observe the result.
10. Delete the view created
Assignment 8 1. Give Syntax and Queries to demonstrate the use of following Numeric
functions in System Defined Table
• Absolute
• Power
• Trunc
• Greatest
• Least
• sqrt
• Log
• Sin
• Cos
• Tan
• Round
• Floor
• Ceil
Assignment 9
Create entity relationship diagrams between three tables using MS-Access
E-R Diagram
ASSIGNMENT 1
Ans) 1) CHAR (size)- A FIXED length string (can contain letters, numbers,
and special characters). The size parameter specifies the column length in
characters - can be from 0 to
255. Default is 1.
ENROLLMENTNO. P a g e 6 | 71
12224401719
ISM LAB FILE
3) special characters). The size parameter specifies the maximum column length
in characters
- can be from 0 to 65535.
4) BINARY (size)- Equal to CHAR(), but stores binary byte strings. The
size parameter specifies the column length in bytes. Default is 1.
ENROLLMENTNO. P a g e 7 | 71
12224401719
ISM LAB FILE
ENROLLMENTNO. P a g e 8 | 71
12224401719
ISM LAB FILE
ENROLLMENTNO. P a g e 9 | 71
12224401719
ISM LAB FILE
ASSIGNMENT 2
Ques 1) Create table
customer. Ans) Steps:
• Create table abhaykrishan_customer(CID number(3), FName char(10),
LName char(10), City char(10), PIN number(5), State char(7))
• Desc abhaykrishan_customer
ENROLLMENTNO. P a g e 10 | 71
12224401719
ISM LAB FILE
ENROLLMENTNO. P a g e 11 | 71
12224401719
ISM LAB FILE
ENROLLMENTNO. P a g e 12 | 71
12224401719
ISM LAB FILE
ENROLLMENTNO. P a g e 13 | 71
12224401719
ISM LAB FILE
ENROLLMENTNO. P a g e 14 | 71
12224401719
ISM LAB FILE
ENROLLMENTNO. P a g e 15 | 71
12224401719
ISM LAB FILE
ENROLLMENTNO. P a g e 16 | 71
12224401719
ISM LAB FILE
ENROLLMENTNO. P a g e 17 | 71
12224401719
ISM LAB FILE
ENROLLMENTNO. P a g e 18 | 71
12224401719
ISM LAB FILE
Ques 17) Retrieve all rows where first name contains the word ‘MEG’ Ans)
Select* from abhaykrishan_customer where FName like ‘Meg%’
ENROLLMENTNO. P a g e 19 | 71
12224401719