SpringData

by Dongsoo Kim


Posted on December 01, 2022


SpringData

-will be updated as my study goes by- I’ve been using Spring Data with JPA throughout the projects and I thought it would be great if I write the overal concepts and features of Spring Data.

1. Object-Relational Mapping(ORM)

Before ORM

For mapping the physical model(relational DB) to the logical model(Java Domain Objects), developers should open a transaction, make a SQL query which returns the records. For each record, system should iterates through each field in a record, extracts field, converts to proper data type, and map to the java object/attributes. And then close the transaction.

With ORM

By declaring metadata(XML/annotations) to map Java classes and attributes to DB tables and columns, Framework then handle actual DB interactions. Code becomes clean and a lot easier to maintain.

What is JPA

JAP is not a framework, it is specification. Framework in this case can be Hibernate, TopLink, Java EE application servers.

Java entities = table
Java attributes = Column//fileds
Entity Manager = CRUD entities

Example of logical and physcial data structure

frame
frame

JPQL(Java Persistence Query Language)

JPQL is the language which interacts with entities and their persistent state. It is portable to any DBMS.



Stop By For A visit

  • Tokyo Japan
  • Email: keepgoingandtrust@gmail.com

Global IT Diplomat, Yeah, That's me!

Global communication, technology, and delivering right services to customers are keys for making better future.

Feel Free to Contact