- A collection of interrelated records is called a a) Database
b) Spreadsheet
c) Management information system
d) Text file
e) None of these - In a database, related fields are grouped to a) File
b) Bank
c) Menu
d) Data record
e) None of these - Which of the following refers to the level of data abstraction that describes exactly how the data actually stored? a) Conceptual Level
b) Physical Level
c) File Level
d) Logical Level
e) None of these - Which one is the guideline of Referential integrity in a relationship?
a) Do not enter a value in the primary key field of child table if that value does not exist in the primary key of the parent table
b) Do not enter a value in the foreign key field of a parent table if that value does not exist in the primary key of the child table
c) Do not enter a value in the foreign key field of a child table if that value does not exist in the primary key of the parent table.
d) Do not enter a value in the foreign key field of child table if that value does not exist in the foreign key of the parent table
e) None of these
- In SQL the statement select*from R,S is equivalent to a) Select * from R natural join S
b) Select * from R cross join S
c) Select * from R union join S
d) Select * from R inner join S
e) None of these - In tuple relational calculus P1 → P2 is equivalent to a) ¬P1 ∧P2
b) ¬P1 ∨ P2
c) P1 ∧ P2
d) P1 ∧ ¬P2
e) None of these - Using Relational Algebra the query that finds customers, who have a balance of over 1000 is a) Π Customer_name(σ balance >1000(Deposit))
b) σ Customer_name(Π balance >1000(Deposit))
c) Π Customer_name(σ balance >1000(Borrow))
d) σ Customer_name(Π balance >1000(Borrow))
e) None of these - Consider the join of a relation R with relation S. If R has m tuples and S has n tuples, then the maximum size of join is:
a) Mn
b) m+n
c) (m+n)/2
d) 2(m+n)
e) None of these - Because of the calculus expression, the relational calculus is considered as a) procedural language
b) non procedural language
c) structural language
d) functional language
e) None of these - Consider two tuples X and Y, the operation whose result includes tuples that are only in X but not in Y is classified as a) square of relation X and Y
b) union of relation X and Y
c) intersection of relation X and Y
d) difference of relation X and Y
e) None of these - In relational operations, the SELECT operation is written as a) Σ < selection condition > ( S )
b) σ < selection condition > ( R )
c) ω < selection condition > ( R )
d) Ω < selection condition > ( R )
e) None of these - Find the ID, name, dept name, salary for instructors whose salary is greater than $80,000 . a) {t | t ε instructor ∧ t[salary] > 80000}
b) Э t ∈ r (Q(t))
c) {t | Э s ε instructor (t[ID] = s[ID]∧ s[salary] > 80000)}
d) {t | t ε instructor ∧ t[salary] <80000}
e) None of these Answer: (a). - Database table by name Loan_Records is given below.
Borrower Bank_Manager Loan_Amount
Ramesh Sunderajan 10000.00
Suresh Ramgopal 5000.00
Mahesh Sunderajan 7000.00
What is the output of the following SQL query?
SELECT Count(*)
FROM ( (SELECT Borrower, Bank_Manager
FROM Loan_Records) AS S
NATURAL JOIN (SELECT Bank_Manager,
Loan_Amount
FROM Loan_Records) AS T );
a) 3
b) 9
c) 5
d) 6
e) None of these
- A relational schema for a train reservation database is given below. Passenger (pid, pname, age) Reservation (pid, class, tid)
Table: Passenger
pid pname age
0 Sachin 65
1 Rahul 66
2 Sourav 67
3 Anil 69
Table : Reservation
pid class tid
0 AC 8200
1 AC 8201
2 SC 8201
5 AC 8203
1 SC 8204
3 AC 8202
What pids are returned by the following SQL query for the above instance of the tables?
SELECT pid
FROM Reservation ,
WHERE class ‘AC’ AND
EXISTS (SELECT *
FROM Passenger
WHERE age > 65 AND
Passenger. pid = Reservation.pid)
a)1, 0
b)1, 2
c)1, 3
d)1, 5
e)None of these
- The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list?
select title
from book as B
where (select count(*)
from book as T
where T.price > B.price) < 5 a)Titles of the four most expensive books
b)Title of the fifth most inexpensive book
c)Title of the fifth most expensive bookTitles of the five most expensive books
d)Titles of the five most expensive books
e)None of these - The relation scheme Student Performance (name, courseNo, rollNo, grade) has the following functional dependencies:
name, courseNo → grade
rollNo, courseNo → grade
name → rollNo
rollNo → name
The highest normal form of this relation scheme is a)2 NF
b)3 NF
c)BCNF
d)4NF
e)None of these - A table has fields Fl, F2, F3, F4, F5 with the following functional dependencies F1 → F3 F2→ F4
(F1 . F2) → F5 In terms of Normalization, this table is in a)1 NF
b) NF
c)3 NF
d)4 NF
e)None of these Answer: (a). - Which one of the following is NOT a part of the ACID properties of database transactions? a)Atomicity
b)Consistency
c)Isolation
d)Deadlock-freedom
e)None of the these - Which of the constraint can be enforced one per table? a)Primary key constraint
b)Not Null constraint
c)Foreign Key constraint
d)Check constraint
e)None of these - CREATE TABLE course
( . . .
FOREIGN KEY (dept name) REFERENCES department
. . . );
The following code is used. a)Delete
b)delete tuple
c)delete cascade
d)UPDATE
e)None of these
Answer keys-
- Answer: (a)
- Answer: (d)
- Answer: (b)
- Answer: (c)
- Answer: (b)
- Answer: (b)
- Answer: (a)
- Answer: (a)
- Answer: (b)
- Answer: (d)
- Answer: (b)
- Answer: (a)
- Answer: (c)
- Answer: (c)
- Answer: (d)
- Answer: (b)
- Answer: (a)
- Answer: (d)
- Answer: (a)
- Answer: (c)