问题标签 [non-relational-database]
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.
python - 设计 Django MongoDB Engine 外键列表
当我们使用 Django MongoDB Engine 实现 ManyToManyField 时,我们可以这样设计它:
上面的将字段“成员”存储为 mongodb 中的 mongodb ID 列表。喜欢"members" : [ ObjectId("4e46434741b6994c70000000") ]
我们还可以将 MongoDB id 存储为字符串:
上面的一个将字段“members”作为字符串列表存储在 mongodb 中。喜欢
"members" : [ "4e46434741b6994c70000000" ]
我的问题是,这些结构中的哪一种对 mongodb 查询更有效?
python - 我的项目有什么错误?
我在我的 python(2.7) 项目中使用 mongodb 和 django 框架..当我给 python manage.py runserver 它会工作但是如果我同步 db (python manage.py syncdb) 终端中显示以下错误
和
如何解决这个问题呢?
database-design - Modeling a NoSQL database (DynamoDB) for different sorting queries
I have somewhat of a specific question regarding how to model my DynamoDB tables so that I can handle the necessary queries.
My application is centered on the idea of "events." Every event has attributes (name, location, time, number of attendees, etc). Events are associated with the cities in which they are located. I am trying to figure out how to perform a get / query request (probably a series of get / query requests) to obtain the top 25 events with the most attendees for a specific city.
I come from a background of relational databases, and this would be a really simple query (select * from events where city = x order by attendees limit 25). But I am having a hard time figuring out how to do the same with a non-relational database. I know I will have to create additional tables to store mappings of hashes, but I can't seem to figure it out.
One way I have thought of implementing it is to somehow let the "attendees" (of Number type) be the range key, and let the city be the hash key. But this will not necessarily be a unique key because multiple events in the same city could have the same number of attendees. Also, is it even possible to "update / atomically increment" a range key?
Thanks for all your help!
amazon-web-services - AWS NoSQL 或 AWS RDS,存储社交图的好方法是什么?
最近我想将一些社交图信息存储到我们的数据库中,并且用户通过在具有社交图的服务器端发生的自动“映射”来发现新的社交节点。
背景: 每次有新客户访问时,我都会从其他来源存储他/她现有的社交节点,一个很好的例子是 Facebook。所以我有一个 Facebook 好友列表以及该客户的 Facebook ID,并将它们存储在我的数据库中。然后,服务器尝试将客户端好友列表中的每个项目与现有客户端进行匹配。如果匹配,则表示该客户有朋友使用我的服务。然后服务器返回一个匹配列表并在边缘的另一侧标记匹配。下次客户的朋友回来时,他们也会收到匹配完成的通知。
障碍: 我的问题是这种机制需要服务器存储客户社交图的完整列表,在我的示例中,这是客户的 Facebook 朋友的完整列表。由于这个社交图可以任意大,我当然不能将它存储到一个项目中,而是将它跨越多个项目或行,并使用客户 ID 和朋友 ID 对。如果我以这种方式存储它,那么密钥可能分布不均,这意味着我无法使用 DynamoDB。但是,我想探索将其存储在某些 AWS NoSQL 服务中以获得快速访问优势的可能性。
那么有没有很好的方法将这些数据存储在 AWS NoSQL 服务器中?或者我们可以做哪些优化来将它们放入 RDS 但不会损失太多效率?
ravendb - RavenDB:足够高效吗?
我的老板让我考虑迁移到像 RavenDB 这样的非关系型数据库。据我了解,我将不得不用 C# 重写我所有的存储过程。您能否告诉我使用 RavenDB 是否是一个好主意,它是否足够高效?
谢谢。
python - 如何使用 GAE 数据存储对合同数据库(具有多个买家或卖家)进行建模
我是编程新手,我正在尝试掌握 GAE 数据存储的概念。我正在尝试构建一个应用程序以简化编写合同(http://contractpy.appspot.com),我想知道:如何为数据库建模以记录合同(考虑到合同可以有几个人在交易的同一侧)?
在关系模型中,我将执行以下操作:为人员创建一个表,然后为合同创建一个表,并参考参与该合同的人员创建第三个表。看起来像这样(我猜):
我的问题是:在 GAE 数据存储中执行此操作的最佳方法是什么?我在下面画了一个草图,但我不确定这是使用 GAE 数据存储非关系概念的正确思维方式。
我在 Python 2.7 中使用 GAE。
提前感谢您的任何帮助/建议!
database - adabas系统日期
我需要数据库的系统日期,数据库是adabas
. Attunity 使用访问数据库,我在 google 或官方网站上没有找到任何信息。
类似于 Oracle 数据库中的内容:
mapreduce - Couchdb:关系数据库功能
假设我有一个包含 239800 个文档的列表,如下所示:
我知道我可以通过doc.data.age
, doc.data.income
,来索引文档height
,dumplings_consumed
并在为每个参数提供一个范围之后获取文档列表,但是如何获得如下查询的结果:
年龄在 25 到 30 岁之间、收入低于 10 美元且身高超过 7 英尺的医生名单?
有没有办法让多个索引工作?
mongodb - Mongodb - 事件的数据类型
我是 Mongo DB 初学者。
我必须创建一个可以存储事件的集合。事件中的所有文档都将具有 FROM_TIME 和 TO_TIME 键,其值可以如下变化:
- {FROM_TIME:“1939 年 9 月 1 日”,TO_TIME:“1945 年 8 月”}
- {FROM_TIME:“1947 年 8 月 15 日”,TO_TIME:“1947 年 8 月 15 日”}
- {FROM_TIME:“1857”,TO_TIME:“1858”}
- {FROM_TIME :“1944 年 12 月 7 日 11:00”,TO_TIME :“1944 年 12 月 7 日 14:40”}
- {FROM_TIME:“1971 年 1 月”,TO_TIME:“1972 年 11 月”}
鉴于 FROM_TIME 和 TO_TIME 的随机发生,是否可以查询以下事件:
- 19世纪下半叶事件列表
- 8 月 15 日的事件列表等等。
我要求这里的人们提供线索,以防我需要重新考虑我的集合的结构,因为我对 Mongo(或任何其他非关系)DB 非常天真。
* * *第一次编辑从这里开始
我写了以下代码:
在这里,我愚蠢地使用 String 来存储不完整的日期,但是我应该如何存储像 1992、2001、2012 这样的一年或像 January、September 或像 August 2010 这样的一个月?我不确定我是否期待正确的事情!请指导我如何处理这种“不完整”的时间安排。
* * *第一次编辑到此结束
xml - When is a semi-structured data model more appropriate than a structured one?
Let's consider a semi-structured data model like XML and a structured one like the well known relational data model.
When is better to store the data in a XML database instead of a relational dbms ?
It obviously depend on the kind of data that we want to manage, but is there a specific kind of data for which it is definitely better to use a XML database?
The only advantage I can see with XML is that we can save memory if we have entities with a lot of null values which change only in respect to the value of an attribute 'type'. In a XML file we simply do not store the attributes that would be null in a relational table.
It seems to me that there is a lot more to that, but I am clueless.