Internal Sets
|
LAKIREDDY BALI
REDDY COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER
SCIENCE AND ENGINEERING DATA BASE
MANAGEMENT SYSTEM INTERNAL LAB & 20CS56 |
Set no : 1 |
|||
1.
Sailors(sid:
integer , sname: string, rating: integer, age: real) Boats(bid: integer , bname: string,
color: string) Reserves(sid: integer, bid: integer,
day: date).
For the above schema, perform the following: 1. Find
the names of sailors who have reserved a red boat, and list in the order of
age. 2. Find the
colors of boats reserved by Lubber. 3. Find
the names of sailors who have reserved a red or a green boat. 4. Find
all sids of sailors who have rating of 10 or have reserved boat 104
2. Write a Procedure to find the
reverse of the given number.
|
|||||
|
LAKIREDDY BALI
REDDY COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER
SCIENCE AND ENGINEERING DATA BASE
MANAGEMENT SYSTEM INTERNAL LAB & 20CS56 |
Set no : 2 |
|||
1. EMPLOYEE
(Fname, Mname, Lname, SSN, Bdate, Address, Gender, Salary, SuperSSN, Dno) DEPARTMENT(Dnumber,
Dname, MgrSSN, Mgrstartdate) DEPENDENT
(ESSN, Dependent_Name, Gender, Bdate, Relationship)
DEPT_LOCATIONS (Dnumber, Dloaction) PROJECT
(Pname, Pnumber, Plocation, Dnum) WORKS_ON
(ESSN, Pno, Hours)
For the above schema, perform the following: 1.
Retrieve
the birth date and address of the employee(s) whose name is 'John B.Smith'. 2.
Find
the names of all employees who are directly supervised by 'Franklin Wong'. 3.
For
each employee, retrieve the employee's first and last name and the first and
last name of his or her immediate supervisor. 4.
Create
a view that contains the details of employees who are managers only.
2.
Create
a cursor to modify the salary of all employees belonging to 'Research'
department by 150%. |
|||||
|
LAKIREDDY BALI
REDDY COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER
SCIENCE AND ENGINEERING DATA BASE
MANAGEMENT SYSTEM INTERNAL LAB & 20CS56 |
Set no : 3 |
|||
1.
Sailors(sid:
integer , sname: string, rating: integer, age: real) Boats(bid: integer , bname:
string, color: string) Reserves(sid: integer, bid:
integer, day: date). For the above schema, perform the following : 1. Find
the names of sailors who have not reserved a red boat. 2. Find
the names of sailors who are older than the oldest sailor with a rating of
10. 3. Find
the age of the youngest sailor who is eligible to vote (i.e., is at Least 18
years old) for each rating level with at least two such sailors. 4. Find
those ratings for which the average age of sailors is the minimum overall
ratings.
2. Write
a procedure to find the Armstrong number.
|
|||||
|
LAKIREDDY BALI
REDDY COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER
SCIENCE AND ENGINEERING DATA BASE
MANAGEMENT SYSTEM INTERNAL LAB & 20CS56 |
Set no : 4 |
|||
1. EMPLOYEE
(Fname, Mname, Lname, SSN, Bdate, Address, Gender, Salary, SuperSSN, Dno) DEPARTMENT(Dnumber, Dname,
MgrSSN, Mgrstartdate) DEPENDENT (ESSN, Dependent_Name,
Gender, Bdate, Relationship)
DEPT_LOCATIONS (Dnumber,
Dloaction) PROJECT (Pname, Pnumber,
Plocation, Dnum) WORKS_ON (ESSN, Pno, Hours) For the above
schema, perform the following : 1. For every project located in
'Stafford',list the project number,the controlling department number,and the
department manager's last name,address,and birth date. 2. Find the names of all employees
who are directly supervised by 'Franklin Wong'. 3. for each employee ,retrive the
employee's first and last name and the first and last name of his or her
immediate supervisor. 4. Retrieve the birth date and
address of the employee(s) whose name is 'John B.Smith'. 2.
Write
a Procedure that updates salaries of all employees with 10 % hike (use
cursors). |
|||||
|
LAKIREDDY BALI
REDDY COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER
SCIENCE AND ENGINEERING DATA BASE
MANAGEMENT SYSTEM INTERNAL LAB & 20CS56 |
Set no : 5 |
|||
1.
Sailors(sid:
integer , sname: string, rating: integer, age: real) Boats(bid: integer , bname:
string, color: string) Reserves(sid: integer, bid:
integer, day: date). For the above schema, perform the following : 1. Find
sailors whose rating is better than some sailor called HORATIO 2. Find
the names of sailors who have not reserved a red boat. 3. Find
the age of the youngest sailor for each rating level. 4. Find
the sids of all sailors who have reserved red boats but not green boats.
2.
Write a procedure which accept the
account number of a customer and retrieve the balance. |
|||||
|
LAKIREDDY BALI
REDDY COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER
SCIENCE AND ENGINEERING DATA BASE
MANAGEMENT SYSTEM INTERNAL LAB & 20CS56 |
Set no : 6 |
|||
1. EMPLOYEE
(Fname, Mname, Lname, SSN, Bdate, Address, Gender, Salary, SuperSSN, Dno) DEPARTMENT(Dnumber, Dname,
MgrSSN, Mgrstartdate) DEPENDENT (ESSN, Dependent_Name,
Gender, Bdate, Relationship)
DEPT_LOCATIONS (Dnumber,
Dloaction) PROJECT (Pname, Pnumber,
Plocation, Dnum) WORKS_ON (ESSN, Pno, Hours) For the above
schema, perform the following : 1. Retrieve
the birth date and address of the employee(s) whose name is 'John B.Smith'. 2. Retrieve
the name and address of all employees who work for the 'Research' department. 3. For
every project located in 'Stafford',list the project number,the controlling
department number,and the department manager's last name,address,and birth
date. 4. Find
the names of all employees who are directly supervised by 'Franklin Wong'. 2.
Write a Procedure to find the sum of the
digits in the given number. |
|||||
|
LAKIREDDY BALI
REDDY COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER
SCIENCE AND ENGINEERING DATA BASE
MANAGEMENT SYSTEM INTERNAL LAB & 20CS56 |
Set no : 7 |
|||
I.
Sailors(sid:
integer , sname: string, rating: integer, age: real) Boats(bid: integer , bname:
string, color: string) Reserves(sid: integer, bid:
integer, day: date). For the above schema, perform the
following : 1.
Find the names of sailors who have
reserved a red boat, and list in the order of age. 2.
Find the colors of boats reserved by
Lubber. 3.
Find the names of sailors who have
reserved a red or a green boat. 4.
Find all sids of sailors who have rating
of 10 or have reserved boat 104
2.
Write a Procedure to print the Fibonacci numbers in the given range. |
|||||
|
LAKIREDDY BALI
REDDY COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER
SCIENCE AND ENGINEERING DATA BASE
MANAGEMENT SYSTEM INTERNAL LAB & 20CS56 |
Set no : 8 |
|||
1.
EMPLOYEE (Fname, Mname, Lname, SSN, Bdate,
Address, Gender, Salary, SuperSSN, Dno) DEPARTMENT(Dnumber, Dname,
MgrSSN, Mgrstartdate) DEPENDENT (ESSN, Dependent_Name,
Gender, Bdate, Relationship)
DEPT_LOCATIONS (Dnumber,
Dloaction) PROJECT (Pname, Pnumber,
Plocation, Dnum) WORKS_ON (ESSN, Pno, Hours) 1. Retrieve
the salary of every employee and all distinct salary values. 2. Retrieve
all employees whose address is in Houston, Texas. 3. Find
all employees who were born during the 1950s. 4. Show
the resulting salaries if every employee working on the 'ProductX' project is
given a 10 percent raise. 2. Write
a Procedure to find the Armstrong number.
|
|||||
|
LAKIREDDY BALI
REDDY COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER
SCIENCE AND ENGINEERING DATA BASE
MANAGEMENT SYSTEM INTERNAL LAB & 20CS56 |
Set no : 9 |
|||
1. Create a table STUDENT with
appropriate data types and perform the following queries. Attributes are Roll
number, student name, date of birth, branch and year of study. 2.
List
students of CSE & ECE who born after 1980. 3.
List
all students in reverse order of their names. 4.
Delete
students of any branch whose name starts with ‘s‘. 5.
Display
student name padded with *‘after the name of all the students. 2.Create a procedure to modify the
year of study of all students belonging to 'CSE' department by 'AIML'. |
|||||
. |
LAKIREDDY BALI
REDDY COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER
SCIENCE AND ENGINEERING DATA BASE
MANAGEMENT SYSTEM INTERNAL LAB & 20CS56 |
Set no : 10 |
|||
1. EMPLOYEE (Fname, Mname, Lname, SSN,
Bdate, Address, Gender, Salary, SuperSSN, Dno) DEPARTMENT(Dnumber, Dname,
MgrSSN, Mgrstartdate) DEPENDENT (ESSN, Dependent_Name,
Gender, Bdate, Relationship)
DEPT_LOCATIONS (Dnumber, Dloaction) PROJECT (Pname, Pnumber,
Plocation, Dnum) WORKS_ON (ESSN, Pno, Hours) For the above
schema, perform the following : 1. Retrieve
the birth date and address of the employee(s) whose name is 'John B.Smith'. 2. Retrieve
the name and address of all employees who work for the 'Research' department. 3. For
every project located in 'Stafford',list the project number,the controlling
department number,and the department manager's last name,address,and birth
date. 4. Find
the names of all employees who are directly supervised by 'Franklin Wong'.
2.
Write a procedure to find the sum of the
digits in the given number. |
|||||
Comments
Post a Comment