Database constraints for applications using Hibernate

Solution Verified - Updated -

Issue

  • Is it necessary to enforce integrity constraints (primary key, foreign key, unique) in the DB layer if the data is managed exclusively by Hibernate?
    • There is some performance cost related to having these constraints and they can potentially cause locking.

Environment

  • Red Hat JBoss Enterprise Application Plaftorm (all versions)
  • Hibernate (all versions)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content