Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

undecaf/hibernate-file-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ This repository is no longer being maintained and has been archived.

Storing files as BLOBs with Spring, JPA and Hibernate ORM

Application servers may store uploaded files in the server's file system and persist only the file paths in a database. Obtaining a consistent backup of such a dataset may be difficult.

This sample project uses Spring, JPA and Hibernate ORM to store uploaded files as BLOBs in a database. MySQL supports 4GB BLOBs, H2 at least 16GB BLOBs and PostgreSQL even 4TB BLOBs. BLOBs are never materialized in memory.

Using BLOBs for file storage can be advantageous since this keeps the complete dataset in a single place (the database); this provides for consistent backups and synchronization in a database cluster.

Within this project, a few additional techniques are mentioned that might be useful.

Subjects

About

Storing files as BLOBs with Spring, JPA and Hibernate ORM

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages