0% found this document useful (0 votes)
9 views4 pages

Question Bank IA2

The document outlines a series of questions and tasks related to database management, focusing on SQL queries, normalization forms, and constraints. It covers topics such as insertion, deletion, modification anomalies, functional dependencies, triggers, assertions, and nested queries. The questions are categorized by Bloom's taxonomy levels, indicating the complexity and depth of understanding required for each topic.

Uploaded by

sathishpoojar33
Copyright
© © All Rights Reserved
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)
9 views4 pages

Question Bank IA2

The document outlines a series of questions and tasks related to database management, focusing on SQL queries, normalization forms, and constraints. It covers topics such as insertion, deletion, modification anomalies, functional dependencies, triggers, assertions, and nested queries. The questions are categorized by Bloom's taxonomy levels, indicating the complexity and depth of understanding required for each topic.

Uploaded by

sathishpoojar33
Copyright
© © All Rights Reserved
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/ 4

MODULE 3

Bloom’s
Questions CO
Level
Explain insertion, deletion and modification anomalies. Why are they considered bad?
L2 CO3
Illustrate with example.
Explain 1NF,2NF,3NF with example. L2 CO3
Write SQL syntax for the following with example:
(i) SELECT
L2 CO3
(ii) ALTER
(iii) UPDATE
Explain the basic data types available for attributes in SQL. L2 CO3
Demonstrate the following constraints in SQL with suitable example:
L2 CO3
i) NOT NULL ii) Primary key iii) Foreign key iv) Default v) Check.
Discuss the informal design guidelines for relation schema design. L2 CO3
Write the syntax for INSERT, UPDATE and DELETE statements in SQL and explain
L2 CO3
with suitable examples.
Illustrate the substring pattern matching in SQL with example L2 CO3
Consider a relation R(A, B, C, D, E) with the following dependencies:
AB → C, CD → E, DE → B
L3 CO3
Is AB a candidate key of this relation? If not, find the candidate key of the relation?
Explain your answer.
Consider the following relation:
CAR_SALE(Car#, Date_sold, Salesperson#, Commission%, Discount_amt)
Assume that a car may be sold by multiple salespeople, and hence {Car#, Salesperson#}
is the primary key. Additional dependencies are
L3 CO3
Date_sold → Discount_amt and
Salesperson# → Commission%
Based on the given primary key, is this relation in 1NF, 2NF, or 3NF? Why or why not?
How would you successively normalize it to 3NF?
Consider the following relation for published books:
BOOK (Book_title, Author_name, Book_type, List_price, Author_affil, Publisher)
Author_affil refers to the affiliation of author. Suppose the following dependencies
exist:
Book_title → Publisher, Book_type L3 CO3
Book_type → List_price
Author_name → Author_affil
a. What normal form is the relation in? Explain your answer.
b. Apply normalization till BCNF
Consider the relation schema R(A,B,C,D,E,F) and the functional dependencies
A →B, C →DF, AC →E, D →F
L3 CO3
What is the primary key of this relation R? What is its highest normal form? Preserving
the dependency, decompose R into third normal form.
Consider the following relational schemes for a library database: Book (Title, Author, L3 CO3
Catalog_no, Publisher, Year, Price) Collection (Title, Author, Catalog_no) with in the
following functional dependencies:
Title, Author → Catalog_no
Catalog_no → Title, Author, Publisher, Year
Publisher Title Year → Price
Find the highest Normal form of relation Book and Collection.
The relation scheme Student Performance (name, courseNo, rollNo, grade) has the
following functional dependencies:
name, courseNo → grade
rollNo, courseNo → grade L3 CO3
Name → rollNo
rollNo → name
Find the highest Normal form of the relation.
Given the following relation instance.

x y z
1 4 2
1 5 3
1 6 3
3 2 2 L3 CO3
Explain which of the following functional dependencies are satisfied by the instance?
i) xy → z
ii) y→z
iii) yz → x
iv) zx → y
MODULE 4

Bloom’s
Questions CO
Level
What are triggers? Explain with syntax and suitable example. L2 CO4
What are Assertions? Assuming suitable company schema write an Assertion for the
condition.
L2 CO4
"The salary of an Employee must not be greater than the salary of the manager of the
department that the employee works for".
What do understand by correlated Nested Queries in SQL? Explain with suitable
L2 CO4
example.
What are the views in SQL ? Explain with examples. L2 CO4
In SQL, write the usage of GROUP BY and HAVING clauses with suitable example. L2 CO4
Consider the following COMPANY database
EMP(Name,SSN,Salary,SuperSSN,Dno)
DEPT(DNum,Dname,MgrSSN,Dno)
DEPT_LOC(Dnum,Dlocation)
DEPENDENT(ESSN,Dep_name,Sex)
WORKS_ON(ESSN,Pno,Hours)
PROJECT(Pname,Pnumber,Plocation,Dnum)
L3 CO4
Write the SQL queries for the following
i) Retrieve the name of the employee who works with same department as Ravi
ii)Retrieve the number of dependents for an employee “Ravi”
iii)Retrieve the name of the managers working in location “DELHI” who has no female
dependents
iv)List female employees from Dno=20 earning more than 50000
v)List “CSE” department details
Consider the following relation schema
Works(Pname,Cname,salary)
Lives(Pname,Street,City)
located_in (Cname, city)
Manager(Pname,Mgrname)
Write the SQL queries for the following
L3 CO4
i) Find the names of all persons who live in the city Bangalore.
ii) Retrieve the names of all person of "Infosys" whose salary is between Rs 50000
iii) Find the names of all persons who lives and work in the same city
iv) List the names of the people who work for “Tech M” along with the cities they live
in.
v)Find the average salary of “Infosys” persons
Referring to the below mentioned company schema. Write the SQL queries for the L3 CO4
following:
EMPLOYEE (Fname, Lname, Minit, SSN, Bdate,Address, Sex, Salary, SuperSSN,
Dno)
Department (Dname, Dnumber, Mgr_SSN, Mgr_Start_date)
Department_Location (Dnumber, Dlocation)
Project(Pname, Pnumber, Plocation, Dnum)
Work_on(Essn, DNo, HRS)
Dependant (Essn, Dependentname, Sex, Bdate)
i)For each department retrieve the department number, the number of employees in the
department and their average salary.
ii)For each project on which more than 2 employees work, retrieve the project number,
the project name and the number of employees who work on the project.
iii) For each project, retrieve the project number, the project name and the number of
employees from department no. S who work on that project.
iv) For each department that has more than 5 employees, retrieve the department
number and the number of its employees who are making more than $40,000 salary.
v) Retrieve the names of an employees who have two or more dependents.
Consider the following relations:
Student(Snum, Sname, Branch, level, age)
Class(Cname, meet_at, room, fid)
Enrolled(Snum, Cname)
Faculty(fid, fname, deptid)
Write the following queries in SQL. No duplicates should be printed in any of the
answers.
(i)Find the names of all Juniors (level = JR) who are enrolled in a class taught by I.
L3 CO4
Teach.
(ii) Find the names of all classes that either meet in room R128 or have five or more
students enrolled.
(iii) For all levels except JR, print the level and the average age of students for that
level.
(iv) For each faculty member that has taught classes only in room R128, print the
faculty member's name and the total number of classes she or he has taught.
(v) Find the names of students not enrolled in any class.
Consider the following relations:
Orchestras(id, name, rating, city_origin, country_origin, year)
Concerts (id, city, country, year, rating, orchestra_id)
Members (id, name, position, wage, experience, orchestra_id)
Write the following queries in SQL using the concept of subqueries.
(i)Select the names of all orchestras that have the same city of origin as any city in
which any orchestra performed in 2013. L3 CO4
(ii)Select the names of all orchestra members that have above 10 years of experience
and do not belong to orchestras with a rating below 8.0.
(iii) Show the name and position of orchestra members who earn more than the average
wage of all violinists.
(iv) Show the names of orchestras that were created after the 'Chamber Orchestra' and
have a rating greater than 7.5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy