Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
DMS Question bank class test ii sep 2019
1. Question Bank
1. Define Primary key and Foreign Key.
2. What is SQL? State its features.
3. List data model
4. List and draw any four symbols used in ER Model.
5. What is NULL value?
6. Define Commit and Rollback
7. What is view?
8. State any four DDL commands
9. State DML commands.
10. State DCL and Data transaction language commands
11. State Select clauses.
1. Define synonyms and Index
2. State PL/SQL output statement with syntax and example.
3. Explain and draw PL/SQL as block structure.
4. State syntax to create, open and close cursor in PL/SQL block.
5. Draw the state diagram of transaction.
6. Define Database Backup and Database recovery.
7. Describe Grant and Revoke commands.
8. List the types of cursor.
9. List out any four advantages of PL/SQL.
10. Define Normalization, list its types.
11. Enlist four aggregate functions.
23. Consider the following database
Employee(emp_id,emp_name,emp_city,emp_addr,emp_dept,join_date)
i) Display the emp_id of employee who live in city ‘Pune’ or ‘Nagpur’.
ii) Change the employee name ‘Ayush’ to ‘Ayan’.
iii) Display the total number of employee whose dept is 50.
24. Create a sequence
i. Sequence name is Seq_1, Start with 1, increment by 1, minimum value 1, maximum value 20.
ii. Use a seq_1 to insert the values into table Student( ID Number(10), Name char(20));
iii. Change the Seq_1 max value 20 to 50.
iv. Drop the sequence.
25. Write a PL/SQL program which accepts the customer_ID from the user. If the enters an invalid ID then
the exception invalid_id is raised using exception handling.
2. 26. Execute the following commands
i) create user ‘Rahul’
i) grant create, select,insert,update, delete, drop privilege to ‘Rahul’
ii) Remove the select privilege from user ‘Rahul’
27. Explain states of transaction with the help of diagram.
28. List the SQL operations and explain range searching operations between and pattern matching operator
‘like’ with example.
29. Consider the following database
Employee (emp_id,emp_name,emp_city,emp_addr,emp_dept,join_date)
i) Display the emp_id of employee who live in city ‘Pune’ or ‘Nagpur’.
ii) Change the employee name ‘Ayush’ to ‘Ayan’.
iii) Display the total number of employee whose dept is 50.
30. Consider the following schema Depositor (ACC_no, Name, PAN, Balance). Create a view on Depositor
having attributes (ACC_No,PAN) where balance is greater than 100000.
31. Consider the structure Employee (empname, empid, dob, salary, job)
Create a view on employee having attribute (empname, empid, dob, salary, job) where salary is greater than
20,000.
32. Consider the structure
Employee (emp_no,emp_name, dept, salary, designation, dept_location)
Solve following queries :
a. List all managers in Mumbai location.
b. Set salary of all ‘project leaders’ to ₹ 70,000.
c. List employees with having alphabet ‘A’ as second letter in their name.
d. Display details of those employees who work in Mumbai or Chennai.
33. Consider the structure for book table as
Book-master = {bookid, bookname, subcode-author, no_of copies, price} Write SQL
queries for following:
a. Display total no. of books for subject „DBM‟
b. Get authorwise list of all books.
c. Display all books whose prices are between Rs.200 and Rs.500
d. Display all books with details whose name start with „S‟
34. Explain create and drops sequence with example.
35. Explain any four String functions with example.
36. Explain database security with its requirements in detail.
37. Explain Transaction ACID properties.
38. Explain difference between delete and truncate command with example.
3. Example 1 :- Write a PL/SQL program which accepts the customer_ID from the user. If the enters an
invalid ID then the exception invalid_id is raised using exception handling.
Ans
DECLARE
c_id numeric(10);
Invalid_id_Exception Exception;
BEGIN
c_id:= &c_id;
if (c_id<0) then
raise invalid_id_Exception;
end if;
EXCEPTION
WHEN invalid_id_Exception THEN
dbms_output.put_line('Invalid customer id');
END;