Data & JPA interview questions

21 real Data & JPA questions from the Spring bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is Spring Data JPA?

Junior
  1. A.the abstraction that generates persistence implementations from repository interfaces, reducing boilerplate data code
  2. B.an annotation marking a class as a persistent domain object mapped to a database table
  3. C.a repository method whose database lookup is generated automatically by parsing its name, such as findByLastName
  4. D.a transaction setting that suspends any existing transaction and always starts a fresh independent one
Reveal the answer + AI explanation — free account

2. Which term means: "the abstraction that generates persistence implementations from repository interfaces, reducing boilerplate data code"?

Junior
  1. A.Propagation.REQUIRES_NEW
  2. B.Spring Data JPA
  3. C.@Query
  4. D.Derived query method
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.Spring Data JPA — an annotation letting you attach a custom JPQL or native statement to a repository method
  2. B.Spring Data JPA — a transaction setting that suspends any existing transaction and always starts a fresh independent one
  3. C.Spring Data JPA — an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors
  4. D.Spring Data JPA — the abstraction that generates persistence implementations from repository interfaces, reducing boilerplate data code
Reveal the answer + AI explanation — free account

4. What is JpaRepository?

Mid
  1. A.a transaction setting that suspends any existing transaction and always starts a fresh independent one
  2. B.the interface you extend to inherit ready-made CRUD, paging, and sorting operations for an entity
  3. C.an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors
  4. D.an annotation marking a class as a persistent domain object mapped to a database table
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.JpaRepository — a repository method whose database lookup is generated automatically by parsing its name, such as findByLastName
  2. B.JpaRepository — an annotation marking a class as a persistent domain object mapped to a database table
  3. C.JpaRepository — an annotation letting you attach a custom JPQL or native statement to a repository method
  4. D.JpaRepository — the interface you extend to inherit ready-made CRUD, paging, and sorting operations for an entity
Reveal the answer + AI explanation — free account

7. What is @Entity?

Junior
  1. A.the abstraction that generates persistence implementations from repository interfaces, reducing boilerplate data code
  2. B.a transaction setting that suspends any existing transaction and always starts a fresh independent one
  3. C.an annotation marking a class as a persistent domain object mapped to a database table
  4. D.an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Junior
  1. A.@Entity — an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors
  2. B.@Entity — a transaction setting that suspends any existing transaction and always starts a fresh independent one
  3. C.@Entity — an annotation marking a class as a persistent domain object mapped to a database table
  4. D.@Entity — the abstraction that generates persistence implementations from repository interfaces, reducing boilerplate data code
Reveal the answer + AI explanation — free account

10. What is Derived query method?

Mid
  1. A.the abstraction that generates persistence implementations from repository interfaces, reducing boilerplate data code
  2. B.a repository method whose database lookup is generated automatically by parsing its name, such as findByLastName
  3. C.an annotation letting you attach a custom JPQL or native statement to a repository method
  4. D.a transaction setting that suspends any existing transaction and always starts a fresh independent one
Reveal the answer + AI explanation — free account

11. Which term means: "a repository method whose database lookup is generated automatically by parsing its name, such as findByLastName"?

Mid
  1. A.@Query
  2. B.Derived query method
  3. C.@Transactional
  4. D.Propagation.REQUIRES_NEW
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.Derived query method — an annotation marking a class as a persistent domain object mapped to a database table
  2. B.Derived query method — an annotation letting you attach a custom JPQL or native statement to a repository method
  3. C.Derived query method — a repository method whose database lookup is generated automatically by parsing its name, such as findByLastName
  4. D.Derived query method — a transaction setting that suspends any existing transaction and always starts a fresh independent one
Reveal the answer + AI explanation — free account

13. What is @Query?

Mid
  1. A.the abstraction that generates persistence implementations from repository interfaces, reducing boilerplate data code
  2. B.a transaction setting that suspends any existing transaction and always starts a fresh independent one
  3. C.an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors
  4. D.an annotation letting you attach a custom JPQL or native statement to a repository method
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.@Query — a repository method whose database lookup is generated automatically by parsing its name, such as findByLastName
  2. B.@Query — the interface you extend to inherit ready-made CRUD, paging, and sorting operations for an entity
  3. C.@Query — an annotation letting you attach a custom JPQL or native statement to a repository method
  4. D.@Query — an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors
Reveal the answer + AI explanation — free account

16. What is @Transactional?

Mid
  1. A.an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors
  2. B.an annotation marking a class as a persistent domain object mapped to a database table
  3. C.a repository method whose database lookup is generated automatically by parsing its name, such as findByLastName
  4. D.a transaction setting that suspends any existing transaction and always starts a fresh independent one
Reveal the answer + AI explanation — free account

17. Which term means: "an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors"?

Mid
  1. A.Propagation.REQUIRES_NEW
  2. B.@Query
  3. C.Spring Data JPA
  4. D.@Transactional
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Mid
  1. A.@Transactional — a transaction setting that suspends any existing transaction and always starts a fresh independent one
  2. B.@Transactional — an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors
  3. C.@Transactional — an annotation marking a class as a persistent domain object mapped to a database table
  4. D.@Transactional — an annotation letting you attach a custom JPQL or native statement to a repository method
Reveal the answer + AI explanation — free account

19. What is Propagation.REQUIRES_NEW?

Senior
  1. A.a repository method whose database lookup is generated automatically by parsing its name, such as findByLastName
  2. B.an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors
  3. C.an annotation letting you attach a custom JPQL or native statement to a repository method
  4. D.a transaction setting that suspends any existing transaction and always starts a fresh independent one
Reveal the answer + AI explanation — free account

21. Which statement is correct?

Senior
  1. A.Propagation.REQUIRES_NEW — an annotation that wraps a method in a database transaction, committing on success and rolling back on runtime errors
  2. B.Propagation.REQUIRES_NEW — a repository method whose database lookup is generated automatically by parsing its name, such as findByLastName
  3. C.Propagation.REQUIRES_NEW — a transaction setting that suspends any existing transaction and always starts a fresh independent one
  4. D.Propagation.REQUIRES_NEW — the abstraction that generates persistence implementations from repository interfaces, reducing boilerplate data code
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Data & JPA free