Is there an inbuilt mechanism to control relationship cardinality?

Although a newbie to Neo4j and cypher, I first built an in-memory, dynamic-schema, graph database over 4 decades ago (not industrial scale - just a postgrad project). One really neat feature was the ability to specify the multiplicity of the binary relationship (similar to UML). For example, using "bastardised cypher"
(:Person)-[:HAS_BIOLOGICAL_PARENT]-> [2:2] (:Person)
A person may only have two and only two biological parents (who are persons).
When you tried to add the third parent, the DBMS would throw an exception and not allow it!
Is there any inbuilt mechanism in Neo4j/cypher to do this or, if I want to do something similar, I'd have to "roll my own"?

TIA,
Paolo

Nothing built-in to enforce that constraint that I've seen. Although some of the integrations for Neo4j support this. For example, in the Neo4j GraphQL Library and Neosemantics.

The way to enforce this at the database level would be through the use of a transaction event handler or perhaps by defining an APOC trigger to check that the cardinality constriant isn't violated by the transaction.

Thanks, William @lyonwj; I'll check them out.

Paolo