nosql

MongoDB expression to query array of subdocuments

时光总嘲笑我的痴心妄想 提交于 2019-12-24 10:56:42
问题 I am building an application using MongoDB 4 / Mongoose 5. I have a collection 'records' with an array of subdocuments 'Items'. { RecordID: 1, Items: [ { Title: 'Example Title 1', Description: 'Example Description 1', }, { Title: 'Example Title 2', Description: 'Example Description 2', } ] } I am building a dynamic query generator that creates MongoDB expression operators based on a UI query builder. The dynamic query builder is building the MongoDB expressions correctly. However, the

Cassandra CQL 3.11 - How to use group by?

被刻印的时光 ゝ 提交于 2019-12-24 10:45:51
问题 How to use group by clause in Cassandra 3.11 ? I followed this link - Group by in CQL for Cassandra DB not working although the answer is accepted but when I created the same table and run the query , it is showing different result (not as expected) the steps I followed are - create table hashtags( id uuid, texts text, frequence int, primary key ((texts), frequence, id)) with clustering order by (frequence desc, id asc); then inserted some dummy data - after that run following query - select

Compiling MongoDB C++ driver on Cygwin

梦想与她 提交于 2019-12-24 10:45:05
问题 I junt trying compile the MongoDB C++ driver on Cygwin with the 'scons' command and i getting this follow error: src/mongo/db/nonce.cpp:48:20: error: ‘srandomdev’ was not declared in this scope What lib is that? Thanks. 回答1: The srandomdev function is available in stdlib.h on BSD or OSX systems, not on GNU systems like Cygwin or Linux. It looks like the build script does not recognize the fact that you are running on Cygwin. There are a few options that you can try. The easiest ones are

Get all of a collection's documents id's RavenDB for a “per-document” modification

北城以北 提交于 2019-12-24 10:28:06
问题 I'm currently trying to update my documents in a ravendb DB. The issue is that i have a method that updates one document, yet it takes as a parameter the id of the doc. I'm using python, therefore : pyravenDB as an interface. The method is the following : def updateDocument(self,id,newAttribute) with self.store.open_session() as session: doc = session.load(id) doc.newAttribute= newAttribute session.save_changes() My idea is the i will use a simple for loop with all the id's of the targeted

Whats the right Database System for this

空扰寡人 提交于 2019-12-24 10:01:36
问题 For an application written in Scala I'm looking for the 'best' database system for the following requirements: Good support for queries like: For a node find all connected nodes, all nodes connected via another node with value 'somevalue' Available as a cloud service for 0$ for low volumes of data Good community support and documentation 回答1: Most probably you are trying to store a graph on your database. There are graph databases especially created for storing nodes and connecting nodes with

How to handle data scheme change on non-SQL databases?

感情迁移 提交于 2019-12-24 08:38:24
问题 As I experienced about non-SQL databases, one of biggest problem was schema change. Adding or removing columns on SQL database is easy operation and server guarantees data stability during scheme change. So it can handle data schema changes during service advancing. But how to non-SQL databases (especially objective style systems) handle those schema change? Is there reliable method? 回答1: I agree with Skaffman, non-SQL databases covers a broad spectrum of products. Each one tends to provide

Firebase (Web) can't get orderByChild to work

橙三吉。 提交于 2019-12-24 07:58:08
问题 I know that there are 1,000 answers out there to this question, which is partially why I'm so confused by the fact that I can't get it to work. I can't get the orderByChild query / filter to work. I've looked at at least 25 tutorials, guides, and articles online that explain it and they all seem to say to do exactly what I'm doing: var dbRef = firebase.database().ref(); var filterExperience = dbRef.child("Users").orderByChild('trade_general').equalTo('Construction'); filterExperience.on(

Protocol buffer Database abstraction framework

a 夏天 提交于 2019-12-24 07:46:19
问题 Has anyone heard of an enterprise grade database abstraction layer that builds on Google Protocol Buffers I can foresee such a DB tool set would have great possibilities from mobile computing all the way through to enterprise system development. 回答1: I reckon any key-value store (eg. Redis) will do? Maybe Riak would be a decent candidate as it provides a protobuf API. Eventually all you need to do is handle serialization and deserialization but that should be a rather thin layer on top of a

MongoDB geospatial index on an array (multikey + geospatial)

痞子三分冷 提交于 2019-12-24 07:07:21
问题 Here is a simplified version of my data: > db.foo.insert({"name" : "jim", "locations" : [[10,10],[3,6],[1,2]]}) > db.foo.insert({"name" : "john", "locations" : [[1,5],[2,4]]}) I would like to be able to do things like > db.foo.find( { locations : { $near : [5,5] } } ) Is there a way to create a geospatial index on an array? Doing: > db.foo.ensureIndex({locations: "2d"}) gives the following error: geo values have to be numbers: { 0: [ 1.0, 5.0 ], 1: [ 2.0, 4.0 ] } Any advice or resources would

Exception: cross partition query can not be directly served in Azure Cosmos DB query

浪子不回头ぞ 提交于 2019-12-24 07:07:01
问题 I get the following exception while making a query to Azure Cosmos DB. I am unable to understand the exact problem with this exception. It used to work earlier and I am sure that no recent changes were made to azure cosmos DB. Can anyone suggest how to proceed forward in fixing this exception. DocumentClientException: The provided by the gateway. This is a first chance (internal) exception that all newer clients will know how to handle gracefully. This exception is traced, but unless you see