This project is a basic demonstration of setting up Hibernate for Spring applications to perform object-relational mapping (ORM).
Practiced Concepts:
-
Hibernate Configuration: Configured Hibernate through
hibernate.cfg.xml
, specifying database connection details, dialect, and other properties. -
Persistence Annotations: Utilized Hibernate's persistence annotations such as
@Entity
,@Table
,@Id
,@GeneratedValue
, and@Column
to map Java entities to corresponding database tables and columns. -
Fetch Types: Explored different fetch types to control how related entities are loaded from the database.
-
Cascading: Learned about cascading operations to automatically propagate changes from parent entities to associated child entities.
-
Caching: Explored caching mechanisms in Hibernate to improve application performance by reducing the number of database queries.
-
Session Management: Managed Hibernate
SessionFactory
using a utility class (HibernateUtil
) to establish and close database sessions efficiently. -
Transaction Handling: Implemented transaction management using
Transaction
objects to ensure data consistency and integrity during database operations. -
Persisting Data: Practiced persisting data to the database using Hibernate's session API.
Through this project, I've gained practical experience in setting up Hibernate within a Spring application, defining entity mappings, managing sessions and transactions, and persisting data to the database efficiently. These skills are essential for building robust and scalable Spring applications that interact with relational databases using ORM frameworks like Hibernate.
This project provides a basic banking system with CRUD operations, exception handling, pagination, validation, and a Thymeleaf-based UI.
Practiced Concepts:
- CRUD Operations: Practiced CRUD (Create, Read, Update, Delete) operations using Spring Data JPA for database interaction.
- Pagination: Implemented pagination with Spring Data JPA to efficiently retrieve large datasets by breaking them into manageable chunks.
- Validation: Utilized validation to ensure data integrity and enforce constraints on user input, improving the overall quality of the application.
- H2 DB: Employed H2 Database for its simplicity and convenience during development and testing, providing fast and lightweight data storage.
Through this project, I gained practical experience in setting up Spring Data JPA and H2 Database, as well as performing CRUD operations and implementing pagination.