Showing posts with label Hibernet. Show all posts
Showing posts with label Hibernet. Show all posts

Hibernate - Store and Retrieve Data along with BLOB as XML

Hibernate is an object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database.

Here, i have demostrated basic example to store data along with blob into Database and retrieve from Database.File logic is used to display Blob Data only. While writing your own Logic, you should avoid it.

Before Using this tutorial, You need know how hibernate Configuration "hibernate.cfg.xml" should look like. Read related blog post - Hibernate config file

Hibernet and Hibernet Dialect Properties

Hibernate supports many database.
Following are list of databases dialect type property:

* DB2 - org.hibernate.dialect.DB2Dialect
* HypersonicSQL - org.hibernate.dialect.HSQLDialect
* Informix - org.hibernate.dialect.InformixDialect
* Ingres - org.hibernate.dialect.IngresDialect
* Interbase - org.hibernate.dialect.InterbaseDialect
* Pointbase - org.hibernate.dialect.PointbaseDialect
* PostgreSQL - org.hibernate.dialect.PostgreSQLDialect
* Mckoi SQL - org.hibernate.dialect.MckoiDialect
* Microsoft SQL Server - org.hibernate.dialect.SQLServerDialect