Graph databases, like Amazon Neptune, are purpose-built to store and navigate relationships. They have advantages over relational databases for use cases like social networking, recommendation engines, and fraud detection, where you need to create relationships between data and quickly query these relationships. There are a number of challenges to building these types of applications using a relational database. You would need multiple tables with multiple foreign keys. SQL queries to navigate this data would require nested queries and complex joins that quickly become unwieldy, and the queries would not perform well as your data size grows over time. At re:Invent 2018, we presented an On-ramp to Graph Databases that provides more information and detail.
Neptune uses graph structures such as nodes (data entities), edges (relationships), and properties to represent and store data. The relationships are stored as first order citizens of the data model. This allows data in nodes to be directly linked, dramatically improving the performance of queries that navigate relationships in the data. Neptune’s interactive performance at scale effectively enables a broad set of graph use cases.
If you already have your data in a graph model, it’s easy to get started with Amazon Neptune. You can load data in CSV or RDF formats and begin writing graph queries with Apache TinkerPop Gremlin or SPARQL. You can use the getting started documentation or view the AWS Online Tech Talk via the links below. We've also consolidated Best Practices for Amazon Neptune as well.
If you'd like to understand how to view your data as a graph, there's a re:Invent 2018 presentation on Working Backwards to your Graph Data Model and Queries with Amazon Neptune along with sample code available on Github.
If you're interested in enabling GraphQL for access to Amazon Neptune, there's an example application showing how to use AWS AppSync GraphQL and Amazon Neptune.
If you'd like to migrate to Amazon Neptune, there's a re:Invent 2018 presentation on Migrating to Amazon Neptune. We also have a utility to convert GraphML data to the Neptune CSV format, and there is a Python Library to help with writing to Neptune from AWS Glue jobs.
Vist the Amazon Neptune Frequently Asked Questions page.
Instantly get access to the AWS Free Tier.
Get started building with Amazon Neptune on the AWS Management Console.