简体   繁体   中英

What is a store in spring data jpa?

In the Spring Data JPA documentation, they are often referring to the word store . One such line from documentation is:

If you use the repository abstraction for any other store, you need to change this to the appropriate namespace declaration of your store module. In other words, you should exchange jpa in favor of, for example, mongodb.

What is the actual meaning of store ?

Does jpa represent only relational databases in the context of store ?

Similarly we can have annotations based on store like @EnableJpaRepositories and @EnableMongoRepositories . Why do we have seperate annotations? I will appreciate clarification.

A "Store" is where you "store" (save) your data.

It's a more generic term covering both databases and non-databases.

Also commonly called a "Data Store", eg see Wikipedia :

A data store is a repository for persistently storing and managing collections of data which include not just repositories like databases, but also simpler store types such as simple files, emails etc.


JPA means Java Persistence API, eg see Wikipedia :

The Java Persistence API (JPA) is a Java application programming interface specification that describes the management of relational data in applications using Java Platform, Standard Edition and Java Platform, Enterprise Edition.


If you look at the Spring Data site, you'll see that is supports a lot of different data access technologies :

  • Spring Data JDBC
  • Spring Data JDBC Extensions
  • Spring Data JPA
  • Spring Data LDAP
  • Spring Data MongoDB
  • Spring Data Redis
  • Spring Data REST
  • Spring Data for Apache Cassandra
  • Spring Data for Apache Geode
  • Spring Data for Apache Solr
  • Spring Data for Pivotal GemFire
  • Spring Data Couchbase
  • Spring Data Elasticsearch
  • Spring Data Envers
  • Spring Data Neo4J
  • Spring for Apache Hadoop

JDBC and JPA can both be used to access relational databases.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM