Skip to main content

Build Knowledge Graphs With ApertureDB

ApertureDB uses a property graph to represent objects and their relationships. Objects form the graph's nodes; directed connections form its edges. Both can have named properties. A Person object, for example, can have a name property and a WorksAt connection to an Organization, with a since property on the connection.

Knowledge graphs can use triple stores or property graphs. In ApertureDB's property graph, the schema describes the classes, connections, and property types represented by stored data. It can evolve as an application adds data.

The Cookbook examples contain queries that create objects and their connections.

Graph Metadata Schema​

The query language adds application-defined Entities and native objects such as Images and Videos, together with their Connections. No schema declaration is needed upfront. Object classes, connection classes, and their properties form the schema as data is added.

The schema is application-dependent and can evolve over time. It includes native object types and the named connections between them. Each object or connection can carry properties relevant to the application.

For example, a retail model can represent customers, products, departments, employees, and store visits as Entities. Video objects hold camera footage, and Descriptors hold feature vectors associated with that footage or its subjects. A department might have a name, location, and associated cameras; a product might have a type and an RFID identifier.

The relational database comparison relates object classes to tables and graph connections to foreign-key relationships. Properties correspond to column values. Graph queries can combine property filters with traversal across connections.

Native objects, including Images and Videos, are represented in this graph. ApertureDB also creates certain connections automatically, including the connection between a Descriptor and its DescriptorSet.

A retail schema can connect customers, visits, products, and recorded media:

png

Additional properties, such as a product's color or pickup count, can be added as the application develops. A visual inspection application can instead represent inspected parts, observations, and associated images:

png

The application's queries and data determine which classes, properties, and connections belong in the model.

info

Indexes speed up query execution. Index kinds support different operations and property types, so index selection depends on the filters and sort operations used by the application.

Inspect the schema​

GetSchema returns classes, connections, property counts, and types. Each property is reported as an object containing count and type. GetIndexes returns index definitions separately.

The schema reference defines the API representation. Transactions and references describes requests that add objects and connect them within one query.