Data & JPA interview questions

21 Data & JPA questions from the Spring bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

5. Which term means: "the interface you extend to inherit ready-made CRUD, paging, and sorting operations for an entity"?

Mid
  1. A.JpaRepository
  2. B.@Query
  3. C.Derived query method
  4. D.Propagation.REQUIRES_NEW

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

8. Which term means: "an annotation marking a class as a persistent domain object mapped to a database table"?

Junior
  1. A.JpaRepository
  2. B.@Entity
  3. C.Spring Data JPA
  4. D.@Transactional

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

14. Which term means: "an annotation letting you attach a custom JPQL or native statement to a repository method"?

Mid
  1. A.JpaRepository
  2. B.@Query
  3. C.Spring Data JPA
  4. D.Derived query method

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

20. Which term means: "a transaction setting that suspends any existing transaction and always starts a fresh independent one"?

Senior
  1. A.JpaRepository
  2. B.@Query
  3. C.Derived query method
  4. D.Propagation.REQUIRES_NEW

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Data & JPA question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers