如何在Neo4j中删除/创建数据库? [英] How to delete/create databases in Neo4j?

查看:3431
本文介绍了如何在Neo4j中删除/创建数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以在图表数据库 Neo4j 中创建/删除不同的数据库吗?或者,至少,如何删除现有图的所有节点和关系,以获得干净的设置进行测试,例如使用类似 rmrel rm

Is it possible to create/delete different databases in the graph database Neo4j like in MySQL? Or, at least, how to delete all nodes and relationships of an existing graph to get a clean setup for tests, e.g., using shell commands similar to rmrel or rm?

推荐答案

> rm -rf ,因为Neo4j不存储以下任何内容:

You can just remove the entire graph directory with rm -rf, because Neo4j is not storing anything outside that:

rm -rf data/*

此外,你可以遍历所有节点,删除它们的关系和节点本身,这可能太昂贵,只是为了测试...

Also, you can of course iterate through all nodes and delete their relationships and the nodes themselves, but that might be too costly just for testing ...

这篇关于如何在Neo4j中删除/创建数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆