# UNIQUE Constraints for relationship for example Marriage (:Men)-\[:MARRIED\]-(:Women)

**URL:** <https://community.neo4j.com/t/unique-constraints-for-relationship-for-example-marriage-men-married-women/8545>\
**Category:** Cypher\
**Tags:** cypher\
**Created:** [July 4, 2019, 7:36am UTC](https://community.neo4j.com/t/unique-constraints-for-relationship-for-example-marriage-men-married-women/8545 "2019-07-04T07:36:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubham.jaizz007](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/shubham.jaizz007/32/3828_2.png) [@shubham.jaizz007](https://community.neo4j.com/u/shubham.jaizz007)\
**Post date:** [July 4, 2019, 7:36am UTC](https://community.neo4j.com/t/unique-constraints-for-relationship-for-example-marriage-men-married-women/8545/1 "2019-07-04T07:36:00Z")

</div>

(:Men)-[:MARRIED]-(:Women)

One men should marry one women i want to force this in db how do i implement this using cypher query

---

<div class="post-metadata">

**Author:** ![stefan.armbruster](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/stefan.armbruster/32/74_2.png) [@stefan.armbruster](https://community.neo4j.com/u/stefan.armbruster)\
**Post date:** [July 4, 2019, 4:00pm UTC](https://community.neo4j.com/t/unique-constraints-for-relationship-for-example-marriage-men-married-women/8545/2 "2019-07-04T16:00:07Z")

</div>

Cardinality constraints are not yet implemented, you might see them in an upcoming release.

Meanwhile you can implement that behaviour yourself using a `TransactionEventHandler`.

---

<div class="post-metadata">

**Author:** ![arentschler](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/arentschler/32/1499_2.png) [@arentschler](https://community.neo4j.com/u/arentschler)\
**Post date:** [August 8, 2019, 5:06pm UTC](https://community.neo4j.com/t/unique-constraints-for-relationship-for-example-marriage-men-married-women/8545/3 "2019-08-08T17:06:57Z")

</div>

Hi Stefan -- Any news on implementing "Cardinality Constraints"? This would be very helpful for us to maintain the integrity of our schema. Will Neo4j 4.0 have this?

---

<div class="post-metadata">

**Author:** ![stefan.armbruster](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/stefan.armbruster/32/74_2.png) [@stefan.armbruster](https://community.neo4j.com/u/stefan.armbruster)\
**Post date:** [August 10, 2019, 8:59am UTC](https://community.neo4j.com/t/unique-constraints-for-relationship-for-example-marriage-men-married-women/8545/4 "2019-08-10T08:59:58Z")

</div>

Unfortunately this won't be in 4.0, but it's rather high on the backlog.
