nosql

mongodb: use nested document or separate collections with references

烂漫一生 提交于 2019-12-11 11:07:10
问题 I'm just starting with mongoDB. I have to store user data. For each user there will be added a small data record (not more than 500 Bytes) each day or updated some (most of the time not more then 10) of them. Now my question is, should I model this as a Collection of users with the data records embedded in each user document, or having a user collection and a data record collection with a reference from each data document to the user document? 回答1: It all depends on the use case - like nature

How do you figure out how many documents are created per hour in a Firestore collection?

旧城冷巷雨未停 提交于 2019-12-11 10:56:53
问题 What is the best way to figure out how many documents are being created per hour into a Firestore collection. I have created a cloud functions which counts each time a document is added or removed but I can't seem to find a way to figure out the rate at which this is occurring. 回答1: To solve this, you should add to each document in your collection a new property of type Date , that should hold the date and time of its creation. Now you can create a function, in Cloud Functions for Firebase

Distributed Key/Value Stores that can run on Windows, and have .Net clients?

别等时光非礼了梦想. 提交于 2019-12-11 10:44:16
问题 As the title says, does anyone know of any Distributed Key/Value Stores that can run on Windows, and have .Net clients? Thank you Update: Sorry, forgot to add that it needs to be persisted. 回答1: You can use MongoDB, CouchDB or Cassandra. They are more than a key-value-store but they do run on windows and have .net clients. 回答2: Membase is a distributed key-value store that supports Windows and has a .NET client (Enyim). 回答3: App Fabric is Microsoft's solution. RavenDB can probably act as a

What is the best way to perform a subtraction on Cassandra by cqlsh request?

佐手、 提交于 2019-12-11 10:29:22
问题 I am trying to make a cqlsh request on Cassandra. The idea is analyse the average length from different 'gene' registers that had been annotated in a genome. After enter the data, I have this athaliana.tab table: id | chr | comments | end | orf | sense | start | type --------------------------------------+-----+-------------------+----------+-----+-------+----------+------ d2ab2520-6734-11e5-955c-234085c1edec | 1 | gene_id AT1G16340 | 5590338 | 0 | - | 5590241 | CDS d4169c00-6734-11e5-955c

How to count of fields with the same value in elastic.js (elasticsearch)?

我只是一个虾纸丫 提交于 2019-12-11 10:19:57
问题 I have a list of communities. And I need to create aggregation query which will count all data which have the same title. [ { "_id": "56161cb3cbdad2e3b437fdc3", "_type": "Comunity", "name": "public", "data": [ { "title": "sonder", "creationDate": "2015-08-22T03:43:28 -03:00", "quantity": 0 }, { "title": "vule", "creationDate": "2014-05-17T12:35:01 -03:00", "quantity": 0 }, { "title": "omer", "creationDate": "2015-01-31T04:54:19 -02:00", "quantity": 3 }, { "title": "sonder", "creationDate":

Database optimized for searching in large number of objects with different attributes

帅比萌擦擦* 提交于 2019-12-11 10:11:45
问题 Im am currently searching for an alternative to our aging MySQL database using an EAV approach. Current projects seem to have outgrown traditional table oriented database structures and especially searches in such database. I head and researched about various NoSQL database systems but I can't find anything that seems to be what Im looking for. Maybe you can help. I'll show you a generalized example on what kind of data I have and what operations I want to execute on them: I have an object

MongoDB: Efficient schema design with embedded documents

情到浓时终转凉″ 提交于 2019-12-11 10:01:38
问题 I'm very new to NoSQL and I'm trying to wrap my head around it. As an example I am trying to design a schema for a simple blog that has authors who have posts, which have comments. Like so: Author name : String, email : String, posts : [Post] Post title : String, body : String, comments : [Comment] Comment commenter : String, comment : String So this seems to be the most de-normalized way to design the schema. It works great when I want to get a list of an authors posts, but I run into

Best way to structure related data in firebase/firestore and manage updates?

為{幸葍}努か 提交于 2019-12-11 09:55:51
问题 If I have User and Profile objects. What is the best way to structure my collections in firestore given that the follow scenarios can take place? Users have a single Profile Users can update their Profile Users can save other users' profiles Users can deleted their saved profiles The same profile can't be saved twice If Users and Profiles are separate collections, what is the best way to store saved profiles? One way that came to mind was that each user has a sub collection called

Key/Value distributed database for caching binary data

℡╲_俬逩灬. 提交于 2019-12-11 09:32:48
问题 I am looking for distributed kv database for caching small binary objects, like images with TTL. Size limitation is not a problem, as I am planning to split each object anyway, to minimize latency. I need C# and Java drivers, and in very near future I will also need C++ driver. The databases like CouchDb and Redis seems to be document based. Mongo supports binary data and well documented, but it is persistent and I am not sure it is scalable in terms of throughput , Cassandra is also

To start YCSB load with cluster enabled option for REDIS

旧街凉风 提交于 2019-12-11 09:12:27
问题 I am Performing YCSB bench marking on Redis cluster. I have created redis cluster and its working with the following condition. If I specify to enable cluster mode in redis client with -c parameter. The chunks are moved correctly. ./redis-cli -h -c "host ip" -p "port" if I dont specify -c parameter, it moved the chunk with error ./redis-cli -h "host ip" -p "port" SO in YCSB load option, I don't know how to enable the cluster option ( -c parameter). Currently I am using the following conmmand