211
84.9k

1410+ DataBase Management System (DBMS) Solved MCQs

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) , Bachelor of Science in Computer Science FY (BSc CS) , Bachelor of Science in Computer Science SY (BSc CS) , Bachelor of Science in Information Technology SY (BSc IT) , Bachelor of Computer Applications (BCA) .

Chapters

Chapter: SQL
151.

SQL query to find all the cities whose humidity is 95.

A. SELECT city WHERE humidity = 95
B. SELECT city FROM weather WHERE humidity = 95
C. SELECT humidity = 89 FROM weather
D. SELECT city FROM weather
Answer» B. SELECT city FROM weather WHERE humidity = 95
152.

SQL query to find the temperature in increasing order of all cities.

A. SELECT city FROM weather ORDER BY temperature
B. SELECT city, temperature FROM weather
C. SELECT city, temperature FROM weather ORDER BY temperature
D. SELECT city, temperature FROM weather ORDER BY city
Answer» D. SELECT city, temperature FROM weather ORDER BY city
153.

What is the meaning of LIKE ‘%0%0%’?

A. Feature begins with two 0’s
B. Feature ends with two 0’s
C. Feature has more than two 0’s
D. Feature has two 0’s in it, at any position
Answer» D. Feature has two 0’s in it, at any position
154.

Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy.

A. SELECT city, temperature, condition FROM weather WHERE condition NOT IN (‘sunny’, ‘cloudy’)
B. SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN (‘sunny’, ‘cloudy’)
C. SELECT city, temperature, condition FROM weather WHERE condition IN (‘sunny’, ‘cloudy’)
D. SELECT city, temperature, condition FROM weather WHERE condition BETWEEN (‘sunny’, ‘cloudy’);
Answer» A. SELECT city, temperature, condition FROM weather WHERE condition NOT IN (‘sunny’, ‘cloudy’)
155.

Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70.

A. SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ OR temperature > 70
B. SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ OR temperature > 70
C. SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature > 70
D. SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ AND condition = ‘cloudy’ AND temperature > 70
Answer» C. SELECT city, temperature, condition FROM weather WHERE condition = ‘sunny’ OR condition = ‘cloudy’ AND temperature > 70
156.

Find all the tuples having a temperature greater than ‘Paris’.

A. SELECT * FROM weather WHERE temperature > (SELECT temperature FROM weather WHERE city = ‘Paris’
B. SELECT * FROM weather WHERE temperature > (SELECT * FROM weather WHERE city = ‘Paris’)
C. SELECT * FROM weather WHERE temperature > (SELECT city FROM weather WHERE city = ‘Paris’)
D. SELECT * FROM weather WHERE temperature > ‘Paris’ temperature
Answer» A. SELECT * FROM weather WHERE temperature > (SELECT temperature FROM weather WHERE city = ‘Paris’
157.

Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79.

A. SELECT * FROM weather WHERE humidity IN (63 to 79)
B. SELECT * FROM weather WHERE humidity NOT IN (63 AND 79)
C. SELECT * FROM weather WHERE humidity BETWEEN 63 AND 79
D. SELECT * FROM weather WHERE humidity NOT BETWEEN 63 AND 79
Answer» C. SELECT * FROM weather WHERE humidity BETWEEN 63 AND 79
158.

The command to remove rows from a table ‘CUSTOMER’ is __________________

A. DROP FROM CUSTOMER
B. UPDATE FROM CUSTOMER
C. REMOVE FROM CUSTOMER
D. DELETE FROM CUSTOMER WHERE
Answer» D. DELETE FROM CUSTOMER WHERE
159.

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
Answer» C. Outer join
160.

What type of join is needed when you wish to return rows that do have matching values?

A. Equi-join
B. Natural join
C. Outer join
D. All of the Mentioned
Answer» D. All of the Mentioned
161.

Which of the following is one of the basic approaches for joining tables?

A. Subqueries
B. Union Join
C. Natural join
D. All of the Mentioned
Answer» D. All of the Mentioned
162.

The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID, ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T,ORDER_T WHERE CUSTOMER_T. CUSTOMER_ID = ORDER_T. CUSTOMER_ID?

A. Equi-join
B. Natural join
C. Outer join
D. Cartesian join
Answer» A. Equi-join
163.

A UNION query is which of the following?

A. Combines the output from no more than two queries and must include the same number of columns
B. Combines the output from no more than two queries and does not include the same number of columns
C. Combines the output from multiple queries and must include the same number of columns
D. Combines the output from multiple queries and does not include the same number of columns
Answer» C. Combines the output from multiple queries and must include the same number of columns
164.

Which of the following statements is true concerning subqueries?

A. Involves the use of an inner and outer query
B. Cannot return the same result as a query that is not a subquery
C. Does not start with the word SELECT
D. All of the mentioned
Answer» A. Involves the use of an inner and outer query
165.

Which of the following is a correlated subquery?

A. Uses the result of an inner query to determine the processing of an outer query
B. Uses the result of an outer query to determine the processing of an inner query
C. Uses the result of an inner query to determine the processing of an inner query
D. Uses the result of an outer query to determine the processing of an outer query
Answer» A. Uses the result of an inner query to determine the processing of an outer query
166.

The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID, ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T,ORDER_T?

A. Equi-join
B. Natural join
C. Outer join
D. Cartesian join
Answer» D. Cartesian join
167.

Which is not a type of join in T-SQL?

A. Equi-join
B. Natural join
C. Outer join
D. Cartesian join
Answer» B. Natural join
168.

What is a view?

A. A view is a special stored procedure executed when certain event occurs
B. A view is a virtual table which results of executing a pre-compiled query
C. A view is a database diagram
D. None of the Mentioned
Answer» B. A view is a virtual table which results of executing a pre-compiled query
169.

Which of the following is not a limitation of view?

A. ORDER BY Does Not Work
B. Index Created on View Used Often
C. Cross Database Queries Not Allowed in Indexed View
D. Adding Column is Expensive by Joining Table Outside View
Answer» B. Index Created on View Used Often
170.

Which of the following statement is true?

A. Views could be looked as an additional layer on the table which enables us to protect intricate or sensitive data based upon our needs
B. Views are virtual tables that are compiled at run time
C. Creating views can improve query response time
D. All of the Mentioned
Answer» D. All of the Mentioned
171.

SQL Server has mainly how many types of views?

A. one
B. two
C. three
D. four
Answer» B. two
172.

Dynamic Management View is a type of ___________

A. System Defined Views
B. User Defined View
C. Simple View
D. Complex View
Answer» A. System Defined Views
173.

Syntax for creating views is __________

A. CREATE VIEW AS SELECT
B. CREATE VIEW AS UPDATE
C. DROP VIEW AS SELECT
D. CREATE VIEW AS UPDATE
Answer» A. CREATE VIEW AS SELECT
174.

You can delete a view with ___________ command.

A. DROP VIEW
B. DELETE VIEW
C. REMOVE VIEW
D. TRUNCATE VIEW
Answer» A. DROP VIEW
175.

What is SCHEMABINDING a VIEW?

A. Schema binding binds your views to the dependent physical columns of the accessed tables specified in the contents of the view
B. These are stored only in the Master database
C. These types of view are defined by users on a specified schema
D. These are used to show database self describing information
Answer» B. These are stored only in the Master database
176.

Which of the following is not a SQL Server INFORMATION_SCHEMA view?

A. INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE
B. INFORMATION_SCHEMA.DOMAIN_CONSTRAINTS
C. INFORMATION_SCHEMA.KEY_COLUMN_USAGE
D. sys.dm_exec_connections
Answer» D. sys.dm_exec_connections
177.

___________ is stored only in the Master database.

A. Database-scoped Dynamic Management View
B. Complex View
C. Catalog View
D. None of the mentioned
Answer» D. None of the mentioned
Chapter: Relational Database Design
178.

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

A. First
B. Second
C. Third
D. Fourth
Answer» A. First
179.

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
Answer» A. Eliminate all hidden dependencies
180.

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
Answer» C. Loss less, dependency – preserving decomposition into BCNF is always possible
181.

Functional Dependencies are the types of constraints that are based on______

A. Key
B. Key revisited
C. Superset key
D. None of the mentioned
Answer» A. Key
182.

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
Answer» C. Normalization
183.

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
Answer» C. 3NF
184.

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

A. 2NF
B. 3NF
C. 4NF
D. 5NF
Answer» C. 4NF
185.

Which forms are based on the concept of functional dependency:

A. 1NF
B. 2NF
C. 3NF
D. 4NF
Answer» C. 3NF
186.

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
Answer» B. 2 NF and hence also in 1 NF
187.

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
Answer» B. Armstrong’s axioms
188.

Which of the following is not Armstrong’s Axiom?

A. Reflexivity rule
B. Transitivity rule
C. Pseudotransitivity rule
D. Augmentation rule
Answer» C. Pseudotransitivity rule
189.

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
Answer» D. None of the mentioned
190.

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
Answer» D. Both Lossy and Lossy-join decomposition
191.

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
Answer» A. A->BC
192.

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
Answer» C. 10
193.

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
Answer» A. Both I and II
194.

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)
Answer» D. 0 <= m <= min(r,s)
195.

Which of the following is not a key?

A. A
B. E
C. B, C
D. D
Answer» C. B, C
196.

If a relation is in BCNF, then it is also in

A. 1 NF
B. 2 NF
C. 3 NF
D. All of the above
Answer» D. All of the above
197.

What action does ⋈ operator perform in relational algebra

A. Output specified attributes from all rows of the input relation and remove duplicate tuples from the output
B. Outputs pairs of rows from the two input relations that have the same value on all attributes that have the same name
C. Output all pairs of rows from the two input relations (regardless of whether or not they have the same values on common attributes)
D. Return rows of the input relation that satisfy the predicate
Answer» A. Output specified attributes from all rows of the input relation and remove duplicate tuples from the output
198.

Statement 1: A tuple is a row in a relation Statement 2: Existence of multiple foreign keys in a same relation is possible

A. Both the statements are true
B. Statement 1 is correct but Statement 2 is false
C. Statement 1 is false but Statement 2 is correct
D. Both the statements are false
Answer» A. Both the statements are true
199.

The____condition allows a general predicate over the relations being joined.

A. On
B. Using
C. Set
D. Where
Answer» A. On
200.

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
Answer» B. Right outer join

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.