Spring Data JDBC and JPA
Learn about a few interview questions regarding Spring data JDBC and JPA.
We'll cover the following...
- How does Spring provide DAO support?
- Describe Spring DAO support classes.
- What annotation is used to mark DAO in Spring?
- What is Spring data JDBC?
- What tasks are performed by Spring JDBC?
- What is the difference between JDBC and Spring JDBC?
- Name the classes in Spring JDBC API?
- What are the advantages of JdbcTemplate in Spring?
- Why is NamedParameterJdbcTemplate class used?
- How are records from a database fetched when using JdbcTemplate?
- What is the difference between a RowMapper and ResultSetExtractor?
- Explain Spring’s exception handling support with DataAccessException.
- What is SQLExceptionTranslator?
- What are JdbcTemplate callback interfaces?
- What is Spring Data?
- What is JPA?
- What is the difference between JPA and Spring Data JPA?
- What is the difference between CrudRepository and JpaRepository?
- Which No SQL databases does Spring support?
- Which ORMs are supported by Spring?
- What is Hibernate?
- What are the different types of transaction management supported by Spring?
- Which transaction management type is preferred in Spring?
- What are some benefits of using Spring Transactions?
- What happens when the @Transactional annotation is used on a method?
- What is the difference between JdbcTemplate and JPA?
How does Spring provide DAO support?
Spring DAO support makes it easy to work with different data access technologies in a consistent way which makes it easy to switch between technologies like JDBC, Hibernate, or JDO. Main features of Spring DAO support are:
- Exception handling: Technology specific exception like
SQLException
is translated to Spring’sDataAccessException
. Checked exceptions in Hibernate, JPA, and
Access this course and 1400+ top-rated courses and projects.