This document provides instructions and questions for Assignment #02 on the topics of Module 3 & 4 - Dynamic SQL, triggers, assertions, views, aggregate functions, normalization, multivalued dependency, cursors, stored procedures, and SQL queries related to an example company database schema. Students are asked to answer the questions neatly, provide examples where relevant, and submit their completed assignment by the given due date.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
38 views2 pages
C Byregowda Institute of Technology
This document provides instructions and questions for Assignment #02 on the topics of Module 3 & 4 - Dynamic SQL, triggers, assertions, views, aggregate functions, normalization, multivalued dependency, cursors, stored procedures, and SQL queries related to an example company database schema. Students are asked to answer the questions neatly, provide examples where relevant, and submit their completed assignment by the given due date.
Sketch diagrams wherever relevant. Explain your notations explicitly and clearly. An incomplete assignment is not acceptable for submission. Once you submit your assignment, you will be expected to answer all the questions there INDEPENDENTLY. You may be asked to answer any question of the assignment in the class. ON the top of the first page, write your Due Date and Date of Submission.
1. What is Dynamic SQL and how it is different from SQL?
2. How trigger and assertion defined in SQL? Explain with examples. 3. What is a view? Explain how to create the view and how view can be dropped? 4. Write note on Aggregate function in SQL with example. 5. Explain the steps of JDBC connection. 6. Explain informal design guidelines for relation schemas 7. What is the need of normalization? Explain the first, second and third normal form with example. 8. Define multivalued dependency.Explain 4NF with an example 9. What properties can cursor have? 10.Why are stored procedures are important? How do we declare stored procedures and how they are called from application code? 11. Consider the following company database: EMP(Name, Ssn, Salary, Superssn, dno) DEPT(dnum, dname, mgrssn) DEPT_LOC(dnum, dlocation) PROJECT(Pname, Pnumber, Plocation, dnum) WORKS_ON(Essn, Pno, Hours) DEPENDENT(Essn, dept_ssn, gender) Write SQL queries for the following: 1) Retrieve the names of all employees who work in the department that has the employee with the highest salary among all employees. 2) Retrieve the names of employees who make atleast 10000 more than employee who is paid the least in the company. 3) A view that has the employee name, supervisor name and employee salary for each employee who works in the ‘Research’ department. 4) A view that has the project name, controlling department name, number of employees and total hours worked per week on the project for each project with more than one employee working on it. 12. What is CGI? Why was CGI introduced? What are the disadvantages of an architecture using CGI scripts? 13. What are servlets? How do servlets handle data from HTML forms? Explain what happens during the lifetime of a servlet? 14.Why do we need to maintain state at middle tier? What are cookies? How does a browser handle a cookie? How can we access cookies from servlet?