0% found this document useful (0 votes)
32 views

Dbms 2

This document contains instructions for homework assignment 2 for the CSE301 database course. It includes 6 questions split into two parts - Part A contains 3 questions about foreign keys, query languages, and indexing. Part B contains 3 questions comparing DDL, DML, and DCL commands, and providing examples of queries and modifications to an EMPLOYEE table.

Uploaded by

Munish Mangla
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Dbms 2

This document contains instructions for homework assignment 2 for the CSE301 database course. It includes 6 questions split into two parts - Part A contains 3 questions about foreign keys, query languages, and indexing. Part B contains 3 questions comparing DDL, DML, and DCL commands, and providing examples of queries and modifications to an EMPLOYEE table.

Uploaded by

Munish Mangla
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

CSE301

Homework: 2
PART-A
Question 1: Under what circumstances, we will use foreign key? Give an example.
Question 2: Differentiate between procedural and non-procedural query languages. Give the
syntax of relational algebra operations.
Question 3: Why do we use indexing? Give a suitable example in support of your answer.

PART-B

Question 4: Can we use a view for security purpose? Justify your answer and give an example to
create a view.
Question 5: Compare DDL, DML and DCL. Write the syntax of all commands of DDL, DML
and DCL.
Question 6: Consider the table EMPLOYEE with following fields:
Emp_id
Emp_name
Dept_no
Dept_name
Location
Salary
Perform the following computations on table data:
a) List all the employees whose location is ‘Pune’ and dept_name is ‘Computer’.
b) Count the total number of departments. Also count the total number of employees whose
dept_name is ‘computer’
c) Add a new department ‘R&D’ in the database.
d) List the names of employees whose salary is greater than 50000.
e) List the names of employees having maximum and minimum salary
f) Now change the department name from ‘computer’ to ‘software design’, wherever
applicable in the table.

You might also like