DBMS MCQ
DBMS MCQ
2) Which of the following provides the ability to query information from the
database and insert tuples into, delete tuples from, and modify tuples in the
database?
1. DML(Data Manipulation Language)
2. DDL(Data Definition Language)
3. Query
4. Relational Schema
Hide Answer Workspace
Answer: A
Explanation: The term "DML" stands for the Data Manipulation Language
used to perform the required changes in the relation's values.
4) Which one of the following given statements possibly contains the error?
1. select * from emp where empid = 10003;
2. select empid from emp where empid = 10006;
3. select empid from emp;
4. select empid where empid = 1009 and Lastname = 'GELLER';
Hide Answer Workspace
Answer: D
Explanation: The Query given in option D does not contain the "from"
clause, which specifies the relation from which the values have to be selected
or fetched. Therefore the correct answer is D.
7) In the following Query, which of the following can be placed in the Query's
blank portion to display the salary from highest to lowest amount, and sorting
the employs name alphabetically?
1. SELECT *
2. FROM instructor
3. ORDER BY salary ____, name ___;
1. Ascending, Descending
2. Asc, Desc
3. Desc, Asc
4. All of the above
Hide Answer Workspace
Answer: C
Explanation: To sort the salary from highest to lowest amount and display
the employee's name alphabetically, one can use the "Desc and Asc" in the
above-given Query.
11) Which of the following can be considered as the maximum size that is
supported by FAT?
1. 8GB
2. 4GB
3. 4TB
4. None of the above
Hide Answer Workspace
Answer: B
Explanation: The files with a size of less than 4 GB or equal to 4GB are
easily supported by the FAT. All files with a size greater than the maximum
size (or is 4Gb) are not supported by the FAT.
15) Which of the following can be used to extract or filter the data &
information from the data warehouse?
1. Data redundancy
2. Data recovery tool
3. Data mining
4. Both B and C
Hide Answer Workspace
Answer: C
Explanation: The tools used to obtain meaningful information or Data from
the large collection of data (or from the Data Warehouses) are known as the
Data mining tools. Through data mining, one can easily filter the useful
information or data from the massive collection of the data. Therefore the
correct answer is Data Mining.
16) Which one of the following refers to the copies of the same data (or
information) occupying the memory space at multiple places.
1. Data Repository
2. Data Inconsistency
3. Data Mining
4. Data Redundancy
Hide Answer Workspace
Answer: D
Explanation: The data redundancy generally occurs whenever more than
one copy of the exact same data exists in several different places.
Sometimes it may cause data inconsistency, which can result in an unreliable
source of data or information that is not good for anyone.
17) Which one of the following refers to the "data about data"?
1. Directory
2. Sub Data
3. Warehouse
4. Meta Data
Hide Answer Workspace
Answer: D
Explanation: The Mata Data refers to the type of data that describes the
other data or information.
A general file or document is nothing more than a sequence of bytes that
contains information like file name, file size, and date & time when the
document was created or modified.
To understand it in more details, consider the following example:
For a common music file, the metadata may include the singer's name, the
year it was released, and the lyrics, etc.
18) Which of the following refers to the level of data abstraction that
describes exactly how the data actually stored?
1. Conceptual Level
2. Physical Level
3. File Level
4. Logical Level
Hide Answer Workspace
Answer: B
Explanation: Data abstraction means displaying or sharing only the data
that is needed and hiding from all other data until it is necessary to share it.
However, the data abstraction level that describes how the data was actually
stored in the user's machine (or system) is known as the Physical level.
Therefore the correct answer is B.
26) Which of the following is a top-down approach in which the entity's higher
level can be divided into two lower sub-entities?
1. Aggregation
2. Generalization
3. Specialization
4. All of the above
Hide Answer Workspace
Answer: C
Explanation: In specialization, the top-down approach is used, and it is
apposite to the generalization.
In the specialization, the higher-level entity can be divided into sub lower
entities. It is generally used for identifying the subset of an entity set which
share the distinguishing characteristics.
To understand it more clearly, consider the following example:
Suppose you have an entity, e.g., A vehicle. So through the specialization,
you can be divided further into sub-entities like two-wheelers and four-
wheelers. Therefore the correct answer is C.
27) In which one of the following, the multiple lower entities are grouped (or
combined) together to form a single higher-level entity?
1. Specialization
2. Generalization
3. Aggregation
4. None of the above
Hide Answer Workspace
Answer: B
Explanation:
The bottom-up approach is used in the generalization. The several lower-level
sub-entities are grouped together to make an individual higher-level entity. In
short, we can say that it is totally the opposite of specialization. To
understand it more clearly, consider the following example:
Example
Suppose you have several lower entities like bus, car, motorbike etc. So, in
order to make a more generalize (or higher level ) entity, you can combine
them under a new higher-level entity such as a vehicle.
28) In a relation database, every tuples divided into the fields are known as
the______.
1. Queries
2. Domains
3. Relations
4. All of the above
Hide Answer Workspace
Answer: B
Explanation: In a database, the number of rows inside a table is known as
tuples, and if we further divide those tuples (or rows) into those fields, they
become the domains. So the correct answer will be B.
30) In the relational table, which of the following can also be represented by
the term "attribute"?
1. Entity
2. Row
3. Column
4. Both B &C
Hide Answer Workspace
Answer: C
Explanation: In the database, the number of rows inside a table is called the
tuples, and the numbers of columns are known as the attributes. Therefore
the correct answer is C.
32) Which of the following is used in the application programs to request data
from the database management system?
1. Data Manipulation language
2. Data Definition Language
3. Data Control Language
4. All of the above
Hide Answer Workspace
Answer: A
Explanation: To fetch data from the database management system,
generally, the "select" statement is used. Therefore, the Data Manipulation
Language is used in the application programs while requesting the data from
the database management system.
33) Which one of the following command is used to delete the existing row in
a table?
1. Delete
2. Update
3. Insert
4. None of the above
Hide Answer Workspace
Answer: A
Explanation: To delete an existing row in a table the generally, the "delete"
command is used. The "delete" command is one of the commands that
belong to the Data manipulation language.
35) Which one of the following commands is used for removing (or deleting) a
relation forms the SQL database?
1. Delete
2. Drop
3. Remove
4. All of the above
Hide Answer Workspace
Answer: B
Explanation: To removing( or deleting) a relation, the "drop" command is
used instead of delete because here we are working on the objects of the
database. So, to maintain the objects of a database, the Data definition
language is used. Therefore the "drop" command is used to delete a relation
form a database instead of using the "delete" command.
36) Which one of the following commands is used to restore the database to
the last committed state?
1. Savepoint
2. Rollback
3. Commit
4. Both A & B
Hide Answer Workspace
Answer: B
Explanation: As we all know that while working with the Transactions, the
Transaction Control Language is used. To restore the database to the last
committed state ( or to undo the latest changes), the "rollback" command is
used that belongs to the Transaction Control Language.
43) Which one of the following refers to the total view of the database
content?
1. Conceptual view
2. Physical view
3. Internal view
4. External view
Hide Answer Workspace
Answer: A
Explanation: The conceptual view refers to the total view of the content
available in the database. Therefore the correct answer is A.
47) In the relation model, the relation are generally termed as ________
1. Tuples
2. Attributes
3. Rows
4. Tables
Hide Answer Workspace
Answer: D
Explanation: In the relation model, the relations are also referred to as the
tables because the relations are considered as the technical name of the
table. So the correct answer is D.
48) The Database Management Query language is generally designed for the
_____
1. Support end-users who use English like commands
2. Specifying the structure of the database
3. Support in the development of the complex applications software
4. All of the above
Hide Answer Workspace
Answer: D
Explanation: The database management query language is generally
designed by keeping in mind that it must support the end-users who are
familiar with the English-like commands. It should also boost the process of
development of the complex applications software and helps in specifying the
structure of the database.
50) Which of the following levels is considered as the level closed to the end-
users?
1. Internal Level
2. External Level
3. Conceptual Level
4. Physical Level
Hide Answer Workspace
Answer: B
Explanation: The database's external level is the one and only level that is
considered the closest level to the end-users. So the correct answer will be
the B.
52) Which one of the following keyword is used to find out the number of
values in a column?
1. TOTAL
2. COUNT
3. SUM
4. ADD
Hide Answer Workspace
Answer: B
Explanation: The "COUNT" keyword is used to find the total number of
values inside a column. So whenever a user wants to find the total values in a
column, he can use the keyword "COUNT".
53) Which one of the following is commonly used to define the overall design
of the database?
1. Application program
2. Data definition language
3. Schema
4. Source code
Hide Answer Workspace
Answer: C
Explanation: In order to define the overall design of the database, generally,
the schema is used. Therefore the correct answer is C.
54) Which one of the following commands is used to modify a column inside a
table?
1. Drop
2. Update
3. Alter
4. Set
Hide Answer Workspace
Answer: C
5) Which statement is used to delete all rows in a table without having the
action logged?
1. DELETE
2. REMOVE
3. DROP
4. TRUNCATE
Hide Answer Workspace
Answer: D
Explanation: TRUNCATE statement removes all rows in a table without
logging the individual row deletions. It uses fewer system and transaction log
resources, which makes its execution fast. This statement is similar to the
DELETE statement without the WHERE clause.
15) If we have not specified ASC or DESC after a SQL ORDER BY clause, the
following is used by default
1. DESC
2. ASC
3. There is no default value
4. None of the mentioned
Hide Answer Workspace
Answer: B
Explanation: If we have not specified any sorting with the ORDER BY clause,
SQL always uses the ASC as a default sorting order. SQL treats Null as the
lowest possible values while sorting.
18) A command that lets you change one or more field in a table is:
1. INSERT
2. MODIFY
3. LOOK-UP
4. All of the above
Hide Answer Workspace
Answer: B
Explanation: The modify command is used to change one or more columns
in the existing table. It is generally used with ALTER TABLE statement as
follows.
LTER TABLE table_name MODIFY column_name column_type;
21) _______ clause creates temporary relation for the query on which it is
defined.
1. WITH
2. FROM
3. WHERE
4. SELECT
Hide Answer Workspace
Answer: A
Explanation: The WITH clause in SQL allows us to provide a sub-query block,
a name that can be referenced in several places within the main query. It is
used for defining a temporary relation whose definition is available by the
query in which the WITH clause is associated.
25) How can you change "Thomas" into "Michel" in the "LastName" column in
the Users table?
1. UPDATE User SET LastName = 'Thomas' INTO LastName = 'Michel'
2. MODIFY Users SET LastName = 'Michel' WHERE LastName =
'Thomas'
3. MODIFY Users SET LastName = 'Thomas' INTO LastName = 'Michel'
4. UPDATE Users SET LastName = 'Michel' WHERE LastName =
'Thomas'
Hide Answer Workspace
Answer: D
Explanation: The UPDATE statement is used for modifying the table data by
using the SET and WHERE clause. The SET clause is used to change the
values of the column specified in the WHERE clause. See the below syntax:
27) Which type of JOIN is used to returns rows that do not have matching
values?
1. Natural JOIN
2. Outer JOIN
3. EQUI JOIN
4. All of the above
Hide Answer Workspace
Answer: B
Explanation:
OUTER JOIN is the only join that returned the unmatched rows in one or both
tables. It can be classified into the following types:
o LEFT JOIN that shows only the unmatched rows from the left table.
o RIGHT JOIN that shows only the unmatched rows from the right
table.
o FULL OUTER JOIN that shows the unmatched rows from both tables.
EQUI JOIN shows records for equality or matching column(s) values of the
relative tables.
A Natural join can only be performed if at least one common attribute exists
between two relations (the attributes should be the same name and domain).
31) Which of the following is the basic approaches for joining tables?
1. Union JOIN
2. Natural JOIN
3. Subqueries
4. All of the above
Hide Answer Workspace
Answer: D
Explanation:
We already know that Union and Natural are the approaches for joining two
or more tables.
A subquery is a query nested into another SQL query. It can be embedded
with SELECT, INSERT, UPDATE or DELETE statement. A subquery is known as
the inner query. In many cases, we can use the subquery instead of a JOIN.
Therefore, option D is the correct choice.
32) Why we need to create an index if the primary key is already present in a
table?
1. Index improves the speed of data retrieval operations on a table.
2. Indexes are special lookup tables that will be used by the database
search engine.
3. Indexes are synonyms of a column in a table.
4. All of the above
Hide Answer Workspace
Answer: A
Explanation: When we define a primary key in a table, the Database Engine
enforces the data's uniqueness by creating a unique index for those columns.
This indexing process improves data retrieval when the primary key is used
in queries. Therefore, we need to create an index if a primary key is already
present in a table.
33) Group of operations that form a single logical unit of work is known as
1. View
2. Network
3. Unit
4. Transaction
Hide Answer Workspace
Answer: D
Explanation: A transaction is a sequential group of statements such as
select, insert, update or delete to perform as one single logical unit of work
that can be committed or rolled back
38) What is the difference between a PRIMARY KEY and a UNIQUE KEY?
1. Primary key can store null value, whereas a unique key cannot store
null value.
2. We can have only one primary key in a table while we can have
multiple unique keys
3. Primary key cannot be a date variable whereas unique key can be
4. None of these
Hide Answer Workspace
Answer: B
Explanation:
The primary key is a single or combination of the field that identifies each
record in a table uniquely. It cannot take a NULL value. A table can have only
one primary key. Also, we can create a date variable as a primary key in a
table.
Unique key also determines each row of the table uniquely, but it can take
null value into. A table can have more than one unique key. We cannot create
a date variable as a unique key in a table.
39) Which of the following are the synonyms for Column and ROW of a table?
1. Row = [Tuple, Record]
2. Column = [Field, Attribute]
3. Row = [Tuple, Attribute]
4. Columns = [Field, Record]
1. 1 and 2
2. 3 and 4
3. Only 1
4. Only 2
Hide Answer Workspace
Answer: A
Explanation: In Database Management System (DBMS), we can say that
each record is also called a tuple and rows. And each column is called fields
and attributes.
45) Find the cities name with the condition and temperature from table
'whether' where condition = sunny or cloudy but temperature >= 60.
1. SELECT city, temperature, condition FROM weather WHERE
condition = 'cloudy' AND condition = 'sunny' OR temperature >= 60
2. SELECT city, temperature, condition FROM weather WHERE
condition = 'cloudy' OR condition = 'sunny' OR temperature >= 60
3. SELECT city, temperature, condition FROM weather WHERE
condition = 'sunny' OR condition = 'cloudy' AND temperature >= 60
4. SELECT city, temperature, condition FROM weather WHERE
condition = 'sunny' AND condition = 'cloudy' AND temperature >=
60
Hide Answer Workspace
Answer: C
Explanation: We know that the AND operator gives the output only when
both the first conditions are true. In contrast, the OR operator gives the
output when either the first condition OR the second condition is true. Hence
the option C is the correct choice.
46) Which of the following statement is correct to display all the cities with
the condition, temperature, and humidity whose humidity is in the range of
60 to 75 from the 'whether' table?
1. SELECT * FROM weather WHERE humidity IN (60 to 75)
2. SELECT * FROM weather WHERE humidity BETWEEN 60 AND 75
3. SELECT * FROM weather WHERE humidity NOT IN (60 AND 75)
4. SELECT * FROM weather WHERE humidity NOT BETWEEN 60 AND 75
Hide Answer Workspace
Answer: B
Explanation:
The BETWEEN is a conditional operator that is used to retrieve values from an
expression within a range. It can be used with the SELECT, INSERT, UPDATE
and DELETE statement.
The IN is a conditional operator used to reduce the use of multiple OR
conditions in the SELECT, INSERT, UPDATE and DELETE statement.
Hence the option B is the correct choice.
48) Which statement is used to get all data from the student table whose
name starts with p?
1. SELECT * FROM student WHERE name LIKE '%p%';
2. SELECT * FROM student WHERE name LIKE 'p%';
3. SELECT * FROM student WHERE name LIKE '_p%';
4. SELECT * FROM student WHERE name LIKE '%p';
Hide Answer Workspace
Answer: B
Explanation: The '%' symbol indicates zero or more characters next to
where it will be used. And the _ symbol is used to match exactly one
character. Therefore option B is the correct choice.
52) Which data dictionary table can be used to show the object privileges
granted to the user on specific columns?
1. USER_TAB_PRIVS_MADE
2. USER_COL_PRIVS_MADE
3. USER_TAB_PRIVS
4. USER_COL_PRIVS
Hide Answer Workspace
Answer: D
Explanation: The USER_COL_PRIVS data dictionary table will display the
object privileges granted to the user on specific columns. The
USER_TAB_PRIVS data dictionary table will display the object privileges
granted to the user on the tables. Options A and B are not data dictionary.
56) _______ is a constraint that can be defined only at the column level?
1. UNIQUE
2. NOT NULL
3. CHECK
4. PRIMARY KEY
Hide Answer Workspace
Answer: B