Sie sind auf Seite 1von 42

ASSIGNMENT NAME OF THE DATE OF THE

NUMBER ASSIGNMENT ASSIGNMENT

01. RELATIONAL 01-04-2020


DBMS .

02. SQL 03-04-2020


MCQs

03. SQL 05-04-2020


QUERIES .

04 FUNCTIONAL DEPENDENCY 07-04-2020


MCQs AND
SHORT QUESTIONS .
05. FUNCTIONAL 09-04-2020
DEPENDENCY .

06. NORMALISATION . 11-04-2020

07. TRANSACTION 13-04-2020


PROCESSING
MCQs .
08. TRANSACTION 16-04-2020
PROCESSING .

09. TRANSACTION 18-04-2020


MCQs .

10. TRANSACTION 20-04-2020


STATES
MCQs .
11. TRANSACTION 22-04-2020
STATES .
RELATIONAL
DBMS
SQL
MCQs
SQL
QUERIES
01. DISPLAY THE NAMES OF ALL EMPLOYEES WHO
ARE WORKING IN DEPARTMENT NUMBER 100.
ANS :- SELECT ENAME FROM EMP WHERE DEPTNO=100;

02. DISPLAY THE NAMES OF EMPLOYEES IN ORDER


OF SALARY I.E. THE NAME OF THE EMPLOYEE
EARNING LOWEST SALARY SHOULD APPEAR FIRST.
ANS:- SELECT ENAME FROM EMP ORDER BY SAL;

03. DISPLAY THE VARIOUS JOBS AND TOTAL


NUMBER OF EMPLOYEES WITH EACH JOB GROUP.
ANS:- SELECT JOB, COUNT(*) FROM EMP GROUP BY JOB;

04. DISPLAY DEPARTMENT NUMBERS AND


MAXIMUM SALARY FOR EACH DEPARTMENT.
ANS:- SELECT DEPTNO, MAX(SAL) FROM EMP GROUP BY
DEPTNO;

05. DISPLAY THE NAMES OF EMPLOYEES IN


DESCENDING ORDER OF SALARY.
ANS:- SELECT ENAME FROM EMP ORDER BY SAL DESC;
06. DISPLAY THE NAMES OF ALL EMPLOYEES
WORKING AS CLERKS AND DRAWING A SALARY
MORE THAN 9000.
ANS:- SELECT ENAME FROM EMP WHERE JOB=’CLERK’ AND
SAL>9000;

07. DISPLAY THE NAMES OF EMPLOYEES WHOSE


NAME STARTS WITH ALPHABET L.
ANS:- SELECT ENAME FROM EMP WHERE ENAME LIKE ‘L%’;

08. DISPLAY EMPLOYEE NAMES FOR EMPLOYEES


WHOSE NAME ENDS WITH ALPHABET WITH L.
ANS:- SELECT ENAME FROM EMP WHERE ENAME LIKE ‘%L’;

09. DISPLAY THE NAMES OF EMPLOYEES WHOSE


NAMES HAVE SECOND ALPHABET A IN THEIR
NAMES.
ANS:- SELECT ENAME FROM EMP WHERE ENAME LIKE ‘_A%’;

10. DISPLAY THE AVERAGE SALARY FROM EMP


TABLE.
ANS:- SELECT AVG(SAL) FROM EMP;
FUNCTIONAL DEPENDENCY
MCQs AND SHORT
QUESTIONS
Q1. If we have relation R(X,Y,Z)

X Y Z

1 4 2
1 5 3
1 6 2
3 2 2

What could be the set of function dependency


on this relation :
a). X -> Y
b). Y -> Z
c). X -> Z
Ans:- b). Y -> Z

Q2. Consider a relation R(A,B,C)

A B C
1 1 1
1 1 0
2 3 2
2 3 2
What could be the set of function dependency
on this relation:
a) A -> B
b) B !-> C
c) A !-> B
d) B -> C
Ans:- a) A -> B and b) B !-> C

Q3. Find which dependency is trivial and non-


trivial ?

➢ abc -> c
Ans : Trivial Functional Dependency .

➢ wx -> y
Ans : Non-Trivial Functional Dependency .

➢ ab -> c
Ans : Non-Trivial Functional Dependency .

➢ x -> y
Ans : Non-Trivial Functional Dependency .

➢ xyz -> y
Ans : Trivial Functional Dependency .

➢ abc -> d
Ans : Non-Trivial Functional Dependency .
Q1. Which normal form is the partial dependency
removed?
Ans. 2nd Normal Form (2NF) .

Q2. Match the following


A) Composite attribute ------- i) Attribute whose value is
calculated from other attributes
B) Multivalued Attribute ------- ii) Attribute that can be
further subdivided to yield additional attributes
C) Derived Attribute -------- iii) Attribute that can have more
values
Ans: A) – (ii)
B) – (iii)
C) – (i)

Q3. In the __________ normal form, a composite


attribute is converted to individual attributes.
Ans: 1st Normal Form (1NF) .

Q4. If every non key attribute is functionally


dependent on the primary key, then the relation
will ne in __________________ normal form.
Ans: 2nd Normal Form (2NF) .

Q5. 3NF is based on the concept of ___________


Dependency.
Ans: Transitive dependency .

Q6. Every boyee Codd normal form is in


____________________ .
Ans: 3rd Normal Form and for every functional
dependency X->Y , X should be the super key of the
table .

Q7. The different classes of relations created by


the technique for preventing modification
anomalies are called ________________ .
Ans: Normal Forms .

Q8. In the relational model, relationships between


relations or tables are created by
using_____________ .
Ans: Foreign Keys .

Q9. A functional dependency between two or more


non-key attributes is called
A. Transitive dependency
B. Partial transitive dependency
C. Functional dependency
D. Partial functional dependency
Ans: Transitive dependency .

Q10. If every non-key attribute is functionally


dependent on the primary key, the relation will be
in
A. First Normal Form
B. Second Normal Form
C. Third Normal Form
D. Fourth Formal Form
Ans: Second Normal Form (2NF) .
FUNCTIONAL
DEPENDENCY
NORMALISATION
TRANSACTION PROCESSING
MCQs
TRANSACTION
PROCESSING
TRANSACTION
MCQs
01. Collections of operations that form a single logical unit
of work are called __________ .
a) Views
b) Networks
c) Units
d) Transactions

02. The “all-or-none” property is commonly referred to as


_______ .
a) Isolation
b) Durability
c) Atomicity
d) None of the mentioned

03. State true or false: Information residing in the volatile


storage does not usually survive system crashes .
a) True
b) False

04. A transaction that has not been completed successfully


is called as _______ .
a) Compensating transaction
b) Aborted transaction
c) Active transaction
d) Partially committed transaction

05. Which of the following is not a transaction state?


a) Active
b) Partially committed
c) Failed
d) Compensated
06. The scheme that controls the interaction between
executing transactions is called as _____ .
a) Concurrency control scheme
b) Multiprogramming scheme
c) Serialization scheme
d) Schedule scheme

07. Execution of translation in isolation preserves the


_________ of a database .
a) Atomicity
b) Consistency
c) Durability
d) All of the mentioned

08. Which of the following is a property of transactions?


a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned

09. __________ rollback requires the system to maintain


additional information about the state of all the running
transactions .
a) Total
b) Partial
c) Time
d) Commit

10. A transaction for which all committed changes are


permanent is called :
a) Atomic
b) Consistent
c) Isolated
d) Durable
TRANSACTION STATES
MCQs
TRANSACTION
STATES

Das könnte Ihnen auch gefallen