What is an OGM ?

An OGM (Object Graph Mapper) maps nodes and relationships in the graph to objects and references in a domain model. Object instances are mapped to nodes while object references are mapped using relationships, or serialized to properties (e.g. references to a Date). Graph objects properties are mapped to node or relationship properties. An OGM abstracts the database and provides a convenient way to persist your domain model in the graph and query it without using low level drivers. It also provides the flexibility to the developer to supply custom queries where the queries generated by the OGM are insufficient.

Introducting the Neo4j-PHP-OGM

Developing PHP Business Applications often requires mapping rich domain models to your database. The Neo4j-PHP-OGM library is a pure PHP library that can persist (annotated) domain objects using Neo4j. It uses Cypher statements to handle those operations in Neo4j.

The OGM supports tracking changes to minimize necessary updates and transitive persistence (reading and updating neighborhoods of an object).

The connection to Neo4j handled by a driver layer, which can use the binary protocol or HTTP APi's.