Inferensys

Glossary

Property Key

A property key is the name or identifier for a specific attribute (e.g., 'name', 'age', 'timestamp') that can be assigned a value on a vertex or edge in a property graph.
Engineer deploying small language model to edge device, IoT sensor visible on desk, technical hardware setup in bright workspace.
GRAPH DATABASE SCHEMAS

What is a Property Key?

A core concept in property graph modeling, defining the attribute identifier for vertices and edges.

A property key is the name or identifier for a specific attribute that can be assigned a value on a vertex or edge in a property graph. It functions analogously to a column name in a relational table, defining the semantic meaning of the data stored, such as name, timestamp, or weight. In a property graph model, both nodes and relationships are containers for these key-value pairs, allowing for rich, schema-flexible data representation. The key itself is a string, while its associated value can be of various data types like integer, string, or boolean.

Within a graph schema language, property keys are formally defined, often with associated data types and constraints to ensure data integrity. They are fundamental to graph query languages like Cypher and GQL, where they are used to filter, return, and set data during pattern matching. Unlike the rigid structure of schema-on-write systems, property keys enable a schema-on-read flexibility, allowing new attributes to be added dynamically. Their effective use is critical for semantic integration pipelines and building coherent enterprise knowledge graphs.

GRAPH DATABASE SCHEMAS

Core Characteristics of a Property Key

A property key is the fundamental identifier for an attribute within a property graph. These characteristics define its role in structuring data, ensuring integrity, and enabling efficient queries.

01

Atomic Identifier for Attributes

A property key serves as the unique name for a specific piece of data attached to a vertex or edge. It is the atomic unit of a property graph's schema, analogous to a column name in a relational table.

  • Key-Value Pair Structure: The property key defines the 'key' in the key-value pair, where the 'value' is the actual data (e.g., name: "Alice", timestamp: 1714070400).
  • Semantic Role: The key itself carries meaning, defining what the attached value represents (e.g., dateOfBirth, purchaseAmount, confidenceScore).
02

Schema Definition & Typing

Property keys are defined within a vertex schema or edge schema, which specifies allowed data types and constraints. This provides structure and data integrity.

  • Data Type Enforcement: A schema can mandate that a salary key must have an INTEGER value, while a department key must be a STRING.
  • Constraint Foundation: Uniqueness constraints and cardinality constraints are often applied based on property keys to enforce business rules (e.g., email must be unique across all Person vertices).
03

Indexing for Performance

Property keys are the primary target for creating graph indexes. Indexing a key allows the database to find vertices or edges by property value without a full graph scan, dramatically accelerating lookup queries.

  • Lookup Optimization: An index on the employeeId property key enables instant retrieval of a vertex when querying WHERE employeeId = 'E12345'.
  • Composite Indexes: Multiple keys can be combined into a single index for queries that filter on several properties simultaneously.
04

Distinction from Labels

It is critical to distinguish a property key from a label. A label categorizes the type of a vertex or edge (e.g., Person, WORKS_FOR), while a property key defines an attribute of that instance.

  • Label = Type: A vertex has a label like Product. This defines its class.
  • Property Key = Attribute: That Product vertex has property keys like sku, price, and weight. These define its specific characteristics.
  • Query Implications: Queries often filter by label first (MATCH (p:Product)) and then by property values (WHERE p.price > 100).
05

Flexibility in Schema Models

The use of property keys varies between schema-on-write and schema-on-read approaches, offering a trade-off between rigor and agility.

  • Schema-on-Write: Property keys must be pre-defined in a strict schema. Attempting to add an undefined key (e.g., color to a Person vertex) will result in an error, ensuring data consistency.
  • Schema-on-Read: Property keys can be added dynamically to any vertex or edge at any time. The structure is interpreted during queries, offering maximum flexibility for evolving or heterogeneous data.
06

Contrast with RDF Predicates

In the RDF triplestore model, the analogous concept to a property key is the predicate in a subject-predicate-object triple. While similar, there are fundamental differences in philosophy and capability.

  • Property Key: Exists within a self-contained vertex/edge structure. A vertex holds its own properties locally.
  • RDF Predicate: Defines a relationship between two resources (the subject and object). Properties are expressed as separate triples (e.g., :alice :hasAge "30"^^xsd:integer).
  • Key Difference: Property graphs natively support properties on relationships (edges), which is a complex pattern to model in pure RDF.
SCHEMA DEFINITION

How Property Keys Function in a Graph Database

A property key is the fundamental identifier for an attribute within a property graph, defining the name of a data field attached to a vertex or edge.

A property key is the name or identifier for a specific attribute that can be assigned a value on a vertex or edge in a property graph. It functions analogously to a column name in a relational table, defining the semantic category of data—such as name, age, or timestamp—independent of any specific value. In a graph schema, property keys are declared with expected data types (e.g., String, Integer) and can be governed by constraints like uniqueness or mandatory presence to enforce data integrity.

During query execution with a language like Cypher or GQL, property keys are used in WHERE clauses for filtering (MATCH (p:Person) WHERE p.name = 'Alice') and in return statements. Their efficient lookup is often accelerated by graph indexes. Unlike the rigid structure of schema-on-write, property keys offer flexibility, allowing new keys to be added to vertices or edges dynamically in a schema-on-read fashion, though this is typically managed within a formal vertex schema or edge schema for production systems.

SCHEMA CONSTRUCTS

Property Key vs. Related Concepts

A comparison of the property key—the identifier for a vertex or edge attribute—against other fundamental schema elements in graph databases and semantic models.

Feature / PurposeProperty KeyLabelRDF PredicateDatabase Column

Primary Function

Names an attribute (key) for a value on a vertex or edge.

Categorizes a vertex or edge into a type (e.g., 'Person', 'WORKS_FOR').

Defines a specific type of relationship or attribute in an RDF triple (subject-predicate-object).

Defines a named field and data type for storing values in a relational table row.

Data Model Context

Property Graph

Property Graph

RDF Graph / Triplestore

Relational Database

Value Assignment

Always paired with a value (e.g., 'name': 'Alice'). The key is the name.

Assigned as a tag; has no inherent value itself.

Connects a subject to an object or literal value. The predicate is the relationship type.

Holds a value for a specific row. The column name is the identifier.

Schema Enforcement Role

Defined by a vertex or edge schema; data type can be constrained.

Often used to define vertex/edge types for schema constraints (uniqueness, cardinality).

Defined in an ontology (RDFS, OWL) to establish a vocabulary with domain/range constraints.

Defined in a table DDL; enforces data type, nullability, and sometimes uniqueness.

Query Language Example

MATCH (p) WHERE p.name = 'Alice' RETURN p.age

MATCH (p:Person) RETURN p

SELECT ?person WHERE { ?person foaf:name 'Alice' }

SELECT age FROM persons WHERE name = 'Alice'

Uniqueness Scope

Not unique by default. A uniqueness constraint can be applied per label.

Not unique. Many vertices/edges can share the same label.

Not unique. A predicate can be used in countless triples.

Not unique by default. A UNIQUE constraint can be applied to the column.

Relationship to Entity

Attribute of an entity (vertex) or connection (edge).

Type of the entity (vertex) or connection (edge).

The link or property that describes the relationship between two entities.

Attribute of an entity represented as a table row.

Composite Structures

Single key. Composite properties are modeled as multiple separate keys.

Single tag. A vertex/edge can have multiple labels in some systems.

Single URI. Complex relationships require intermediate nodes or reification.

Single column. Composite data requires multiple columns or a separate table.

DATA MODELING PATTERNS

Common Property Key Examples

Property keys define the attributes of entities and relationships in a property graph. These examples illustrate common patterns for modeling identity, temporal data, relationships, and metadata.

01

Core Entity Identifiers

These keys uniquely identify and describe the primary entities in a graph.

  • id or uuid: A system-generated, globally unique identifier for a vertex or edge, ensuring referential integrity.
  • name: A human-readable label for an entity, such as a person's full name or a product's title.
  • email: A unique contact identifier for a Person or User vertex, often used for lookups and authentication.
  • sku (Stock Keeping Unit): A unique alphanumeric code for a Product vertex in inventory or e-commerce graphs.
02

Temporal and Versioning

Keys that track the lifecycle and history of graph elements, essential for auditing and temporal queries.

  • createdAt and updatedAt: ISO 8601 timestamps recording when a vertex or edge was created and last modified.
  • validFrom and validTo: Timestamps defining the active period for a fact in a temporal knowledge graph, enabling historical queries.
  • version: An integer or semantic version string tracking revisions of an entity's state, supporting schema evolution and rollback scenarios.
03

Relationship Attributes

Properties that quantify or qualify the connections (edges) between vertices, adding semantic depth.

  • weight or strength: A numerical value (e.g., 0.75) on a KNOWS or SIMILAR_TO edge, often used in graph algorithms like PageRank or community detection.
  • since: A date property on a WORKS_FOR or MEMBER_OF edge, indicating when the relationship began.
  • role: A string specifying the function within a relationship, such as "project_lead" on a ASSIGNED_TO edge between a Person and a Project.
04

Geospatial and Location

Keys for storing coordinates and spatial metadata, enabling location-based queries and analytics.

  • latitude and longitude: Decimal degree coordinates for a Location or Store vertex.
  • address: A full textual address, which can be geocoded into separate components (street, city, postal code) as individual properties.
  • geohash: A compact string encoding of geographic coordinates, useful for efficient proximity searches and spatial indexing.
05

Metadata and Provenance

Properties that describe the origin, quality, or administrative status of the data itself.

  • source or sourceUri: A URL or system identifier documenting where the data originated, a key aspect of semantic data governance.
  • confidence: A score (e.g., 0.0 to 1.0) indicating the reliability of a fact, often populated by entity resolution or knowledge graph completion algorithms.
  • lastVerified: A timestamp showing when the property value was last confirmed against a trusted source.
06

Domain-Specific Attributes

Examples of specialized property keys from key enterprise verticals.

  • Finance: amount, currency, transactionDate on a TRANSFERRED edge.
  • Healthcare: dosage, frequency, startDate on a PRESCRIBED edge in a clinical knowledge graph.
  • Supply Chain: quantity, unitCost, estimatedArrival on a CONTAINS edge between a Shipment and a Product.
  • Cybersecurity: severityScore, firstSeen, ttp (Tactics, Techniques, and Procedures) on an INDICATOR_OF edge.
PROPERTY KEY

Frequently Asked Questions

A property key is the fundamental identifier for an attribute within a property graph. These questions address its role, definition, and practical application in graph database schemas.

A property key is the name or identifier for a specific attribute that can be assigned a value on a vertex (node) or edge (relationship) in a property graph model. It functions analogously to a column name in a relational table, defining the semantic meaning of the data stored, such as name, age, timestamp, or weight. The combination of a property key and its associated value forms a key-value pair that is attached directly to graph elements, enabling rich, semi-structured data modeling where different entities of the same type can have different sets of properties.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.