Free MySQL 8.0 Database Developer Practice Questions
100 free questions · Answer explanations · No signup required
View examination details, outline and sourcesLoading selected examination banks…
Sample Practice Questions
Try these 10 sample questions from the MySQL 8.0 Database Developer practice bank. Each includes the answer and explanation. Continue with the interactive practice above to review the full question set.
1A Java application uses the JDBC API to access MySQL. Which connector implements that API?
- A.MySQL Connector/JCorrect answer: A
- B.MySQL Connector/NET
- C.MySQL Connector/ODBC
- D.MySQL Connector/Python
2In MySQL SQL prepared statements, what can a ? parameter marker represent?
- A.A table identifier
- B.A SQL keyword
- C.A bound data valueCorrect answer: C
- D.A column identifier
Explanation: The manual states: "Parameter markers can be used only where data values should appear, not for SQL keywords, identifiers, and so forth." A marker substitutes a value, not SQL syntax or identifiers.
Reference: MySQL 8.0 Reference Manual: PREPARE Statement — PREPARE Statement, parameter markers
3A view is created as SELECT * from a table. A column is later added to the table. What happens to the view's columns?
- A.The new column becomes visible automatically
- B.The new column is not added to the existing viewCorrect answer: B
- C.The view is automatically dropped and recreated
- D.The view switches to a temporary table
Explanation: The manual states: "if a view is defined as SELECT * on a table, new columns added to the table later do not become part of the view" The view definition is frozen at creation, so the new column is not added automatically.
Reference: MySQL 8.0 Reference Manual: CREATE VIEW Statement — CREATE VIEW, frozen definitions
4A session executes START TRANSACTION while autocommit is enabled, then commits. What happens to autocommit after the transaction ends?
- A.It reverts to its previous stateCorrect answer: A
- B.It remains disabled for the session
- C.It is disabled for every session
- D.It switches to the global setting only after reconnect
5A composite index is defined on (col1, col2, col3). Which column set is a leftmost prefix for indexed lookup?
- A.(col2)
- B.(col2, col3)
- C.(col1, col2)Correct answer: C
- D.(col3)
Explanation: The manual states: "if you have a three-column index on (col1, col2, col3), you have indexed search capabilities on (col1), (col1, col2), and (col1, col2, col3)." The index begins with col1, so (col1, col2) is a leftmost prefix.
Reference: MySQL 8.0 Reference Manual: Multiple-Column Indexes — Multiple-Column Indexes, leftmost prefixes
6A procedure parameter is declared INOUT. How does its value pass between caller and procedure?
- A.It passes in but changes are not returned
- B.It starts as NULL and only passes out
- C.It passes in and changes are returnedCorrect answer: C
- D.It starts as NULL and changes are not returned
Explanation: The manual states: "An INOUT parameter is initialized by the caller, can be modified by the procedure, and any change made by the procedure is visible to the caller when the procedure returns." INOUT carries a value in and returns modifications; OUT starts as NULL in the procedure.
Reference: MySQL 8.0 Reference Manual: CREATE PROCEDURE and CREATE FUNCTION — Stored Routine Parameters
7What happens when an invalid JSON document is inserted into a MySQL JSON column?
- A.It is stored unchanged as text
- B.The server raises an errorCorrect answer: B
- C.It is silently converted to an empty object
- D.The server stores it as SQL NULL
Explanation: The manual states: "Automatic validation of JSON documents stored in JSON columns. Invalid documents produce an error." The JSON type validates inserted documents rather than storing invalid JSON unchanged.
Reference: MySQL 8.0 Reference Manual: The JSON Data Type — The JSON Data Type, validation
8A C# application needs a managed ADO.NET data provider for MySQL. Which connector supplies it?
- A.MySQL Connector/J
- B.MySQL Connector/NETCorrect answer: B
- C.MySQL Connector/C++
- D.MySQL Connector/Python
Explanation: The manual states: "Connector/NET is a fully managed ADO.NET data provider written in 100% pure C#". Connector/NET supplies the requested managed ADO.NET provider; the other connectors target Java, C++, or Python.
Reference: MySQL Connector/NET Developer Guide: Introduction — Chapter 1, Introduction to MySQL Connector/NET
9A client prepares a SQL statement in one session. What happens to that statement when the session ends?
- A.It remains available to all sessions
- B.It remains available only to the next session
- C.It is automatically deallocated by the serverCorrect answer: C
- D.It is committed into the database schema
Explanation: The manual states: "If you terminate a session without deallocating a previously prepared statement, the server deallocates it automatically." Prepared statements are session-specific and are cleaned up at session end.
Reference: MySQL 8.0 Reference Manual: Prepared Statements — Prepared Statements, session scope
10For an updatable view, what does WITH CHECK OPTION prevent?
- A.Updates or inserts that fail the view's WHERE conditionCorrect answer: A
- B.All updates and inserts through the view
- C.All SELECT statements that use the view
- D.Changes to the underlying table made outside the view
Explanation: The manual states: "The WITH CHECK OPTION clause can be given for an updatable view to prevent inserts or updates to rows except those for which the WHERE clause in the select_statement is true." The option restricts writes through the view to rows satisfying its condition.
Reference: MySQL 8.0 Reference Manual: CREATE VIEW Statement — CREATE VIEW, WITH CHECK OPTION
Topics in this practice bank
These topics describe the available practice for MySQL 8.0 Database Developer. Review the examination outline and its sources for scope and allocation details.
Connectors and APIs
- Choose between connectors for a given application
- Demonstrate connector use, management and configuration
- Retrieve data from the database by using a connector
- Handle special values
- Secure credentials and connections
Data-driven Applications
- Use prepared statements
- Set SQL Modes to change MySQL behavior
- Handle and interpret errors and warnings
- Display query results
- Aggregate and summarize data
- Advanced Report Generation
MySQL Schema Objects and Data
- Design, create, and alter views
- Store and process string data
- Store and process numeric data
- Store and process temporal data
- Store and process spatial data
Transactions
- Control transactions in SQL
- Control transactions in applications
- Resolve consistency problems with isolation levels
- Understand locking mechanisms within MySQL
Query Optimization
- Use indexes for optimization
- Analyze queries for optimization
- Rewrite queries for optimization
MySQL Stored Programs
- Create and execute stored routines
- Explain the programming constructs used in stored routines
- Create and execute triggers
- Schedule database operations
JSON and Document Store
- Create and store JSON documents
- Process data in JSON documents
- Explain application development with NoSQL and XDevAPI
- Create and access a document store
- Use MySQL Shell to access document stores
How to use these free practice questions
Choose an answer, check the explanation, and review your progress by chapter. Practice questions and explanations are free to access without signing up.
These are independent study questions, not actual examination items. For examination requirements and official information, view MySQL 8.0 Database Developer details.