0% found this document useful (0 votes)
81 views41 pages

Dbms Mcqs

The document consists of a series of multiple-choice questions related to Database Management Systems, covering topics such as SQL commands, data types, integrity constraints, and join operations. Each question provides four options, testing the reader's knowledge of database concepts and SQL syntax. The document serves as a study guide for individuals preparing for exams or certifications in database management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views41 pages

Dbms Mcqs

The document consists of a series of multiple-choice questions related to Database Management Systems, covering topics such as SQL commands, data types, integrity constraints, and join operations. Each question provides four options, testing the reader's knowledge of database concepts and SQL syntax. The document serves as a study guide for individuals preparing for exams or certifications in database management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 41

1.

Which one of the following is used to define the structure of the relation, deleting relations and
relating schemas?

a) DML(Data Manipulation Langauge)

b) DDL(Data Definition Langauge)

c) Query

d) Relational Schema

2. Which one of the following provides the ability to query information from the database and to insert
tuples into, delete tuples from, and modify tuples in the database?

a) DML(Data Manipulation Langauge)

b) DDL(Data Definition Langauge)

c) Query

d) Relational Schema

3.CREATE TABLE employee (name VARCHAR, id INTEGER)

What type of statement is this?

a) DML

b) DDL

c) View

d) Integrity constraint

4.SELECT * FROM employee

What type of statement is this?

a) DML

b) DDL
c) View

d) Integrity constraint

5. The basic data type char(n) is a _____ length character string and varchar(n) is _____ length character.

a) Fixed, equal

b) Equal, variable

c) Fixed, variable

d) Variable, equal

6. An attribute A of datatype varchar(20) has the value “Avi”. The attribute B of datatype char(20) has
value ”Reed”. Here attribute A has ____ spaces and attribute B has ____ spaces.

a) 3, 20

b) 20, 4

c) 20, 20

d) 3, 4

7. To remove a relation from an SQL database, we use the ______ command.

a) Delete

b) Purge

c) Remove

d) Drop table

8.DELETE FROM r; //r - relation

This command performs which of the following action?

a) Remove relation

b) Clear relation entries


c) Delete fields

d) Delete rows

9.Name

Annie

Bob

Callie

Derek

Which of these query will display the the table given above ?

a) Select employee from name

b) Select name

c) Select name from employee

d) Select employee

10. Here which of the following displays the unique values of the column?

SELECT ________ dept_name

FROM instructor;

a) All

b) From

c) Distinct

d) Name

11. The ______ clause allows us to select only those rows in the result relation of the ____ clause that
satisfy a specified predicate.
a) Where, from

b) From, select

c) Select, from

d) From, where

12. The query given below will not give an error. Which one of the following has to be replaced to get
the desired output?

SELECT ID, name, dept name, salary * 1.1

WHERE instructor;

a) Salary*1.1

b) ID

c) Where

d) Instructor

13. The ________ clause is used to list the attributes desired in the result of a query.

a) Where

b) Select

c) From

d) Distinct

14. This Query can be replaced by which one of the following?

SELECT name, course_id

FROM instructor, teaches

WHERE instructor_ID= teaches_ID;


a) Select name,course_id from teaches,instructor where instructor_id=course_id;

b) Select name, course_id from instructor natural join teaches;

c) Select name, course_id from instructor;

d) Select course_id from instructor join teaches;

15.SELECT * FROM employee WHERE salary>10000 AND dept_id=101;

Which of the following fields are displayed as output?

a) Salary, dept_id

b) Employee

c) Salary

d) All the field of employee relation

16.Employee_idName Salary

1001 Annie 6000

1009 Ross 4500

1018 Zeith 7000

This is Employee table.

Which of the following employee_id will be displayed for the given query?

17.SELECT * FROM employee WHERE employee_id>1009;

a) 1009, 1001, 1018

b) 1009, 1018

c) 1001

d) 1018
18. Which of the following statements contains an error?

a) Select * from emp where empid = 10003;

b) Select empid from emp where empid = 10006;

c) Select empid from emp;

d) Select empid where empid = 1009 and lastname = ‘GELLER’;

19. In the given query which of the keyword has to be inserted?

INSERT INTO employee _____ (1002,Joey,2000);

a) Table

b) Values

c) Relation

d) Field

20.INSERT INTO instructor VALUES (10211, ’Smith’, ’Biology’, 66000);

What type of statement is this?

a) Query

b) DML

c) Relational

d) DDL

21. Updates that violate __________ are disallowed.

a) Integrity constraints

b) Transaction control
c) Authorization

d) DDL constraints

22. Aggregate functions are functions that take a ___________ as input and return a single value.

a) Collection of values

b) Single value

c) Aggregate value

d) Both Collection of values & Single value

23.SELECT __________

FROM instructor

WHERE dept name= ’Comp. Sci.’;

Which of the following should be used to find the mean of the salary ?

a) Mean(salary)

b) Avg(salary)

c) Sum(salary)

d) Count(salary)

24.SELECT COUNT (____ ID)

FROM teaches

WHERE semester = ’Spring’ AND YEAR = 2010;

If we do want to eliminate duplicates, we use the keyword ______in the aggregate expression.

a) Distinct

b) Count
c) Avg

d) Primary key

25. All aggregate functions except _____ ignore null values in their input collection.

a) Count(attribute)

b) Count(*)

c) Avg

d) Sum

26. A Boolean data type that can take values true, false, and________

a) 1

b) 0

c) Null

d) Unknown

27. The ____ connective tests for set membership, where the set is a collection of values produced by a
select clause. The ____ connective tests for the absence of set membership.

a) Or, in

b) Not in, in

c) In, not in

d) In, or

28. Which of the following should be used to find all the courses taught in the Fall 2009 semester but
not in the Spring 2010 semester .

a)
SELECT DISTINCT course id

FROM SECTION

WHERE semester = ’Fall’ AND YEAR= 2009 AND

course id NOT IN (SELECT course id

FROM SECTION

WHERE semester = ’Spring’ AND YEAR= 2010);

b)

SELECT DISTINCT course_id

FROM instructor

WHERE name NOT IN (’Fall’, ’Spring’);

c)

(SELECT course id

FROM SECTION

WHERE semester = ’Spring’ AND YEAR= 2010)

d)

SELECT COUNT (DISTINCT ID)

FROM takes

WHERE (course id, sec id, semester, YEAR) IN (SELECT course id, sec id, semester, YEAR

FROM teaches

WHERE teaches.ID= 10101);

29. The phrase “greater than at least one” is represented in SQL by _____
a) < all

b) < some

c) > all

d) > some

30. Which of the following is used to find all courses taught in both the Fall 2009 semester and in the
Spring 2010 semester .

a)

SELECT course id

FROM SECTION AS S

WHERE semester = ’Fall’ AND YEAR= 2009 AND

EXISTS (SELECT *

FROM SECTION AS T

WHERE semester = ’Spring’ AND YEAR= 2010 AND

S.course id= T.course id);

b)

SELECT name

FROM instructor

WHERE salary > SOME (SELECT salary

FROM instructor

WHERE dept name = ’Biology’);

c)

SELECT COUNT (DISTINCT ID)


FROM takes

WHERE (course id, sec id, semester, YEAR) IN (SELECT course id, sec id, semester, YEAR

FROM teaches

WHERE teaches.ID= 10101);

d)

(SELECT course id

FROM SECTION

WHERE semester = ’Spring’ AND YEAR= 2010)

31. We can test for the nonexistence of tuples in a subquery by using the _____ construct.

a) Not exist

b) Not exists

c) Exists

d) Exist

32. The____condition allows a general predicate over the relations being joined.

a) On

b) Using

c) Set
d) Where

33. Which of the join operations do not preserve non matched tuples?

a) Left outer join

b) Right outer join

c) Inner join

d) Natural join

34.SELECT *

FROM student JOIN takes USING (ID);

The above query is equivalent to

a)

advertisement

SELECT *

FROM student INNER JOIN takes USING (ID);

b)

SELECT *

FROM student OUTER JOIN takes USING (ID);

c)

SELECT *

FROM student LEFT OUTER JOIN takes USING (ID);


d) None of the mentioned

35. What type of join is needed when you wish to include rows that do not have matching values?

a) Equi-join

b) Natural join

c) Outer join

d) All of the mentioned

36. How many tables may be included with a join?

a) One

b) Two

c) Three

d) All of the mentioned

37. Which are the join types in join condition:

a) Cross join

b) Natural join

c) Join with USING clause

d) All of the mentioned

38. How many join types in join condition:

a) 2

b) 3

c) 4

d) 5
39. Which join refers to join records from the right table that have no matching key in the left table are
include in the result set:

a) Left outer join

b) Right outer join

c) Full outer join

d) Half outer join

40. The operation which is not considered a basic operation of relational algebra is

a) Join

b) Selection

c) Union

d) Cross product

41. 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

Sanfoundry Global Education & Learning Series – Database Management System.


To practice all areas of Database Management System, here is complete set on 1000+ Multiple Choice
Questions and Answers on Database Management System.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social
networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | LinkedIn | Instagram | Facebook | Twitter | Pinterest

« Prev - Database Questions and Answers – Modification of Database

» Next - Database Questions and Answers – Views

Join Sanfoundry@YouTube

Recommended Posts:

Engineering Geology Questions and Answers

Applied Chemistry Questions and Answers

Design of Steel Structures Questions and Answers

Data Science Questions and Answers

Java Programming Examples on Data-Structures

HTML Questions and Answers

JUnit Questions and Answers

C++ Programming Examples on Data-Structures

MongoDB Questions and Answers

Java Programming Examples on Utility Classes

Data Structure Questions and Answers

SQL Server Questions and Answers

C Programming Examples on Data-Structures

CSS Questions and Answers

C Programming Examples on Matrix

RDBMS Questions and Answers


C# Programming Examples on LINQ

Database Management System Questions and Answers

MySQL Database Questions and Answers

Oracle Database Questions and Answers

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at
Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency
developments in these areas. He lives in Bangalore and delivers focused training sessions to IT
professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage,
Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI &
Fiber Channel. Stay connected with him @ LinkedIn | Youtube | Instagram | Facebook | Twitter

Subscribe Sanfoundry Newsletter and Posts

Name*

Email*

Subscribe

1000 Database Management System MCQs

Database Management System Interview Questions and Answers

Relational Model

Relational Database

Keys

Relational Query Operations

SQL : Queries, Constraints & Triggers

SQL Basics

SQL Queries

Basic SQL Operations

Set Operations

Null Values Operations


Nested Subqueries - 1

Nested Subqueries - 2

Database Modification

Join Expressions

Views

Transactions

Integrity Constraints

SQL Data Types & Schema

Authorizations

Programming Language

Functions & Procedures

Triggers

Recursive Queries

OLAP

Relational Algebra

Database Systems Design & Implementation

Normalization

Database Programming Techniques

Storage & File Structures

Indexing & Hashing

Query Processing Techniques

Transactions

Concurrency Control

Recovery System

Best Reference Books


Exercises & Tests

Database Management System Tests

Certification Test

Internship Test

Job Test

Qualifier Test

Top Rankers

Practice Test - Chapter 1

Practice Test - Chapter 2

Practice Test - Chapter 3

Practice Test - Chapter 4

Practice Test - Chapter 5

Practice Test - Chapter 6

Practice Test - Chapter 7

Practice Test - Chapter 8

Practice Test - Chapter 9

Practice Test - Chapter 10

Mock Test - Chapter 1

Mock Test - Chapter 2

Mock Test - Chapter 3

Mock Test - Chapter 4

Mock Test - Chapter 5

Mock Test - Chapter 6

Mock Test - Chapter 7


Mock Test - Chapter 8

Mock Test - Chapter 9

Mock Test - Chapter 10

Work-From-Home Internships

Data-Entry Internship

1-Day Campus Ambassador

Content Developer - Technical

Content Writer - General

Programming Internship

Digital Marketing Internship

Evergreen Careers

Developer Tracks

Linux Kernel Developer

Linux Driver Developer

Linux Network Developer

SAN Developer

42. To include integrity constraint in an existing relation use :

a) Create table

b) Modify table

c) Alter table

d) Drop table
43. Which of the following is not an integrity constraint?

a) Not null

b) Positive

c) Unique

d) Check ‘predicate’

44.CREATE TABLE Employee(Emp_id NUMERIC NOT NULL, Name VARCHAR(20) , dept_name


VARCHAR(20), Salary NUMERIC UNIQUE(Emp_id,Name));

INSERT INTO Employee VALUES(1002, Ross, CSE, 10000)

INSERT INTO Employee VALUES(1006,Ted,Finance, );

INSERT INTO Employee VALUES(1002,Rita,Sales,20000);

What will be the result of the query?

a) All statements executed

b) Error in create statement

c) Error in insert into Employee values(1006,Ted,Finance, );

d) Error in insert into Employee values(1008,Ross,Sales,20000);

45.CREATE TABLE Manager(ID NUMERIC,Name VARCHAR(20),budget NUMERIC,Details VARCHAR(30));

Inorder to ensure that the value of budget is non-negative which of the following should be used?

a) Check(budget>0)

b) Check(budget<0)

c) Alter(budget>0)

d) Alter(budget<0)
46. Foreign key is the one in which the ________ of one relation is referenced in another relation.

a) Foreign key

b) Primary key

c) References

d) Check constraint

47.CREATE TABLE course

(...

FOREIGN KEY (dept name) REFERENCES department

. . . );

Which of the following is used to delete the entries in the referenced table when the tuple is deleted in
course table?

a) Delete

b) Delete cascade

c) Set null

d) All of the mentioned

48. Domain constraints, functional dependency and referential integrity are special forms of _________

a) Foreign key

b) Primary key

c) Assertion

d) Referential constraint

49. Which of the following is the right syntax for the assertion?

a) Create assertion ‘assertion-name’ check ‘predicate’;

b) Create assertion check ‘predicate’ ‘assertion-name’;


c) Create assertions ‘predicates’;

d) All of the mentioned

50. Data integrity constraints are used to:

a) Control who is allowed access to the data

b) Ensure that duplicate records are not entered into the table

c) Improve the quality of data entered for a specific property (i.e., table column)

d) Prevent users from changing the values stored in the table

51. Which of the following can be addressed by enforcing a referential integrity constraint?

a) All phone numbers must include the area code

b) Certain fields are required (such as the email address, or phone number) before the record is
accepted

c) Information on the customer must be known before anything can be sold to that customer

d) When entering an order quantity, the user must input a number and not some text (i.e., 12 rather
than ‘a dozen’)

52. Dates must be specified in the format

a) mm/dd/yy

b) yyyy/mm/dd

c) dd/mm/yy

d) yy/dd/mm

53. A ________ on an attribute of a relation is a data structure that allows the database system to find
those tuples in the relation that have a specified value for that attribute efficiently, without scanning
through all the tuples of the relation.

a) Index
b) Reference

c) Assertion

d) Timestamp

54.Create index studentID_index on student(ID);

Here which one denotes the relation for which index is created?

a) StudentID_index

b) ID

c) StudentID

d) Student

55. Which of the following is used to store movie and image files?

a) Clob

b) Blob

c) Binary

d) Image

56. The user defined data type can be created using

a) Create datatype

b) Create data

c) Create definetype

d) Create type

57. Values of one type can be converted to another domain using which of the following?
a) Cast

b) Drop type

c) Alter type

d) Convert

58.CREATE DOMAIN YearlySalary NUMERIC(8,2)

CONSTRAINT salary VALUE test __________;

In order to ensure that an instructor’s salary domain allows only values greater than a specified value
use:

a) Value>=30000.00

b) Not null;

c) Check(value >= 29000.00);

d) Check(value)

59. Which of the following closely resembles Create view?

a) Create table . . .like

b) Create table . . . as

c) With data

d) Create view as

60. In contemporary databases, the top level of the hierarchy consists of ______ each of which can
contain _____

a) Catalogs, schemas

b) Schemas, catalogs

c) Environment, schemas

d) Schemas, Environment
61. Which of the following statements creates a new table temp instructor that has the same schema as
an instructor.

a) create table temp_instructor;

b) Create table temp_instructor like instructor;

c) Create Table as temp_instructor;

d) Create table like temp_instructor;

62. An ________ is a set of entities of the same type that share the same properties, or attributes.

a) Entity set

b) Attribute set

c) Relation set

d) Entity model

63. Entity is a _________

a) Object of relation

b) Present working model

c) Thing in real world

d) Model of relation

64. The descriptive property possessed by each entity set is _________

a) Entity

b) Attribute

c) Relation

d) Model
65. The function that an entity plays in a relationship is called that entity’s _____________

a) Participation

b) Position

c) Role

d) Instance

66. The attribute name could be structured as an attribute consisting of first name, middle initial, and
last name. This type of attribute is called

a) Simple attribute

b) Composite attribute

c) Multivalued attribute

d) Derived attribute

67. The attribute AGE is calculated from DATE_OF_BIRTH. The attribute AGE is

a) Single valued

b) Multi valued

c) Composite

d) Derived

68. Not applicable condition can be represented in relation entry as

a) NA

b) 0

c) NULL

d) Blank Space
69. Which of the following can be a multivalued attribute?

a) Phone_number

b) Name

c) Date_of_birth

d) All of the mentioned

70. Which of the following is a single valued attribute

a) Register_number

b) Address

c) SUBJECT_TAKEN

d) Reference

71. In a relation between the entities the type and condition of the relation should be specified. That is
called as______attribute.

a) Desciptive

b) Derived

c) Recursive

d) Relative

72. Which of the following gives a logical structure of the database graphically?

a) Entity-relationship diagram

b) Entity diagram

c) Database diagram

d) Architectural representation

View Answer

73. The entity relationship set is represented in E-R diagram as


a) Double diamonds

b) Undivided rectangles

c) Dashed lines

d) Diamond

74. The Rectangles divided into two parts represents

a) Entity set

b) Relationship set

c) Attributes of a relationship set

d) Primary key

75. Consider a directed line(->) from the relationship set advisor to both entity sets instructor and
student. This indicates _________ cardinality

a) One to many

b) One to one

c) Many to many

d) Many to one

76. We indicate roles in E-R diagrams by labeling the lines that connect ___________ to __________

a) Diamond , diamond

b) Rectangle, diamond

c) Rectangle, rectangle

d) Diamond, rectangle

77. An entity set that does not have sufficient attributes to form a primary key is termed a __________
a) Strong entity set

b) Variant set

c) Weak entity set

d) Variable set

78. For a weak entity set to be meaningful, it must be associated with another entity set, called the

a) Identifying set

b) Owner set

c) Neighbour set

d) Strong entity set

79. Weak entity set is represented as

a) Underline

b) Double line

c) Double diamond

d) Double rectangle

80. If you were collecting and storing information about your music collection, an album would be
considered a(n) _____

a) Relation

b) Entity

c) Instance

d) Attribute

81. What term is used to refer to a specific record in your music database; for instance; information
stored about a specific album?
a) Relation

b) Instance

c) Table

d) Column

82. The entity set person is classified as student and employee. This process is called _________

a) Generalization

b) Specialization

c) Inheritance

d) Constraint generalization

83. Which relationship is used to represent a specialization entity?

a) ISA

b) AIS

c) ONIS

d) WHOIS

84. The refinement from an initial entity set into successive levels of entity subgroupings represents a
________ design process in which distinctions are made explicit.

a) Hierarchy

b) Bottom-up

c) Top-down

d) Radical
85. There are similarities between the instructor entity set and the secretary entity set in the sense that
they have several attributes that are conceptually the same across the two entity sets: namely, the
identifier, name, and salary attributes. This process is called

a) Commonality

b) Specialization

c) Generalization

d) Similarity

86. If an entity set is a lower-level entity set in more than one ISA relationship, then the entity set has

a) Hierarchy

b) Multilevel inheritance

c) Single inheritance

d) Multiple inheritance

87. A _____________ constraint requires that an entity belong to no more than one lower-level entity
set.

a) Disjointness

b) Uniqueness

c) Special

d) Relational

88. Consider the employee work-team example, and assume that certain employees participate in more
than one work team. A given employee may therefore appear in more than one of the team entity sets
that are lower level entity sets of employee. Thus, the generalization is _____________

a) Overlapping

b) Disjointness
c) Uniqueness

d) Relational

89. The completeness constraint may be one of the following: Total generalization or specialization,
Partial generalization or specialization. Which is the default?

a) Total

b) Partial

c) Should be specified

d) Cannot be determined

90. Functional dependencies are a generalization of

a) Key dependencies

b) Relation dependencies

c) Database dependencies

d) None of the mentioned

91. Which of the following is another name for a weak entity?

a) Child

b) Owner

c) Dominant

d) All of the mentioned

92. In the __________ normal form, a composite attribute is converted to individual attributes.

a) First

b) Second

c) Third
d) Fourth

93. A table on the many side of a one to many or many to many relationship must:

a) Be in Second Normal Form (2NF)

b) Be in Third Normal Form (3NF)

c) Have a single attribute key

d) Have a composite key

94. Tables in second normal form (2NF):

a) Eliminate all hidden dependencies

b) Eliminate the possibility of a insertion anomalies

c) Have a composite key

d) Have all non key fields depend on the whole primary key

95. Which-one ofthe following statements about normal forms is FALSE?

a) BCNF is stricter than 3 NF

b) Lossless, dependency -preserving decomposition into 3 NF is always possible

c) Loss less, dependency – preserving decomposition into BCNF is always possible

d) Any relation with two attributes is BCNF

96. Functional Dependencies are the types of constraints that are based on______

a) Key

b) Key revisited

c) Superset key

d) None of the mentioned


97. Which is a bottom-up approach to database design that design by examining the relationship
between attributes:

a) Functional dependency

b) Database modeling

c) Normalization

d) Decomposition

98. Which forms simplifies and ensures that there are minimal data aggregates and repetitive groups:

a) 1NF

b) 2NF

c) 3NF

d) All of the mentioned

99. Which forms has a relation that possesses data about an individual entity:

a) 2NF

b) 3NF

c) 4NF

d) 5NF

100. Which forms are based on the concept of functional dependency:

a) 1NF

b) 2NF

c) 3NF

d) 4NF
101.Empdt1(empcode, name, street, city, state, pincode).

For any pincode, there is only one city and state. Also, for given street, city and state, there is just one
pincode. In normalization terms, empdt1 is a relation in

a) 1 NF only

b) 2 NF and hence also in 1 NF

c) 3NF and hence also in 2NF and 1NF

d) BCNF and hence also in 3NF, 2NF and 1NF

102. We can use the following three rules to find logically implied functional dependencies. This
collection of rules is called

a) Axioms

b) Armstrong’s axioms

c) Armstrong

d) Closure

103. Which of the following is not Armstrong’s Axiom?

a) Reflexivity rule

b) Transitivity rule

c) Pseudotransitivity rule

d) Augmentation rule

104. The relation employee(ID,name,street,Credit,street,city,salary) is decomposed into

employee1 (ID, name)

employee2 (name, street, city, salary)

This type of decomposition is called


a) Lossless decomposition

b) Lossless-join decomposition

c) All of the mentioned

d) None of the mentioned

105. Inst_dept (ID, name, salary, dept name, building, budget) is decomposed into

instructor (ID, name, dept name, salary)

department (dept name, building, budget)

This comes under

a) Lossy-join decomposition

b) Lossy decomposition

c) Lossless-join decomposition

d) Both Lossy and Lossy-join decomposition

106. There are two functional dependencies with the same set of attributes on the left side of the arrow:

A->BC

A->B

This can be combined as

a) A->BC

b) A->B

c) B->C

d) None of the mentioned


107. Consider a relation R(A,B,C,D,E) with the following functional dependencies:

ABC -> DE and

D -> AB

The number of superkeys of R is:

a) 2

b) 7

c) 10

d) 12

108. Suppose we wish to find the ID’s of the employees that are managed by people who are managed
by the employee with ID 123. Here are two possible queries:

I.SELECT ee.empID

FROM Emps ee, Emps ff

WHERE ee.mgrID = ff.empID AND ff.mgrID = 123;

II.SELECT empID

FROM Emps

WHERE mgrID IN

(SELECT empID FROM Emps WHERE mgrID = 123);

Which, if any, of the two queries above will correctly (in SQL2) get the desired set of employee ID’s?

a) Both I and II

b) I only

c) II only

d) Neither I nor I
109. Suppose relation R(A,B) currently has tuples {(1,2), (1,3), (3,4)} and relation S(B,C) currently has
{(2,5), (4,6), (7,8)}. Then the number of tuples in the result of the SQL query:

<i>SELECT *

FROM R NATURAL OUTER JOIN S; </i>IS:

a) 2

b) 4

c) 6

d) None of the mentioned

110. Suppose now that R(A,B) and S(A,B) are two relations with r and s tuples, respectively (again, not
necessarily distinct). If m is the number of (not necessarily distinct) tuples in the result of the SQL query:

R intersect S;

Then which of the following is the most restrictive, correct condition on the value of m?

a) m = min(r,s)

b) 0 <= m <= r + s

c) min(r,s) <= m <= max(r,s)

d) 0 <= m <= min(r,s)

111. Suppose relation R(A,B,C,D,E) has the following functional dependencies:

A -> B

B -> C

BC -> A

A -> D
E -> A

D -> E

Which of the following is not a key?

a) A

b) E

c) B, C

d) D

112. The normal form which satisfies multivalued dependencies and which is in BCNF is

a) 4 NF

b) 3 NF

c) 2 NF

d) All of the mentioned

113. Which of the following is a tuple-generating dependencies?

a) Functional dependency

b) Equality-generating dependencies

c) Multivalued dependencies

d) Non-functional dependency

114. The main task carried out in the __________ is to remove repeating attributes to separate tables.

a) First Normal Form

b) Second Normal Form

c) Third Normal Form


d) Fourth Normal Form

115. Which of the normal form is based on multivalued dependencies?

a) First

b) Second

c) Third

d) Fourth

116. Which forms has a relation that possesses data about an individual entity?

a) 2NF

b) 3NF

c) 4NF

d) 5NF

117. If a multivalued dependency holds and is not implied by the corresponding functional dependency,
it usually arises from one of the following sources.

a) A many-to-many relationship set

b) A multivalued attribute of an entity set

c) A one-to-many relationship set

d) Both A many-to-many relationship set and A multivalued attribute of an entity set

118. Which of the following has each related entity set has its own schema and there is an additional
schema for the relationship set?

a) A many-to-many relationship set

b) A multivalued attribute of an entity set

c) A one-to-many relationship set


d) None of the mentioned

119. In which of the following, a separate schema is created consisting of that attribute and the primary
key of the entity set.

a) A many-to-many relationship set

b) A multivalued attribute of an entity set

c) A one-to-many relationship set

d) None of the mentioned

120. Fifth Normal form is concerned with

a) Functional dependency

b) Multivalued dependency

c) Join dependency

d) Domain-key

You might also like