Are you gearing up for an upcoming exam and searching for a comprehensive resource to enhance your understanding of RDBMS? Look no further! In this article, we have compiled the top 80 Multiple Choice Questions (MCQ) on Relational Database Management Systems (RDBMS) along with their answers.
Whether you are a student preparing for an academic test or a professional aiming to brush up on your RDBMS knowledge, our carefully curated collection is designed to help you excel in your examination.
So, get ready to delve into the world of RDBMS as we provide you with an invaluable tool for exam preparation – an easily accessible PDF download containing essential MCQs and their solutions.
Top 80 RDBMS MCQ Questions with answers
1. MySQL is a ___.
Ans. Relational Database Management System
2. The ___ is a privileged and Password system that is very flexible and secure, and that allows host-based verification.
Ans. Security
3. The number of indexes allowed per table in MySQL are ___.
Ans. 64
4. If MySQL is running in ___ mode, values that exceed the column length are not stored, and an error results.
Ans. strict
5. The ___ columns have no character set, and sorting and comparison are based on the numeric values of the bytes in column values.
Ans. BLOB
6. Each ___ type has a range of legal values, as well as a “zero” value that may be used when you specify an illegal value that MySQL cannot represent.
Ans. temporal
7. You can get MySQL to accept certain dates, such as ‘2009-11-31’, by using the ___ SQL mode.
Ans. ALLOW_INVALID_DATES
8. The format of the timestamp column in MySQL is ___.
Ans. ‘YYYY-MM-DD HH:MM:SS’
9. ___ is a synonym for CREATE DATABASE.
Ans. CREATE SCHEMA
10. Database characteristics are stored in the ___ file in the database directory.
Ans. db.opt
11. BLOB and TEXT columns also can be indexed, but a ___ length must be given.
Ans. prefix
12. A ___ table is visible only to the current connection and is dropped automatically when the connection is closed.
Ans. TEMPORARY
13. ___ does not apply to the BLOB or TEXT types.
Ans. DEFAULT
14. For all engines, a ___ index allows multiple NULL values for columns that can contain NULL.
Ans. UNIQUE
15. Each table has an ___ file that contains the table definition.
Ans. .frm
16. When creating sequences with ___ columns, omitting the field name in the INSERT statement will cause MySQL to generate the next number in the sequence.
Ans. AUTOINCREMENT
17. A ___clause must come after any GROUP BY clause and before any ORDER BY clause.
Ans. HAVING
18. If ORDER BY occurs within a subquery and also is applied in the outer query, the ___ ORDER BY takes precedence.
Ans. outermost
19. The ___ queries are referred to as JOINS because they join together two or more tables.
Ans. multi-table
20. In Union operation, the column names from the first ___ statement are used as the column names for the results returned.
a. Select
b. Update
c. Delete
d. Insert
Ans. a (Select)
21. The ___ clause places a limit on the number of rows that can be deleted
Ans. LIMIT
22. The ___ count of rows affected by the TRUNCATE TABLE is accurate only when it is mapped to a statement.
Ans. DELETE
23. The ___ clause in an Update statement indicates which columns to modify and the values they should be given.
Ans. SET
24. A subquery is a ___ subquery that returns a single value.
Ans. scalar
25. The subquery, which is enclosed in ___, can be preceded by comparison and logical operators, the IN operator, or the EXISTS operator.
Ans. parentheses
26. ___ is an alias for <> ALL.
Ans. NOT IN
27. A reference by a subquery to a field in its enclosing query, is called an ___ reference.
Ans. outer
28. The ___ operator is most often used in the context of outer references.
Ans. EXISTS
29. A ___ subquery is a subquery variant that returns a single row and can thus return more than one column value.
Ans. row
30. We can use ___ to force the order of evaluation in an expression.
Ans. parentheses
31. A comparison test using the BETWEEN operator returns true if the expression being tested lies between the specified range, ___ of both endpoints of the range.
Ans. inclusive
32. A comparison test using the BETWEEN operator returns true if the expression being tested lies between the specified range, ___ of both endpoints of the range.
Ans. numeric
33. The output of the function ASCII(‘dx’) is ___.
Ans. 100
34. The output of the string function CONCAT(‘My’, NULL, ‘QL’) is ___.
Ans. NULL
35. The output of the string function LPAD(‘hi’,1,’??’) is ___.
Ans. ‘h’
36. The output after the execution of the following SQL statement is ___:
SELECT ‘David!’ LIKE ‘%D%v%’;
Ans. 1
37. The output of the Numeric function ACOS(1.0001) is ___.
Ans. NULL
38. The ___ function is used to create a date from the year and day of year.
Ans. MAKEDATE
39. A ___ index definition can be given in the CREATE TABLE statement when a table is created, or added later using ALTER TABLE or CREATE INDEX.
Ans. FULLTEXT
40. The ___ and ___ functions may be used to take a value of one type and produce a value of another type.
Ans. CAST() and CONVERT()
41. The output of the following Bitwise AND operation 29 & 15 is ___.
Ans. 13
42. It is possible for AES_DECRYPT() to return a ___ (possibly garbage) if the input data or the key is invalid.
Ans. Non – NULL value
43. The SUM() and AVG() aggregate functions do not work with ___ values.
Ans. Temporal
44. With START TRANSACTION, autocommit remains ___ until you end the transaction with COMMIT or ROLLBACK.
Ans. disabled
45. The ___ command also ends a transaction if any tables currently are locked.
Ans. UNLOCK TABLES
46. The ___ statement sets a named transaction savepoint with a name of the identifier.
Ans. SAVEPOINT
47. The ___ command releases any locks held by the current thread.
Ans. UNLOCK TABLES
48. If a table is locked with a read and a write lock, put the ___ lock before the ___ lock.
Ans. Write, Read
49. Using the ___ keyword sets the default transaction level for all future transactions performed on the current connection.
Ans. SESSION
50. A ___ actually refers collectively to standalone stored functions, standalone procedures, packaged functions, and procedures.
Ans. Stored Procedure
51. A ___ is a named database object that is associated with a table and that is activated when a particular event occurs for the table, such as an insert or update.
Ans. trigger
52. The ___ statement may only be used inside a BEGIN … END compound statement and must be at its start, before any other statements.
Ans. DECLARE
53. To redefine the MySQL delimiter, use the ___ command.
Ans. delimiter
54. The___ statement is used to drop a stored procedure or function.
Ans. DROP {PROCEDURE | FUNCTION} [IF EXISTS] sp_name
55. The ___ statement can pass back values to its caller using parameters that are declared as OUT or INOUT parameters.
Ans. CALL
56. To handle ___ parameters, execute a statement prior to the CALL that sets the user variables to the values to be passed to the procedure.
Ans. INOUT
57. In a BEGIN…END compound statement, the begin_label and end_label must be the ___ if both are specified.
Ans. same
58. The ___ control construct implements a basic conditional construct.
Ans. IF
59. The ___ statement also allows combinations of local variables and some options that only make sense for global/system variables; in that case, the options are accepted but ignored.
Ans. SET
60. The ___ syntax stores selected columns directly into variables. Therefore, only a single row may be retrieved.
Ans. SELECT
61. The ___ statement is used to exit any flow control construct.
Ans. LEAVE
62. The MySQL program to connect to the server as the MySQL root user is ___.
Ans. mysql>mysql –user = root mysql
63. The ___, as used by MySQL for authentication purposes, have nothing to do with usernames (login names) as used by Windows or Unix.
Ans. Usernames
64. MySQL encrypts passwords using ___ algorithm.
Ans. its own
65. Windows distributions contain ___ grant tables that are installed automatically.
Ans. pre-initialized
66. To assign passwords to ___ accounts, connect to the server as root and then use either SET PASSWORD or UPDATE
Ans. Anonymous
67. To use it, you must have the global ___ privilege or the ___ privilege for the mysql database.
Ans. CREATE USER or DELETE
68. The setting ___ method is strictly global and does not allow for management of individual accounts.
Ans. setting of max_user_connections variable to a zero value
69. Passwords may be assigned from the command line by using the ___ command.
Ans. mysqladmin
70. The reason for using ___ PRIVILEGES when you create accounts with INSERT is to tell the server to re-read the grant tables.
Ans. FLUSH
71. MySQL uses security based on ___ for all connections, queries, and other operations that users can attempt to perform.
Ans. Access Control Lists (ACLs)
72. MySQL uses port ___ by default.
Ans. 3306
73. If the connection between the client and the server goes through an untrusted network, and you are concerned about this, you can use the ___ protocol to make traffic much more difficult to decipher.
Ans. compressed
74. With the ___ privilege, you can read any file into a database table.
Ans. FILE
75. If the ___ option if mysqld is enabled, a user cannot create new MySQL users by using the GRANT statement unless the user has the INSERT privilege for the mysql.user table or any column in the table.
Ans. –safe-user-create
76. The ___ log is used to establish client connections and statements received from clients.
Ans. general query
77. The ___ option specifies the destination for log output if logging is enabled, but the option does not in itself enable the logs.
Ans. –log-output
78. If you execute ___ LOGS, the error log is renamed with the suffix -old and mysqld creates a new empty log file.
Ans. FLUSH
79. If you specify no filename for the general query log, the default name is ___ in the data directory.
Ans. host_name.log
80. For ___, the binary log is used on master replication servers as a record of the statements to be sent to slave servers.
Ans. replication
Conclusion
We hope that our Top 80 RDBMS MCQ Questions with answers pdf download has been a valuable resource for your exam preparation. We have carefully selected these questions to cover a wide range of topics in the field of Relational Database Management Systems.
By answering these MCQs, you have not only tested your knowledge but also gained a deeper understanding of the subject matter. If you found our MCQs helpful, we kindly request you to share them on social media platforms so that more students can benefit from this valuable resource. Remember, sharing is caring!