QuizzesMySQL with Spring Boot / JDBC — Concept Check
intermediate
mysql

MySQL with Spring Boot / JDBC — Concept Check

Questions on MySQL with Spring Boot / JDBC. Configure spring.datasource.url with the JDBC URL, driver-class-name=com.mysql.cj.jdbc.Driver, and HikariCP pool settings; use Flyway or Liquibase for schema migrations.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on MySQL with Spring Boot / JDBC — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.You notice that your Spring Boot application is running slowly under load. The database connections seem to be exhausted. What is a likely configuration change to help alleviate this issue?

    • AIncrease the HikariCP maximum pool size
    • BEnable SSL in the JDBC URL
    • CChange the JDBC driver to a different vendor
    • DDecrease the HikariCP idle timeout
  2. 2.A developer reports that schema changes are not being applied when the application starts. What could be the reason?

    • AFlyway is not on the classpath
    • BHikariCP pool size is too low
    • CThe JDBC URL is missing serverTimezone
    • Dspring.jpa.hibernate.ddl-auto is set to validate
  3. 3.You have set 'spring.jpa.hibernate.ddl-auto=create' in production. What is a potential risk of this configuration?

    • AIt will disable second-level caching
    • BIt can lead to data loss by dropping existing tables
    • CIt will prevent Flyway from running migrations
    • DIt will cause connection leaks in HikariCP
  4. 4.After adding a new column to a table, you notice that the application still throws errors about the column not existing. What might be the issue?

    • ASSL is not enabled in the JDBC URL
    • BJPA batch size is not configured
    • CFlyway migration script has not been executed
    • DHikariCP pool size is too small
  5. 5.A Spring Boot application is configured with 'spring.jpa.open-in-view=true'. What is a potential problem with this setting?

    • AIt prevents HikariCP from managing connections
    • BIt can lead to lazy loading exceptions in the view layer
    • CIt will disable Flyway migrations
    • DIt forces all queries to be executed eagerly
  6. 6.Which configuration option is necessary to ensure that Flyway runs migration scripts at application startup?

    • Aspring.jpa.hibernate.ddl-auto=update
    • Bspring.datasource.hikari.maximum-pool-size=10
    • Cspring.jpa.show-sql=true
    • Dspring.flyway.enabled=true
  7. 7.You notice that your application logs are cluttered with SQL statements. Which configuration change can reduce this verbosity?

    • ADisable Flyway baseline-on-migrate
    • BIncrease HikariCP maximum pool size
    • CUse a different JDBC driver
    • DSet spring.jpa.show-sql=false
  8. 8.What is the role of HikariCP in a Spring Boot application with MySQL?

    • AHandles schema migrations
    • BProvides JPA entity mapping
    • CEnables second-level caching
    • DManages database connection pooling