问题标签 [sedna]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
252 浏览

php - sedna 通过 PHP 将插入更新为 Xml

我正在尝试使用此代码将新项目插入 Xml 文件

我知道我的代码会磨损,但我没有找到任何可以帮助我解决此问题的文档或示例:(

0 投票
2 回答
6429 浏览

mongodb - XML versus MongoDB

I have a problem...

I need to store a daily barrage of about 3,000 mid-sized XML documents (100 to 200 data elements).

The data is somewhat unstable in the sense that the schema changes from time to time and the changes are not announced with enough advance notice, but need to be dealt with retroactively on an emergency "hotfix" basis.

The consumption pattern for the data involves both a website and some simple analytics (some averages and pie charts).

MongoDB seems like a great solution except for one problem; it requires converting between XML and JSON. I would prefer to store the XML documents as they arrive, untouched, and shift any intelligent processing to the consumer of the data. That way any bugs in the data-loading code will not cause permanent damage. Bugs in the consumer(s) are always harmless since you can fix and re-run without permanent data loss.

I don't really need "massively parallel" processing capabilities. It's about 4GB of data which fits comfortably in a 64-bit server.

I have eliminated from consideration Cassandra (due to complex setup) and Couch DB (due to lack of familiar features such as indexing, which I will need initially due to my RDBMS ways of thinking).

So finally here's my actual question...

Is it worthwhile to look for a native XML database, which are not as mature as MongoDB, or should I bite the bullet and convert all the XML to JSON as it arrives and just use MongoDB?

0 投票
1 回答
327 浏览

xquery - 条件插入 xquery 失败并出现错误“意外插入,期待其他”

我正在尝试在 Sedna 数据库上执行 xquery 以有条件地更新容器,如下所示

但是这个查询总是失败并出现以下错误

SEDNA 消息:ERROR XPST0003 如果表达式不是 A.1 EBNF 中定义的语法的有效实例,则为静态错误。详细信息:在 (2:8)、语法错误、意外插入、期待 else

该错误表明它正在预期else而不是insert在第二行中。

有人可以帮我理解查询的问题和可能的修复吗?

0 投票
2 回答
4059 浏览

docker - Docker - 增加 /dev/shm 的大小

要运行 Sedna XML 数据库,我需要增加/dev/shm. 现在是64M。

有一些简单的方法可以做到这一点吗?

0 投票
2 回答
2491 浏览

exist-db - 开源 XML 数据库的可扩展性

我们正在寻求开发一个报告应用程序来报告存储在大量 XML 文件中的数据。约 3,000,000 个文件,大小从 7KB 到 5MB 不等(每个文件符合相同的架构)。我猜大概会有大约 200GB 的 XML。我正在查看一些开源 XML 数据库(Sedna、BaseX 和 eXist-db),但我不确定这些系统的扩展性如何,我在这里阅读了这三个数据库的比较。这就是我对可扩展性的担忧的来源。

关于我们想要做的一些细节是: 我们不会更改任何 XML 文件中的数据,并且每天都会添加新文件。因为我们关心报告查询性能对我们来说很重要,所以添加和索引新文件所花费的时间对我们来说并不是一个高优先级。

我想知道是否有人有类似规模使用这些系统的经验?我查看了 BaseX统计页面,看到了一些相当大的 XML 实例,但没有提及性能。

我们不需要开源产品,MarkLogic 系统看起来可以很好地满足要求,但我很好奇开源产品做了什么。

0 投票
1 回答
207 浏览

xml - 返回 XML 数据库中的所有文档

在关系数据库中,我们可以像这样查询所有表:

或者

如何使用 XQuery/XPath 从 Sedna XML 数据库返回所有 xml 文件,就像我们在关系数据库中查询表一样?

如果我可以使用函数,我在哪里可以找到内置 XML 函数的文档。

0 投票
3 回答
564 浏览

xpath - xpath where && 子句

我有这样的xml数据

我想通过电子邮件和密码检索用户的记录(xml格式)过滤。我努力了

但我得到错误。

请问,我怎样才能以 xml 格式检索该用户的数据,以便我可以使用 domdocument 或 simplexmlparser 之类的东西来获取相应的节点?

我的参考是http://www.w3schools.com/xsl/xpath_syntax.asp

0 投票
1 回答
93 浏览

xquery - 本机 xml 数据库中的唯一性插入

我正在开发一个基于 XML 的项目。我使用 Sedna 数据库来存储我的集合(其中包含 XML 文件和它们的 XSD 模式文件)。

我在这些方案中定义了主键/唯一键,但直到现在我可以将重复值(通过 XQuery 更新插入命令)插入主键字段。

0 投票
0 回答
66 浏览

xquery - 将 xsd 文件加载到 Sedna db 中并将唯一元素插入其中

请注意,我正在开发一个基于 Sedna 数据库 3.5 的学术项目,我有一个数据库,它应该包含 4 个 XML 文件,每个文件都有自己的模式文件,第一个问题:如何加载这些 XSD 文件?我曾尝试加载包含 XML 和 XSD 文件的集合,但我认为该集合适用于所有文件的一个架构,并且每个文件都有不同的架构,现在,我正在尝试从 .xml 加载我的 xml 文档。 net 应用程序(不是来自 cmd.exe)当我使用 Sedna .net API 时,我使用 Sedna 上传功能,如:

但是我可以为他们的 xsd 文件做什么???

第二个问题:在我正确加载 xsd 文件后,我有一个在某个文件上插入新节点的查询,但我认为我的架构中的主键/唯一键,但如果我是对的,Sedna 并不关心唯一性,所以我有在插入之前创建一个触发器以检查插入的值是否已经存在,不是吗?如果是这样,我该如何实现这个触发器以及何时调用它(如果我在我的 .net 应用程序中构建它,每次运行应用程序时都会创建它??)

请指教