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

Code It Questions

This document contains 10 multiple choice questions about relational databases and SQL. The questions cover topics like entity-relationship diagrams, weak entities, aggregate functions, joins, integrity constraints, relational algebra operations, and column properties. The correct answers are also provided.

Uploaded by

Nimisha Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
335 views

Code It Questions

This document contains 10 multiple choice questions about relational databases and SQL. The questions cover topics like entity-relationship diagrams, weak entities, aggregate functions, joins, integrity constraints, relational algebra operations, and column properties. The correct answers are also provided.

Uploaded by

Nimisha Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Which of the following indicates the maximum number of entities that can be involved in a
relationship?

A. Minimum Cardinality
B. Maximum Cardinality
C. ERD
D. Greater Entity Count (GEC)

2. The primary key of the representation of a weak entity set consists of the primary key of the
strong entity set and the _______

A. Discriminator of the weak entity set


B. Foreign key
C. Primary key of all the other entity sets
D. All the attributes of the weak entity set

3. Which of the following is not a built in aggregate function in SQL?


A. avg
B. max
C. total
D. count

4. Choose the correct option regarding the query


SELECT branch_name, COUNT (DISTINCT customer_name)
FROM depositor, account
WHERE depositor.account_number = account.account_number
GROUP BY branch_id
HAVING avg(balance) = 10000;

A. The having clause checks whether the query result is true or not
B. The having clause does not check for any condition
C. The having clause allows only those tuples that have average balance 10000
D. None of the mentioned

5. The join operations that do not retain mismatched tuples are called as _________
operations

A. outer join
B. natural join
C. full outer join
D. inner join

6. Referential integrity constraints are also called as _________

A. Functional dependencies
B. Subset dependencies
C. Superset dependencies
D. Primary dependencies

7. Table is synonymous with the term:

A. Record
B. Relation
C. Column
D. Field

8. Choose the option that correctly explains in words, the function of the following relational
algebra expression
σyear≥2009 (book ⋈ borrow)

A. Selects all tuples from the Cartesian product of book and borrow
B. Selects all the tuples from the natural join of book and borrow wherever the year is lesser
than 2009
C. Selects all the tuples from the natural join of book and student wherever the year is
greater than or equal to 2009
D. Selects all tuples from the Cartesian product of book and borrow wherever the year is
greater than or equal to 2009

9. Which of the following column properties specifies whether or not cells in a column must
contain a data value?

A. Null Status
B. Data type
C. Default Value
D. Data Constraints

10. The project operation’s function in relational algebra is identical to the _______ clause in
SQL
A. where
B. from
C. select
D. none of the mentioned

Answers

1. B
2. A
3. C
4. C
5. D
6. B
7. B
8. B
9. A
10. C

You might also like