Quick Start
In this short example, you will create a HelixDB instance, write a schema and queries, and run basic queries using the Python SDK.
Install Helix
Install the Helix container using the following command
Design Your Schema
We will be using HelixDB to model the relationships between continents, countries, and cities.
Below is an example of the schema we will be using.
Writing your schema
Write your schema in the newly created schema.hx
file in the helixdb-cfg
directory.
We will be using the following nodes to represent continents, countries, and cities.
We will be using the following edges to represent the relationships between continents, countries, and cities.
Click here for more information about schema definition.
Creation Queries
Creation queries are used to create nodes and edges in the graph. In this case, we will be creating continents, countries, and cities. We will also need a query to specify which city is the capital of a country.
Write your creation queries in the query.hx
file in the helixdb-cfg
directory.
Click here for more information about creation queries.
Read Queries
After creating the nodes and edges, we can now query the graph. Read queries are used to retrieve nodes and edges from the graph. In this case, we will be retrieving all continents, countries, and cities. We will also need a query to retrieve the capital of a country.
Write your read queries in the query.hx
file in the helixdb-cfg
directory.
Check Your Schema and Queries
Using the following command
If you see
“Helix-QL schema and queries validated successfully with zero errors”,
you are ready to deploy your instance!
Deploy Instance
Using the following command
If you see “Successfully started Helix instance”, you are ready to run queries!
Deleting the Instance
You can find your instance ID by running helix instances
.
Next Steps
You’ve learned how to create, deploy, and delete your own instance, as well as how to write and run queries using our SDKs.
Skip the Infrastructure Hassle
Going from local testing to production? Helix Cloud makes it effortless. We handle servers, scaling, and maintenance so you can focus on building your application.
Explore Use Cases
Ready to dive deeper? Check out our guides and tutorials for real-wold use cases and advanced scenarios.
Learn the Language
Get to know HelixQL, our fast, efficient query language built for traversing and manipulating graph and vector data.
Work with the SDK
Build, query, and embed entirely in your language of choice using our Python SDK or TypeScript SDK.
Unlock More Features
Discover everything HelixDB has to offer with our cutting-edge features.