RushDB
Give your agent a memory.
Push any JSON. Get graph relationships and vector search instantly — no schema, no pipeline, no setup.
Start building free →FAQ
RushDB
Push any JSON. Get graph relationships and vector search instantly — no schema, no pipeline, no setup.
Start building free →FAQ
LLM applications naturally fragment into ETL, embedding, graph sync, search indexing, and metadata pipelines. Learn why this happens and how a single ingestion layer can replace.
Every new agent needs a prompt explaining your tables and fields. RushDB lets agents fetch a structured snapshot of the live graph at runtime.
In the evolving landscape of database technologies, graph databases have emerged as powerful solutions for managing interconnected data. However, most graph databases still require developers to think in terms of nodes, edges, and complex query languages. RushDB introduces a paradigm shift with its Labeled Meta Property Graph (LMPG) architecture – a revolutionary approach that makes properties first-class citizens and enables unprecedented flexibility in data modeling and querying.
What sets LMPG apart is its unified query interface that allows a single Data Transfer Object (DTO) to query Records, Labels, Properties, Relationships, and Available Values across any subgraph perspective. This creates what we call "database self-awareness" – the ability for the system to introspect and optimize queries dynamically based on the property-centric architecture.
Traditional property graphs, while powerful, force developers into rigid thinking patterns:
Consider a typical e-commerce scenario in a traditional property graph:
// Traditional approach - you must know the schema MATCH (product:Product)-[:BELONGS_TO]->(category:Category) WHERE product.price > 100 AND category.name = 'Electronics' RETURN product.name, product.price
This requires understanding:
RushDB's LMPG architecture flips this model on its head by making properties the central organizing principle. In LMPG:
RushDB employs a sophisticated Breadth-First Search (BFS) algorithm to automatically convert hierarchical JSON data into LMPG structures. This process eliminates the need for manual schema design while preserving data relationships.
Let's see how RushDB transforms complex JSON into an LMPG:
Input JSON:
{
"products": [
{
"id": "prod-001",
"name": "Wireless Headphones",
"price": 299.99,
"inStock": true,
"category": {
"name": "Electronics",
"department": "Audio"
},
"specifications": {
"batteryLife": "30 hours",
"connectivity": ["Bluetooth 5.0", "USB-C"],
"weight": 250
},
"reviews": [
{
"rating": 5,
"comment": "Excellent sound quality",
"verified": true
},
{
"rating": 4,
"comment": "Good value for money",
"verified": false
}
]
}
]
}
LMPG Transformation Process:
Resulting Graph Structure:
RushDB automatically enhances each record with metadata:
// RushDB's representation (simplified)
{
"__id": "01968aa4-22c1-781a-8e8c-8fe6be6c3fd4", // UUIDv7
"__label": "Product", // Auto-derived label
"__proptypes": { // Type metadata
"name": "string",
"price": "number",
"inStock": "boolean"
},
"name": "Wireless Headphones",
"price": 299.99,
"inStock": true
}
| Feature | Traditional Property Graph | RDF/Triple Store | Knowledge Graph | LMPG (RushDB) |
|---|---|---|---|---|
| Schema Requirements | Rigid, predefined | Ontology-based | Schema-on-write | Schema-free |
| Query Complexity | High (Cypher/Gremlin) | Very High (SPARQL) | Medium | Low (JSON queries) |
| Property Handling | Node attributes | Triple predicates | Entity properties | First-class citizens |
| Cross-type Queries | Complex joins | SPARQL UNION | Limited | Native support |
| Data Import | Manual modeling | RDF conversion | ETL pipelines |
// Find all items with price > 1000 across different types MATCH (n) WHERE (n:Car OR n:House OR n:Jewelry) AND n.price > 1000 RETURN n.name, n.price, labels(n)
Problems:
# Same query in RushDB - discover ANY record with price > 1000
from rushdb import RushDB
db = RushDB("RUSHDB_API_TOKEN")
results = db.records.find({
"where": {
"price": { "$gt": 1000 }
}
})
Advantages:
One of LMPG's most powerful features is its ability to reveal hidden connections across seemingly unrelated data through property-based traversal.
Consider data from different domains stored in the same RushDB instance:
// E-commerce products
{
"label": "Product",
"name": "Premium Coffee Maker",
"price": 299,
"color": "stainless steel",
"rating": 4.8
}
// Real estate listings
{
"label": "Property",
"address": "123 Main St",
"price": 299000,
"color": "white",
"rating": 4.2
}
// Restaurant reviews
{
"label": "Restaurant",
"name": "Downtown Bistro",
"rating": 4.8,
"color": "modern"
}
// Investment portfolios
{
"label": "Stock",
"symbol": "AAPL",
"price": 299.50,
"rating": 4.5
}
1. Find all highly-rated items regardless of domain:
results = db.records.find({
"where": {
"rating": { "$gte": 4.5 }
}
})
# Returns: Coffee Maker, Restaurant, Stock
2. Price range analysis across all domains:
results = db.records.find({
"where": {
"price": { "$gte": 250, "$lte": 350 }
}
})
# Returns: Coffee Maker, Stock, and potentially Real Estate down payments
3. Color-based aesthetic preferences:
results = db.records.find({
"where": {
"color": { "$in": ["stainless steel", "modern", "white"] }
}
})
# Reveals design preferences across products, properties, and venues
# Find premium experiences (high rating + reasonable price)
results = db.records.find({
"where": {
"rating": { "$gte": 4.5 },
"price": { "$lte": 500 }
}
})
Response structure:
{
"data": [
{ "__label": "Restaurant", "name": "Downtown Bistro", "rating": 4.8, "price": 45 },
{ "__label": "Product", "name": "Coffee Maker", "rating": 4.8, "price": 299 },
{ "__label": "Hotel", "name": "Boutique Inn", "rating": 4.6, "price": 180 }
]
}
RushDB's LMPG architecture seamlessly integrates vector operations as first-class properties, enabling AI-powered insights while maintaining the unified query interface:
# Add vector embeddings as properties
db.records.create({
"label": "Document",
"data": {
"title": "AI Research Paper",
"content": "Large language models have revolutionized...",
"embedding": [0.1, 0.8, -0.3, 0.9, ...], # 1536-dimensional vector
"category": "AI Research",
"publishDate": "2024-01-15",
"citationCount": 42,
"impact_score": 8.7
}
});
The power of LMPG shows in combining semantic similarity with structured property filters:
# Vector similarity search combined with property filtering
similarDocuments = db.records.find({
"where": {
"category": "AI Research",
"publishDate": { "$gte": "2024-01-01" },
"citationCount": { "$gte": 10 },
"embedding": {
"$vector": {
"fn": "gds.similarity.cosine",
"query": queryEmbedding,
"threshold": 0.75 # Interpreted as $gte: 0.75
}
}
},
"limit": 10
})
The same query provides vector insights across all perspectives:
Records Perspective:
// Documents with semantic similarity + structured filters
{
"data": [
{
"__id": "...",
"title": "Transformer Architectures in NLP",
"embedding": [...],
"similarity_score": 0.89,
"__label": "Document"
}
]
}
Properties Perspective:
// Discovers vector properties automatically
{
"data": [
{
"name": "embedding",
"type": "vector",
"dimensions": 1536,
"similarity_function": "cosine"
}
]
}
Relationships Perspective:
// Vector-based relationships discovered
{
"data": [
{
"sourceId": "doc1",
"targetId": "doc2",
"type": "SEMANTIC_SIMILARITY",
"similarity_score": 0.85
}
]
}
This enables powerful hybrid search combining semantic similarity with structured property filters, all through the same unified interface.
Learn more about Vector Search
Traditional database performance degrades with data size and query complexity. LMPG maintains consistent performance through its revolutionary perforating query architecture that skips expensive operations by leveraging properties as dynamic indices.
1. Property-First Indexing:
Traditional JOIN: O(n × m × log(k)) LMPG Traversal: O(p + r)
Where:
2. Perforating Query Execution:
3. Dynamic Index Management:
Properties act as living indices that:
4. Handful Index Optimization:
-- Auto-generated Neo4j indexes for each property CREATE INDEX property_name_string FOR (n:__RUSHDB__LABEL__PROPERTY__) ON (n.name, n.type, n.projectId, n.metadata); CREATE INDEX record_lookup FOR (n:__RUSHDB__LABEL__RECORD__) ON (n.__RUSHDB__KEY__ID__, n.__RUSHDB__KEY__PROJECT__ID__);
RushDB's revolutionary graph perforating architecture achieves unprecedented data observability through a single unified query interface. Unlike traditional databases that require separate APIs for different data perspectives, LMPG enables one query to simultaneously access Records, Labels, Properties, Values, and Relationships.
Consider this complex organizational analysis query that demonstrates cross-entity traversal with multi-level filtering:
// Example: Enterprise Data Intelligence Query
const QUERY = {
labels: ["DEPARTMENT"],
where: {
name: { "$contains": "e" },
PROJECT: {
budget: {
$xor: {
$lte: 10000000,
$gte: 15000000
}
},
EMPLOYEE: {
salary: { $gte: 300000 }
}
}
}
}
This query structure directly maps to graph traversal paths, enabling intuitive nested querying across related entities without complex join syntax:
SDK Call:
# Get actual department records matching criteria records = db.records.find(QUERY)
Generated Cypher Query:
MATCH (record:__RUSHDB__LABEL__RECORD__:`DEPARTMENT` { __RUSHDB__KEY__PROJECT__ID__: $projectId })
WHERE (any(value IN record.name WHERE value =~ "(?i).*e.*"))
OPTIONAL MATCH (record)--(record1:PROJECT)
WHERE ((any(value IN record1.budget WHERE value <= 10000000) XOR
any(value IN record1.budget WHERE value >= 15000000)))
OPTIONAL MATCH (record1)--(record2:EMPLOYEE)
WHERE (any(value IN record2.salary WHERE value >= 300000))
WITH record, record1, record2
WHERE record IS NOT NULL AND (record1 IS NOT NULL AND record2 IS NOT NULL)
RETURN record
SKIP 0 LIMIT 1000
Resulting Data:
{
"data": [
{
"__id": "01974151-41f4-7c7e-a9bd-a28df7703077",
"__label": "DEPARTMENT",
"name": "Research and Development",
"description": "Innovation-focused department driving product evolution",
"headcount": 150,
"budget": 2500000
}
],
"total": 5,
"success": true
}
SDK Call:
# Discover all entity types matching the criteria labels = db.labels.find(QUERY)
Generated Cypher Query:
MATCH (record:__RUSHDB__LABEL__RECORD__ { __RUSHDB__KEY__PROJECT__ID__: $projectId })
WHERE (any(value IN record.name WHERE value =~ "(?i).*e.*"))
OPTIONAL MATCH (record)--(record1:PROJECT)
WHERE ((any(value IN record1.budget WHERE value <= 10000000) XOR
any(value IN record1.budget WHERE value >= 15000000)))
OPTIONAL MATCH (record1)--(record2:EMPLOYEE)
WHERE (any(value IN record2.salary WHERE value >= 300000))
WITH record, record1, record2
WHERE record IS NOT NULL AND (record1 IS NOT NULL AND record2 IS NOT NULL)
WITH DISTINCT record, [label IN labels(record) WHERE label <> "__RUSHDB__LABEL__RECORD__"] as recordLabels
RETURN count(recordLabels) as total, recordLabels[0] as label
Resulting Data:
{
"data": {
"DEPARTMENT": 5,
"EMPLOYEE": 2863
},
"success": true
}
SDK Call:
# Discover available properties across matching entities properties = db.properties.find(QUERY)
Generated Cypher Queries:
-- Get entity-specific properties
MATCH (record:__RUSHDB__LABEL__RECORD__:`DEPARTMENT` { __RUSHDB__KEY__PROJECT__ID__: $projectId })
WHERE (any(value IN record.name WHERE value =~ "(?i).*e.*"))
OPTIONAL MATCH (record)--(record1:PROJECT)
WHERE ((any(value IN record1.budget WHERE value <= 10000000) XOR
any(value IN record1.budget WHERE value >= 15000000)))
OPTIONAL MATCH (record1)--(record2:EMPLOYEE)
WHERE (any(value IN record2.salary WHERE value >= 300000))
WITH record, record1, record2
WHERE record IS NOT NULL AND (record1 IS NOT NULL AND record2 IS NOT NULL)
UNWIND keys(record) as propertyName
RETURN collect(DISTINCT propertyName) as fields
-- Get global property metadata
MATCH (property:__RUSHDB__LABEL__PROPERTY__ { projectId: $id })
RETURN collect(DISTINCT property { .id, .metadata, .name, .type, .projectId }) as properties
Resulting Data:
{
"data": [
{
"id": "01974151-41f3-7ecc-a42c-2a6a336f856f",
"name": "name",
"type": "string",
"metadata": ""
},
{
"id": "01974151-41f4-7c7e-a9bd-a28cffae6594",
"name": "description",
"type": "string",
"metadata": ""
},
{
"id": "01974151-41f5-7635-81a1-budget",
"name": "budget",
"type": "number",
"metadata": ""
}
],
"success": true
}
SDK Call:
# Get distinct values and ranges for specific properties values = db.properties.values(property_id, QUERY)
Generated Cypher Query:
MATCH (record:__RUSHDB__LABEL__RECORD__:`DEPARTMENT` { __RUSHDB__KEY__PROJECT__ID__: $projectId })
<-[value:__RUSHDB__RELATION__VALUE__]-(property:__RUSHDB__LABEL__PROPERTY__ { id: $id })
WHERE (any(value IN record.name WHERE value =~ "(?i).*e.*"))
OPTIONAL MATCH (record)--(record1:PROJECT)
WHERE ((any(value IN record1.budget WHERE value <= 10000000) XOR
any(value IN record1.budget WHERE value >= 15000000)))
OPTIONAL MATCH (record1)--(record2:EMPLOYEE)
WHERE (any(value IN record2.salary WHERE value >= 300000))
AND record[property.name] IS NOT NULL AND property.type <> 'vector'
WITH property, record, record1, record2
WHERE record IS NOT NULL AND (record1 IS NOT NULL AND record2 IS NOT NULL)
WITH record[property.name] AS propValue, property.type AS propType
ORDER BY record.__RUSHDB__KEY__ID__
WITH apoc.coll.toSet(apoc.coll.flatten(collect(DISTINCT propValue))) AS values, propType as type
UNWIND values AS v
WITH values, type,
min(CASE type WHEN 'datetime' THEN datetime(v) ELSE toFloatOrNull(v) END) AS minValue,
max(CASE type WHEN 'datetime' THEN datetime(v) ELSE toFloatOrNull(v) END) AS maxValue
RETURN {
values: values[0..1000],
min: CASE type WHEN 'datetime' THEN toString(minValue) ELSE minValue END,
max: CASE type WHEN 'datetime' THEN toString(maxValue) ELSE maxValue END,
type: type
} AS result
Resulting Data:
{
"data": {
"values": [
"Research and Development",
"Engineering Excellence Division",
"Product Innovation Center",
"Advanced Technology Department",
"Strategic Development Unit"
],
"min": null,
"max": null,
"type": "string"
},
"success": true
}
SDK Call:
# Discover relationships between matching entities relationships = db.relationships.find(QUERY)
Generated Cypher Queries:
-- Get relationship details
MATCH (record:__RUSHDB__LABEL__RECORD__:`DEPARTMENT` { __RUSHDB__KEY__PROJECT__ID__: $projectId })
WHERE (any(value IN record.name WHERE value =~ "(?i).*e.*"))
OPTIONAL MATCH (record)--(record1:PROJECT)
WHERE ((any(value IN record1.budget WHERE value <= 10000000) XOR
any(value IN record1.budget WHERE value >= 15000000)))
OPTIONAL MATCH (record1)--(record2:EMPLOYEE)
WHERE (any(value IN record2.salary WHERE value >= 300000))
WITH record, record1, record2
WHERE record IS NOT NULL AND (record1 IS NOT NULL AND record2 IS NOT NULL)
MATCH (record)-[rel]-(neighbor:__RUSHDB__LABEL__RECORD__)
SKIP 0 LIMIT 1000
RETURN DISTINCT
CASE
WHEN startNode(rel) = record THEN {
sourceId: record.__RUSHDB__KEY__ID__,
sourceLabel: [label IN labels(record) WHERE label <> "__RUSHDB__LABEL__RECORD__"][0],
targetId: neighbor.__RUSHDB__KEY__ID__,
targetLabel: [label IN labels(neighbor) WHERE label <> "__RUSHDB__LABEL__RECORD__"][0],
type: type(rel)
}
ELSE {
sourceId: neighbor.__RUSHDB__KEY__ID__,
sourceLabel: [label IN labels(neighbor) WHERE label <> "__RUSHDB__LABEL__RECORD__"][0],
targetId: record.__RUSHDB__KEY__ID__,
targetLabel: [label IN labels(record) WHERE label <> "__RUSHDB__LABEL__RECORD__"][0],
type: type(rel)
}
END AS relation
-- Get relationship count
MATCH (record:__RUSHDB__LABEL__RECORD__:`DEPARTMENT` { __RUSHDB__KEY__PROJECT__ID__: $projectId })
WHERE (any(value IN record.name WHERE value =~ "(?i).*e.*"))
OPTIONAL MATCH (record)--(record1:PROJECT)
WHERE ((any(value IN record1.budget WHERE value <= 10000000) XOR
any(value IN record1.budget WHERE value >= 15000000)))
OPTIONAL MATCH (record1)--(record2:EMPLOYEE)
WHERE (any(value IN record2.salary WHERE value >= 300000))
WITH record, record1, record2
WHERE record IS NOT NULL AND (record1 IS NOT NULL AND record2 IS NOT NULL)
MATCH (record)-[rel]-(target:__RUSHDB__LABEL__RECORD__)
RETURN count(DISTINCT rel) as total
Resulting Data:
{
"data": [
{
"targetLabel": "PROJECT",
"targetId": "01974151-41f6-78b8-9d4b-ad5bd184baf9",
"type": "RUSHDB_DEFAULT_RELATION",
"sourceId": "01974151-41f4-7c7e-a9bd-a28df7703077",
"sourceLabel": "DEPARTMENT"
},
{
"targetLabel": "PROJECT",
"targetId": "01974151-41f6-78b8-9d4b-ad5190bb4abf",
"type": "RUSHDB_DEFAULT_RELATION",
"sourceId": "01974151-41f4-7c7e-a9bd-a28df7703077",
"sourceLabel": "DEPARTMENT"
},
{
"targetLabel": "COMPANY",
"targetId": "01974151-41f0-7309-946f-2a45a8391ed8",
"type": "RUSHDB_DEFAULT_RELATION",
"sourceId": "01974151-41f4-7c7e-a9bd-a28df7703077",
"sourceLabel": "DEPARTMENT"
}
],
"total": 25,
"success": true
}
This unified approach delivers complete data observability from a single query interface:
Traditional Approach (5 separate API calls):
LMPG Perforating Approach (parallel execution):
The key insight is that RushDB's property-centric architecture allows the same filtered record set to be analyzed from multiple perspectives without re-executing the expensive traversal logic. The WHERE clauses are shared across all perspective queries, enabling massive optimization through result set reuse.
The unified query interface enables powerful real-world applications that would require complex joins and multiple API calls in traditional databases:
E-commerce Intelligence:
# Single query for comprehensive product analysis
products = db.records.find({
"labels": ["Product"],
"where": {
"price": { "$gte": 50, "$lte": 500 },
"rating": { "$gte": 4.0 },
"CATEGORY": {
"trending": True,
"REVIEW": {
"sentiment": { "$gte": 0.7 }
}
}
}
})
# Simultaneously provides:
# - Product records (actual inventory data)
# - Available categories (PRODUCT, CATEGORY, REVIEW entity types)
# - Price/rating distributions (min/max values across properties)
# - Cross-entity relationships (product-category-review connections)
IoT Sensor Analysis:
# Multi-dimensional sensor data analysis
sensors = db.records.find({
"labels": ["Sensor"],
"where": {
"temperature": { "$between": [20, 25] },
"humidity": { "$lte": 60 },
"LOCATION": {
"region": "west-coast",
"BUILDING": {
"efficiency_rating": { "$gte": 4.0 }
}
}
}
})
# Automatic discovery of:
# - Sensor readings (filtered data points)
# - Equipment types (SENSOR, LOCATION, BUILDING labels)
# - Environmental ranges (temperature/humidity distributions)
# - Spatial relationships (sensor-location-building hierarchy)
Financial Portfolio Analysis:
# Complex risk assessment across investment hierarchy
investments = db.records.find({
"labels": ["Investment"],
"where": {
"value": { "$gte": 1000000 },
"PORTFOLIO": {
"risk_score": { "$lte": 7 },
"INVESTOR": {
"net_worth": { "$gte": 10000000 }
}
}
}
})
# Comprehensive risk profiling reveals:
# - Investment instruments (matching financial products)
# - Entity classification (INVESTMENT, PORTFOLIO, INVESTOR types)
# - Value distributions (investment amounts, risk scores, net worth ranges)
# - Ownership networks (investor-portfolio-investment relationships)
Explore Search Capabilities
The most transformative aspect of LMPG is its unified query interface that eliminates the complexity of traditional database interactions:
Key Benefits of the Unified Interface:
This revolutionary approach means developers no longer need to learn separate APIs for different database operations. Whether you need records, schema information, property metadata, value ranges, or relationship mappings - it all comes from the same intuitive JSON query structure demonstrated in the Graph Perforating section above.
The unified query interface opens up entirely new possibilities across multiple domains, enabling sophisticated applications without writing complex database code:
Challenge: Scientific datasets, IoT streams, and user-generated content often have unpredictable schemas and evolving structures.
LMPG Solution: Automatic schema adaptation with unified querying across all data perspectives.
# Automatically catalog any scientific data structure
research_data = db.records.create({
"label": "Experiment",
"data": {
"experiment_id": "EXP-2024-001",
"temperature": 23.5,
"unexpected_compound": "C8H10N4O2", # New discovery
"readings": [1.2, 3.4, 5.6],
"metadata": {
"researcher": "Dr. Smith",
"equipment": "Spectrometer-X200"
}
}
})
# Later, discover all experiments with any temperature data
temperature_studies = db.records.find({
"where": {
"temperature": { "$exists": True }
}
})
# Automatically discover new property types
new_properties = db.properties.find() # Finds "unexpected_compound" property
property_values = db.properties.values(compound_property_id) # Get all compound values
Result: Zero-configuration data cataloging that automatically adapts to new discoveries.
Challenge: Modern AI research requires iterative data exploration, hypothesis generation, and validation across evolving datasets.
LMPG Solution: Unified interface enables AI agents to autonomously explore data relationships and generate research hypotheses.
# AI research agent workflow
class ResearchAgent:
def explore_correlations(self):
# Discover all numeric properties
numeric_props = db.properties.find({"where": {"type": "number"}})
for prop in numeric_props["data"]:
# Get value distributions
distribution = db.properties.values(prop["id"])
# Find correlating entities
correlated_records = db.records.find({
"where": {prop["name"]: {"$gte": distribution["data"]["min"]}}
})
# Discover relationship patterns
relationships = db.relationships.find(correlated_records["query"])
# Generate hypothesis based on discovered patterns
yield self.generate_hypothesis(prop, distribution, relationships)
def validate_hypothesis(self, hypothesis):
# Use unified interface to test hypothesis across all data perspectives
validation_query = {
"where": hypothesis["conditions"]
}
results = {
"records": db.records.find(validation_query),
"patterns": db.relationships.find(validation_query),
"distributions": [db.properties.values(p) for p in hypothesis["properties"]]
}
return self.analyze_validation(results)
Result: AI agents can autonomously discover patterns, generate hypotheses, and validate theories through iterative data exploration.
Challenge: Building sophisticated product filtering requires complex database queries and extensive frontend logic.
LMPG Solution: Unified interface automatically generates filters from data, requires zero manual configuration.
# Auto-generate complete filtering interface
class AutoFilter:
def __init__(self, category="Product"):
self.category = category
def get_filter_options(self):
# Single query gets all filter possibilities
base_query = {"labels": [self.category]}
return {
# Available products
"products": db.records.find(base_query),
# Auto-discovered filter categories
"categories": db.labels.find(base_query),
# All filterable properties
"properties": db.properties.find(base_query),
# Value ranges for each property
"ranges": {
prop["name"]: db.properties.values(prop["id"], base_query)
for prop in db.properties.find(base_query)["data"]
}
}
def apply_filters(self, user_filters):
# User filters automatically become query conditions
filtered_query = {
"labels": [self.category],
"where": user_filters # Direct mapping from UI
}
return {
"products": db.records.find(filtered_query),
"updated_ranges": self.get_updated_ranges(filtered_query),
"related_categories": db.labels.find(filtered_query)
}
# Frontend automatically adapts to any product catalog
auto_filter = AutoFilter("Product")
filter_ui = auto_filter.get_filter_options()
# User applies filters - no backend code needed
user_selection = {
"price": {"$gte": 100, "$lte": 500},
"rating": {"$gte": 4.0},
"brand": {"$in": ["Nike", "Adidas"]},
"CATEGORY": {
"trending": True
}
}
filtered_results = auto_filter.apply_filters(user_selection)
Result: Complete e-commerce filtering interface that automatically adapts to any product catalog without writing filtering logic.
Challenge: Traditional analytical queries require complex aggregations, joins, and pre-computed views.
LMPG Solution: Unified interface enables real-time analytics across any data dimension without pre-configuration.
# Real-time business intelligence dashboard
class RealTimeAnalytics:
def __init__(self):
self.metrics = {}
def get_sales_insights(self, time_range):
base_query = {
"labels": ["Sale"],
"where": {
"timestamp": {
"$gte": time_range["start"],
"$lte": time_range["end"]
}
}
}
# Single unified call gets all analytics
return {
# Core sales data
"sales": db.records.find(base_query),
# Auto-discovered segments
"segments": db.labels.find(base_query),
# All sales dimensions
"dimensions": db.properties.find(base_query),
# Value distributions per dimension
"distributions": {
"revenue": db.properties.values("revenue", base_query),
"products": db.properties.values("product_id", base_query),
"regions": db.properties.values("region", base_query),
"channels": db.properties.values("channel", base_query)
},
# Relationship insights
"correlations": db.relationships.find(base_query)
}
def drill_down(self, dimension, value):
# Dynamic drill-down without predefined hierarchies
drill_query = {
"where": {
dimension: value,
"timestamp": {"$gte": "2024-01-01"}
}
}
return {
"details": db.records.find(drill_query),
"related_dimensions": db.properties.find(drill_query),
"cross_correlations": db.relationships.find(drill_query)
}
# Usage: Real-time dashboard that adapts to any business
analytics = RealTimeAnalytics()
# Get comprehensive sales insights
insights = analytics.get_sales_insights({
"start": "2024-01-01",
"end": "2024-12-31"
})
# Dynamic drill-down based on user clicks
region_details = analytics.drill_down("region", "North America")
product_details = analytics.drill_down("product_category", "Electronics")
Result: Real-time analytics dashboards that automatically discover and visualize any business dimension without pre-configuration.
Challenge: Medical data comes from disparate systems with different schemas and requires complex integration.
LMPG Solution: Automatic schema harmonization enables unified patient views across all medical systems.
# Unified patient data across all medical systems
class MedicalDataIntegration:
def integrate_patient_data(self, patient_id):
# Query across all medical record types
base_query = {
"where": {
"patient_id": patient_id
}
}
return {
# All medical records
"records": db.records.find(base_query),
# Auto-discovered record types
"record_types": db.labels.find(base_query),
# All medical properties
"medical_fields": db.properties.find(base_query),
# Value ranges for medical metrics
"vital_ranges": {
field["name"]: db.properties.values(field["id"], base_query)
for field in db.properties.find(base_query)["data"]
if field["name"] in ["blood_pressure", "heart_rate", "temperature"]
},
# Medical relationships
"care_relationships": db.relationships.find(base_query)
}
def find_similar_cases(self, symptoms, demographics):
# Cross-system case similarity without predefined schemas
similarity_query = {
"where": {
**symptoms, # Any symptom properties
**demographics, # Any demographic properties
}
}
return {
"similar_patients": db.records.find(similarity_query),
"common_patterns": db.relationships.find(similarity_query),
"outcome_distributions": db.properties.values("outcome", similarity_query)
}
# Usage: Instant integration across any medical system
medical = MedicalDataIntegration()
# Complete patient view from all systems
patient_data = medical.integrate_patient_data("PAT-12345")
# Find similar cases for treatment planning
similar_cases = medical.find_similar_cases(
symptoms={"chest_pain": True, "shortness_of_breath": True},
demographics={"age": {"$between": [45, 65]}, "gender": "male"}
)
Result: Unified patient views and intelligent case matching across any medical system without manual integration work.
These examples demonstrate how LMPG's unified query interface eliminates the complexity barrier that typically prevents sophisticated data applications. Developers can now build AI-driven research tools, zero-code filtering interfaces, real-time analytics, and cross-system integrations using the same simple JSON query structure, enabling unprecedented innovation across all domains.
Before (SQL):
SELECT p.name, p.price, c.name as category FROM products p JOIN categories c ON p.category_id = c.id JOIN product_attributes pa ON p.id = pa.product_id JOIN attributes a ON pa.attribute_id = a.id WHERE p.price > 100 AND a.name = 'color' AND pa.value = 'red';
After (LMPG):
const results = await rushdb.records.find({
labels: ['Product'],
where: {
price: { $gt: 100 },
color: 'red'
}
});
Before (MongoDB):
db.products.aggregate([
{ $match: { price: { $gt: 100 } } },
{ $lookup: {
from: "categories",
localField: "categoryId",
foreignField: "_id",
as: "category"
}},
{ $unwind: "$category" },
{ $match: { "attributes.color": "red" } }
]);
After (LMPG):
// Same query as above - LMPG handles relationships automatically
const results = await rushdb.records.find({
where: {
price: { $gt: 100 },
color: 'red'
}
});
The Labeled Meta Property Graph represents a fundamental shift toward property-centric data modeling. As data becomes increasingly interconnected and diverse, LMPG's ability to:
...makes it the ideal architecture for the next generation of data-intensive applications.
LMPG introduces the concept of database self-awareness where:
Key Self-Awareness Features:
1. AI-Native Data Architecture:
2. Real-Time Analytics at Scale:
3. Knowledge Graph Evolution:
LMPG is positioned to transform how organizations handle data complexity:
# Install RushDB SDK npm install @rushdb/javascript-sdk # Or use Python pip install rushdb
# Push any JSON - LMPG structure is created automatically
from rushdb import RushDB
db = RushDB('your-api-key')
customer_data = db.records.create_many({
"label": "Customer",
"data": [
{
"name": "Alice Johnson",
"email": "alice@example.com",
"preferences": {
"color": "blue",
"priceRange": "premium"
},
"orders": [
{"product": "Laptop", "amount": 1299},
{"product": "Mouse", "amount": 79}
]
}
]
})
# Query across all automatically-created relationships
premium_customers = db.records.find({
"labels": ["Customer"],
"where": {
"preferences": {
"priceRange": "premium",
},
"orders": {
"amount": {"$gt": 1000}
}
}
})
RushDB's Labeled Meta Property Graph architecture represents a paradigm shift in database design. By making properties first-class citizens, LMPG enables:
The future of databases is not about forcing data into predefined structures, but about letting the data define its own relationships while providing intelligent optimization. LMPG makes this vision a reality, enabling developers to focus on building features rather than fighting with database schemas.
As applications become increasingly complex and data sources multiply, LMPG's property-centric approach will become the standard for managing interconnected data at scale. The question isn't whether to adopt this architecture – it's how quickly you can start leveraging its power for your applications.
Key Takeaways:
| Auto-normalization |
| Learning Curve | Steep | Very Steep | Moderate | Minimal |