r/Neo4j • u/Altruistic_Part_9233 • 5h ago
Neo4j v Postgres - Updating Legacy Instance and Migrations
My organization, a think tank analyzing foreign policy, is starting to think about data architecture properly. For the past half-decade we’ve used Word Documents/Excel Sheets and ArcGIS Online (AGO) as our primary data stores (look, I was just hired don’t get at me for that…). Before that, our data was stored in a Neo4j instance for about a dozen years or so. We are currently reviving the Neo4j instance and working with an AI company to turn the old Word and Excel data into properly formatted data; we are also considering using ArcGIS Enterprise to better manage our geospatial data.
Over the past year I stood up a Postgres instance to better track some of our entity data and automate our geospatial data storage/processing. I have argued that we should in fact go with Postgres as our future canonical data store over Neo4j, especially since the schema I’m designing for Postgres would already store relationships/edges as entities.
My questions to yall are whether a) the migration to Postgres would be that hard for the legacy Neo4j data, and b) what capabilities does Neo4j have for the data and workflow processes our organization needs?
Those capabilities are:
• Connecting to a Blob/S3 store that will hold scraped GeoJSONs, raw text and media from social media
• Editing and storing edited versions of text
• In Postgres, the thought behind this requirement goes like this: draft text data is stored in a “staging” table in a JSONB format. diff-path-match in a GUI displays the text as edited (basically, building tracked changes). Changes to data can get stored as lessons/rules which our scraper and text processing bots can use for improvement. We currently don’t have great storage for our QAQC rules, so this is something I’d really like to have.
• We’d also need to be able to attach text data to event data quickly. In Postgres my thought is using pgvector/tsvector/pg_trgm/ltree to aid a text processing bot in identifying events multiple textual documents are referring to, plus giving the GUI to select text and automatically associate it with an entity/event.
• Editing and processing geospatial data including massive amounts of point data from FIRMS, AIS data, etc; and polygon data for area processing, trend detection, geofencing, including data from OSM and Wikimapia. This data would be processed within the ArcGIS Enterprise ecosystem and need to be displayed quickly in Arc layouts.
• Storing and processing large tabular datasets like economic data, casualty data, inventories, etc
• Displaying and querying relationship connections for multi-tiered entity relationships, like Chinese government organizations
- Processing Raster data and using ArcGIS to connect found features/sites in the data to other datasets
• Doing all of this live in the same database. For example, being able to do some of the geospatial stuff but not all of it, or some tabular stuff in a smaller non-Neo4j database that connects to Neo4j doesn’t really cut it.
• Even if we do go Postgres, we’d likely have to keep Neo4j as a place to display our entity data as a graph. Don’t think there’s a way to convince leadership to go with a Postgres-based graph display over a Neo4j instance leadership designed (which I get… my Postgres bias is partly because I designed our current instance).
• All of this should ideally be done within a server Neo4j will manage, so any extensions they can’t run don’t really apply here. Same for Postgres, as we’d likely end up running Postgres within Azure Flexible
-