SlideShare a Scribd company logo
G.S.MANDAL’S
MIT POLYTECHNIC ROTEGAON (0777)
CLASS TEST II-A
COURCE NAME: CO 3I SEMESTER: THIRD SEM
SUBJECT: DMS SUBJECT CODE: 22319
TIME: 1 HOUR DATE: /09/2019 MAX MRKS: 20
Q.1 Attempt Any FOUR. 08 Marks
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.
Q.2 Attempt any THREE. 12 Marks
1. 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.
2. Consider the structure Employee (emp_no,emp_name, dept, salary, designation,
dept_location) Solve following queries :
(i) List all managers in Mumbai location.
(ii) Set salary of all ‘project leaders’ to ₹ 70,000.
(iii) List employees with having alphabet ‘A’ as second letter in their name.
(iv) Display details of those employees who work in Mumbai or Chennai.
3. Consider the structure for book table as Book-master = {bookid, bookname, subcode-
author, no_of copies, price} Write SQL
queries for following:
(i) Display total no. of books for subject „DBM‟
(ii) Get authorwise list of all books.
(iii) Display all books whose prices are between Rs.200 and Rs.500
(iv) Display all books with details whose name start with „S‟
4. Explain create and drops sequence with example.
5. Explain any four String functions with example.
6. Explain database security with its requirements in detail.
7. Explain Transaction ACID properties.
8. Explain difference between delete and truncate command with example.
G.S.MANDAL’S
MIT POLYTECHNIC ROTEGAON (0777)
CLASS TEST II -B
COURCE NAME: CO 3I SEMESTER: THIRD SEM
SUBJECT: DMS SUBJECT CODE: 22319
TIME: 1 HOUR DATE: /09/2019 MAX MRKS: 20
Q.1 Attempt Any FOUR. 08 Marks
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.
Q.2 Attempt any THREE. 12 Marks
1. 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.
2. 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.
3. 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.
4. Execute the following commands
i) create user ‘Rahul’
ii) grant create, select,insert,update, delete, drop privilege to ‘Rahul’
iii) Remove the select privilege from user ‘Rahul’
5. Explain states of transaction with the help of diagram.
6. List the SQL operations and explain range searching operations between and pattern matching
operator ‘like’ with example.
7. 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.
8. 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
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.
12. Define synonyms and Index
13. State PL/SQL output statement with syntax and example.
14. Explain and draw PL/SQL as block structure.
15. State syntax to create, open and close cursor in PL/SQL block.
16. Draw the state diagram of transaction.
17. Define Database Backup and Database recovery.
18. Describe Grant and Revoke commands.
19. List the types of cursor.
20. List out any four advantages of PL/SQL.
21. Define Normalization, list its types.
22. 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.
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.
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;

More Related Content

What's hot (20)

PPTX
C++ Constructor destructor
Da Mystic Sadi
 
PPTX
Next Generation of Javascript
Squash Apps Pvt Ltd
 
PPTX
constructor & destructor in cpp
gourav kottawar
 
PPSX
Constructor and destructor
Selvin Josy Bai Somu
 
PPTX
Constructor and Types of Constructors
Dhrumil Panchal
 
PDF
Introduction to C++
Pranali Chaudhari
 
PPT
Constructor & Destructor
KV(AFS) Utarlai, Barmer (Rajasthan)
 
PPT
Constructor and Destructor PPT
Shubham Mondal
 
PDF
04. constructor & destructor
Haresh Jaiswal
 
PPTX
Constructor and destructor
Shubham Vishwambhar
 
PDF
Constructors destructors
Pranali Chaudhari
 
PPTX
Types of Constructor in C++
Bhavik Vashi
 
PPTX
constructor with default arguments and dynamic initialization of objects
Kanhaiya Saxena
 
PPTX
Constructor & destructor
Saharsh Anand
 
PPTX
Constructor and Destructor in c++
aleenaguen
 
PPTX
constructors in java ppt
kunal kishore
 
PPT
FP 201 - Unit4 Part 2
rohassanie
 
PDF
Chapter27 polymorphism-virtual-function-abstract-class
Deepak Singh
 
PPTX
Constructors and destructors
Vineeta Garg
 
PPTX
Arrays, Structures And Enums
Bhushan Mulmule
 
C++ Constructor destructor
Da Mystic Sadi
 
Next Generation of Javascript
Squash Apps Pvt Ltd
 
constructor & destructor in cpp
gourav kottawar
 
Constructor and destructor
Selvin Josy Bai Somu
 
Constructor and Types of Constructors
Dhrumil Panchal
 
Introduction to C++
Pranali Chaudhari
 
Constructor & Destructor
KV(AFS) Utarlai, Barmer (Rajasthan)
 
Constructor and Destructor PPT
Shubham Mondal
 
04. constructor & destructor
Haresh Jaiswal
 
Constructor and destructor
Shubham Vishwambhar
 
Constructors destructors
Pranali Chaudhari
 
Types of Constructor in C++
Bhavik Vashi
 
constructor with default arguments and dynamic initialization of objects
Kanhaiya Saxena
 
Constructor & destructor
Saharsh Anand
 
Constructor and Destructor in c++
aleenaguen
 
constructors in java ppt
kunal kishore
 
FP 201 - Unit4 Part 2
rohassanie
 
Chapter27 polymorphism-virtual-function-abstract-class
Deepak Singh
 
Constructors and destructors
Vineeta Garg
 
Arrays, Structures And Enums
Bhushan Mulmule
 

Similar to Rdbms class test ii sep 2019 (20)

DOCX
DBMS Assignments Questions
Sara Sahu
 
DOCX
Assignments 150507052746-lva1-app6891
Mohit Saini
 
DOC
Plsql task
Nawaz Sk
 
PDF
Vtu cs 7th_sem_question_papers
megharajk
 
PDF
Pune University MCA [Management] 2020-Sample Questions
shailendrashinde9
 
PPTX
Complex inner joins
jfp05
 
PDF
Advanced plsql mock_assessment
Saurabh K. Gupta
 
PDF
5th Semester (June; July-2015) Computer Science and Information Science Engin...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
PDF
Cs practical file
Shailendra Garg
 
PDF
ADBMS ASSIGNMENT
Lori Moore
 
DOCX
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
gilbertkpeters11344
 
PPTX
SQL - Structured query language introduction
Smriti Jain
 
DOCX
information practices cbse based paper.docx
KapilSidhpuria3
 
PDF
5th Semester (June; July-2014) Computer Science and Information Science Engin...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
PDF
Object Oriented Programming using C++ PCIT102.pdf
GauravKumar295392
 
PPTX
Module 5-Structure and Union
nikshaikh786
 
PDF
Ex
agohar7
 
DOCX
Smu bsc it Spring 2014 solved assignments
smumbahelp
 
PDF
SQL – 2 (May - 2018) [IDOL: Old Course | Question Paper]
Mumbai B.Sc.IT Study
 
DBMS Assignments Questions
Sara Sahu
 
Assignments 150507052746-lva1-app6891
Mohit Saini
 
Plsql task
Nawaz Sk
 
Vtu cs 7th_sem_question_papers
megharajk
 
Pune University MCA [Management] 2020-Sample Questions
shailendrashinde9
 
Complex inner joins
jfp05
 
Advanced plsql mock_assessment
Saurabh K. Gupta
 
5th Semester (June; July-2015) Computer Science and Information Science Engin...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Cs practical file
Shailendra Garg
 
ADBMS ASSIGNMENT
Lori Moore
 
33.docxSTEP 1 Understand the UML Diagram Analyze and under.docx
gilbertkpeters11344
 
SQL - Structured query language introduction
Smriti Jain
 
information practices cbse based paper.docx
KapilSidhpuria3
 
5th Semester (June; July-2014) Computer Science and Information Science Engin...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Object Oriented Programming using C++ PCIT102.pdf
GauravKumar295392
 
Module 5-Structure and Union
nikshaikh786
 
Smu bsc it Spring 2014 solved assignments
smumbahelp
 
SQL – 2 (May - 2018) [IDOL: Old Course | Question Paper]
Mumbai B.Sc.IT Study
 
Ad

More from ARVIND SARDAR (20)

PPTX
Computer Foundation Foundation Course.pptx
ARVIND SARDAR
 
PPTX
MACHINE LEARNING Unit -2 Algorithm.pptx
ARVIND SARDAR
 
PPTX
INTRODUCTION TO NEURAL NETWORKS FINAL YEAR
ARVIND SARDAR
 
PPTX
PPT_Template[1] AI in Healthcare seminar.pptx
ARVIND SARDAR
 
PPTX
DENTAL PATHOLOGY TYPES Digram caries.pptx
ARVIND SARDAR
 
PPTX
ALGEBRAIC STRUCTURES ASS second yearDBATU.pptx
ARVIND SARDAR
 
PPTX
UNIT 5 election commission second year dbatu
ARVIND SARDAR
 
PPTX
UNIT 4 Local Administration Second year
ARVIND SARDAR
 
PPTX
UNIT 3 state goverment it administration second year
ARVIND SARDAR
 
PPTX
Unit 2 Union Government and its Administration.pptx
ARVIND SARDAR
 
PPTX
UNIT 1 CONSTITUTION OF INDIA Second Year
ARVIND SARDAR
 
PPT
Machine Learning Chapter one introduction
ARVIND SARDAR
 
PPTX
Lecture5.pptx
ARVIND SARDAR
 
PPT
Machine Learning Ch 1.ppt
ARVIND SARDAR
 
PPTX
Graph ASS DBATU.pptx
ARVIND SARDAR
 
PPT
graph ASS (1).ppt
ARVIND SARDAR
 
DOCX
Unit 1-android-and-its-tools-ass
ARVIND SARDAR
 
PPTX
Computer foundation course -Knowing Computers
ARVIND SARDAR
 
PPTX
Unit no 5 transation processing DMS 22319
ARVIND SARDAR
 
PDF
Teaching plan d1 dms 2019 20
ARVIND SARDAR
 
Computer Foundation Foundation Course.pptx
ARVIND SARDAR
 
MACHINE LEARNING Unit -2 Algorithm.pptx
ARVIND SARDAR
 
INTRODUCTION TO NEURAL NETWORKS FINAL YEAR
ARVIND SARDAR
 
PPT_Template[1] AI in Healthcare seminar.pptx
ARVIND SARDAR
 
DENTAL PATHOLOGY TYPES Digram caries.pptx
ARVIND SARDAR
 
ALGEBRAIC STRUCTURES ASS second yearDBATU.pptx
ARVIND SARDAR
 
UNIT 5 election commission second year dbatu
ARVIND SARDAR
 
UNIT 4 Local Administration Second year
ARVIND SARDAR
 
UNIT 3 state goverment it administration second year
ARVIND SARDAR
 
Unit 2 Union Government and its Administration.pptx
ARVIND SARDAR
 
UNIT 1 CONSTITUTION OF INDIA Second Year
ARVIND SARDAR
 
Machine Learning Chapter one introduction
ARVIND SARDAR
 
Lecture5.pptx
ARVIND SARDAR
 
Machine Learning Ch 1.ppt
ARVIND SARDAR
 
Graph ASS DBATU.pptx
ARVIND SARDAR
 
graph ASS (1).ppt
ARVIND SARDAR
 
Unit 1-android-and-its-tools-ass
ARVIND SARDAR
 
Computer foundation course -Knowing Computers
ARVIND SARDAR
 
Unit no 5 transation processing DMS 22319
ARVIND SARDAR
 
Teaching plan d1 dms 2019 20
ARVIND SARDAR
 
Ad

Recently uploaded (20)

PPTX
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
PDF
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
PPTX
cybersecurityandthe importance of the that
JayachanduHNJc
 
PDF
Construction of a Thermal Vacuum Chamber for Environment Test of Triple CubeS...
2208441
 
PDF
Machine Learning All topics Covers In This Single Slides
AmritTiwari19
 
PDF
4 Tier Teamcenter Installation part1.pdf
VnyKumar1
 
PPTX
Inventory management chapter in automation and robotics.
atisht0104
 
PPTX
Ground improvement techniques-DEWATERING
DivakarSai4
 
PPTX
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
PPTX
Introduction to Fluid and Thermal Engineering
Avesahemad Husainy
 
PDF
AI-Driven IoT-Enabled UAV Inspection Framework for Predictive Maintenance and...
ijcncjournal019
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PDF
SG1-ALM-MS-EL-30-0008 (00) MS - Isolators and disconnecting switches.pdf
djiceramil
 
PDF
Zero Carbon Building Performance standard
BassemOsman1
 
PDF
Air -Powered Car PPT by ER. SHRESTH SUDHIR KOKNE.pdf
SHRESTHKOKNE
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
PDF
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
PPTX
Water resources Engineering GIS KRT.pptx
Krunal Thanki
 
MULTI LEVEL DATA TRACKING USING COOJA.pptx
dollysharma12ab
 
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
cybersecurityandthe importance of the that
JayachanduHNJc
 
Construction of a Thermal Vacuum Chamber for Environment Test of Triple CubeS...
2208441
 
Machine Learning All topics Covers In This Single Slides
AmritTiwari19
 
4 Tier Teamcenter Installation part1.pdf
VnyKumar1
 
Inventory management chapter in automation and robotics.
atisht0104
 
Ground improvement techniques-DEWATERING
DivakarSai4
 
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
Introduction to Fluid and Thermal Engineering
Avesahemad Husainy
 
AI-Driven IoT-Enabled UAV Inspection Framework for Predictive Maintenance and...
ijcncjournal019
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
SG1-ALM-MS-EL-30-0008 (00) MS - Isolators and disconnecting switches.pdf
djiceramil
 
Zero Carbon Building Performance standard
BassemOsman1
 
Air -Powered Car PPT by ER. SHRESTH SUDHIR KOKNE.pdf
SHRESTHKOKNE
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
Water resources Engineering GIS KRT.pptx
Krunal Thanki
 

Rdbms class test ii sep 2019

  • 1. G.S.MANDAL’S MIT POLYTECHNIC ROTEGAON (0777) CLASS TEST II-A COURCE NAME: CO 3I SEMESTER: THIRD SEM SUBJECT: DMS SUBJECT CODE: 22319 TIME: 1 HOUR DATE: /09/2019 MAX MRKS: 20 Q.1 Attempt Any FOUR. 08 Marks 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. Q.2 Attempt any THREE. 12 Marks 1. 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. 2. Consider the structure Employee (emp_no,emp_name, dept, salary, designation, dept_location) Solve following queries : (i) List all managers in Mumbai location. (ii) Set salary of all ‘project leaders’ to ₹ 70,000. (iii) List employees with having alphabet ‘A’ as second letter in their name. (iv) Display details of those employees who work in Mumbai or Chennai. 3. Consider the structure for book table as Book-master = {bookid, bookname, subcode- author, no_of copies, price} Write SQL queries for following: (i) Display total no. of books for subject „DBM‟ (ii) Get authorwise list of all books. (iii) Display all books whose prices are between Rs.200 and Rs.500 (iv) Display all books with details whose name start with „S‟ 4. Explain create and drops sequence with example. 5. Explain any four String functions with example. 6. Explain database security with its requirements in detail. 7. Explain Transaction ACID properties. 8. Explain difference between delete and truncate command with example.
  • 2. G.S.MANDAL’S MIT POLYTECHNIC ROTEGAON (0777) CLASS TEST II -B COURCE NAME: CO 3I SEMESTER: THIRD SEM SUBJECT: DMS SUBJECT CODE: 22319 TIME: 1 HOUR DATE: /09/2019 MAX MRKS: 20 Q.1 Attempt Any FOUR. 08 Marks 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. Q.2 Attempt any THREE. 12 Marks 1. 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. 2. 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. 3. 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. 4. Execute the following commands i) create user ‘Rahul’ ii) grant create, select,insert,update, delete, drop privilege to ‘Rahul’ iii) Remove the select privilege from user ‘Rahul’ 5. Explain states of transaction with the help of diagram. 6. List the SQL operations and explain range searching operations between and pattern matching operator ‘like’ with example. 7. 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. 8. 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
  • 3. 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. 12. Define synonyms and Index 13. State PL/SQL output statement with syntax and example. 14. Explain and draw PL/SQL as block structure. 15. State syntax to create, open and close cursor in PL/SQL block. 16. Draw the state diagram of transaction. 17. Define Database Backup and Database recovery. 18. Describe Grant and Revoke commands. 19. List the types of cursor. 20. List out any four advantages of PL/SQL. 21. Define Normalization, list its types. 22. 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.
  • 4. 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.
  • 5. 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;