graph RL
database("Database") <-."network"..-> DAO_Implementation
DAO_Implementation <--> DAOinterface("DAO Interface")
DAOinterface <--> service("Servive / service interface")
service <--> controller("Controller")
controller <-."network"..-> client("Client")
subgraph DAO_Implementation
dataSource
entityManager("Entity Manager")
EntityPOJO
end
-
Database:
- Represents a Database Management System (DBMS) where the schema is typically defined using SQL.
-
Data Source:
- Provides configuration details about the database connection, such as URL, username, password, and connection pool configurations.
- In Spring, the
DataSource
symbolizes the connection pool.
-
Entity Manager:
- A module within the Java Spring framework that manages database operations.
- Uses the data source to establish a connection to the database.
-
Entity POJO:
- A Plain Old Java Object (POJO) with Java Spring entity annotations for object-to-relation mapping.
- Helps the Entity Manager convert between Java objects and database records.
-
DAO (Data Access Object):
- Provides an abstraction for database operations.
- Typically an implementation of the DAO Interface.
-
DAO Interface:
- Outlines abstract operations for the DAO.
- In frameworks like Spring Data JPA, some implementations are automatically generated.
-
Service:
- An abstraction layer over database functionality.
- Provides a high-level API for interactions, keeping business logic distinct from data access logic.
-
Controller:
- Manages incoming HTTP requests in the Spring framework.
- Invokes appropriate services and returns HTTP responses, often as JSON or rendered HTML views.
-
Client:
- Represents the end user or system interacting with the web application.