如何使用gremlin初始化数据库名称?并保存吗? [英] How to initialize database name using gremlin? And save it?

查看:60
本文介绍了如何使用gremlin初始化数据库名称?并保存吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SQL Server端存在查询:创建数据库名称

On the SQL Server side there is the query: CREATE DATABASE name

小鬼怎么办?

我已经启动了gremlin,每次打开笔记本电脑运行数据时,它都会丢失所有数据.我必须重新创建数据.我如何创建数据库,并且每次运行它时,我的数据都会保留下来.对不起,我的英语不好

I have started gremlin and every time I open my laptop, run data, it loses all data. I have to recreate the data. How do I create a database and every time I run it, my data remains. Sorry for my English not good

推荐答案

在您的评论中,您提到您使用的是"tinkerpop".作为您的图形数据库.TinkerPop本身不是图形数据库.我假设您的意思是TinkerPop的图形数据库实现 TinkerGraph .如果使用TinkerGraph,这是有道理的,因为它是内存中的图形数据库.您可以根据需要保留这些数据,但必须告诉TinkerGraph保留.

In your comments you mentioned you were using "tinkerpop" as your graph database. TinkerPop by itself isn't a graph database. I'll assume you meant TinkerPop's graph database implementation TinkerGraph. It makes sense that your data is lost if using TinkerGraph because it is a in-memory graph database. You can persist that data if you like but you have to tell TinkerGraph to do so.

您将需要在TinkerGraph中添加 gremlin.tinkergraph.graphLocation gremlin.tinkergraph.graphFormat 配置.我假设您使用的是.NET,所以您使用的是Gremlin Server,因此您可能只需要将这些设置添加到 conf/tinkergraph-empty.properties 文件中(假设您已经保留了默认文件命名并删除了-of-box配置).

You will need to add gremlin.tinkergraph.graphLocation and gremlin.tinkergraph.graphFormat configurations to TinkerGraph. I assume you are using Gremlin Server since you use .NET so you likely just need to add those settings to the conf/tinkergraph-empty.properties file (assuming you've left the default file naming and out-of-box configuration).

也就是说,TinkerGraph实际上是一个内存图.将数据持久保存到磁盘上对用户来说有点方便,并不意味着需要大量事务.您应该考虑在这些情况下(例如 JanusGraph )在Gremlin Server中配置其他启用了TinkerPop的图形数据库.像 Amazon Neptune 这样的服务.您可以在TinkerPop项目主页.

That said, TinkerGraph is really meant to be an in-memory graph. Persisting data to disk is a bit of a convenience for users and not meant for high transaction use cases. You should consider other TinkerPop-enabled graph databases to configure in Gremlin Server for those situations (like JanusGraph) or perhaps use a service like Amazon Neptune. The fully listing of available graphs you can use with TinkerPop can be found on the TinkerPop project home page.

这篇关于如何使用gremlin初始化数据库名称?并保存吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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