nosql

How can I store a large list in a database

一笑奈何 提交于 2019-12-13 10:17:09
问题 I want to store a large list of urls in a database, each list has an Id and the urls in two different list are most likely not the same, meaning that there is very small intersection between to different list of urls. The size of the list is not know and vary from one list to the other. Currently, I am storing the list as a string in a field of a PostgreSQL database, I know it is not a good solution so I am looking for a better one. Things I came up with are : Store each url in a separate

why is sql vertically scalable and nosql horizontally

自古美人都是妖i 提交于 2019-12-13 08:09:54
问题 I am new to NoSQL and trying to understand it's meaning. I have seen many articles in many different websites that repeat the fact that "SQL DataBases are scaled vertically (by adding CPU/memory) whereas NoSQL DataBases are scaled horizontally (by adding more machines that can perform distributed calculations)". For example these articles: http://dataconomy.com/sql-vs-nosql-need-know/ http://www.thegeekstuff.com/2014/01/sql-vs-nosql-db/ The thing is that I can't understand why. As far as I am

Cosmos DB - Partition key for fixed collections

时光总嘲笑我的痴心妄想 提交于 2019-12-13 07:51:46
问题 Can someone advise how to create Fixed collection (throughput - 400 RU) with logical partition keys? Is it possible? It is necessary for me in order to migrate easily to unlimited collection in the future. Thanks. 回答1: You cannot create a fixed collection with a partition key. Also once a collection is created without a partition key, it cannot be converted to a partitioned one without being migrated form one collection to another. 来源: https://stackoverflow.com/questions/53471683/cosmos-db

Filter products based on the sub child in Firebase

喜你入骨 提交于 2019-12-13 07:42:27
问题 I am trying to figure out how to filter products based on their sub child nodes in Firebase. My setup is as follows: products/ product1 /author: 12345 /title: "Awesome" /description: "more awesome" product2 /author: 67890 /title: "Awesome" /description: "more awesome" How can I query Firebase such that I retrieve only the products for which it holds that child($productId).child(author) equals 12345 ? I tried the following, but that obviously does not work. I need a way to filter on the

How can I make Parse.Query.AND?

試著忘記壹切 提交于 2019-12-13 07:37:32
问题 I need to connect 2 queries in Parse.com with an and, my code is: var queryDeseo1 = new Parse.Query(DeseosModel); queryDeseo1.equalTo("User", Parse.User.current()); queryDeseo1.equalTo("Deseo", artist); queryDeseo1.find({... The result of the .find is all the objects with User = Parse.User.current()) and all the objects with Deseo = artist but I want the objects with the two queries together: User = Parse.User.current()) and Deseo = artist 回答1: You've actually got it setup correctly to do an

Cassandra: copy null

南楼画角 提交于 2019-12-13 07:03:22
问题 I have problem with COPY command in Cassandra. I try move my old database on new server but when I use COPY FROM I receives error: Failed to import 1 rows: ParseError - invalid literal for int() with base 10: 'null', given up without retries Some fields are null and the need to keep this informations. CSV I created with COPY TO: COPY tabel TO './db.csv' WITH NULL='null' If I try make CSV without NULL='null' I receives error: Failed to import 1 rows: ParseError - invalid literal for int() with

Stored MongoDB JavaScript function to move through all child nodes of specified node

喜欢而已 提交于 2019-12-13 06:24:32
问题 I use tree structures with child references(tree structure). Each node has it's ID,reference its childs, its "weight" (positive integer). Can you help me to write an example how to move through all child node's of specified node and agregate(SUM) child's "weight". How can I move througn tree nodes? SOLUTION . Let child's "weight" be additional_time and solving_time. Then let me show code that I use to fill my Mongo base use TreeMongo; db.dropDatabase(); use TreeMongo; db.categoriesPCO.insert(

What is the best way to create a subset of my data in Elasticsearch?

三世轮回 提交于 2019-12-13 06:03:34
问题 I have an index in elasticsearch containing apache log data. Here is what I want to do: Identify all visitors (by ip number) that accessed a certain file (e.g. /signup.php). Do a search/query/aggregation on my data, but limit the documents that are examined to those containing an ip number found in step 1. In the sql world, I would just create a temporary table and insert all the matching IP numbers from step one. Next I would query my main table and limit the result set by joining in my

Class Diagram in Mongodb

和自甴很熟 提交于 2019-12-13 06:00:55
问题 I want to make the UML for my application (i did the inverse, starting by the application because i am a beginner in internet stuff), so my question is: i've Produit which i denormalized, so, it will be copied two times: if it is a product uploaded, then it will have methods like supprimer ( delete ), if it is added to cart, then i will not have the supprimer ( delete ) method, but have enlever_du_panier ( reomve_from_cart ). So how can i show in UML that this method goes only for uploaded

MongoDB Stats for a particular search

谁都会走 提交于 2019-12-13 05:24:28
问题 I'd like to find a function within the MongoDB shell that will let me see how many items are in a particular query. For instance, I want to do something akin to: db.collection.find({category: "Cupcakes"}).stats() and see count, file size, that sort of thing. In MongoJS and other front-end implementations of MongoDb a query returns an object that you can perform a .length method on, like: db.collection.find({category: "Cupcakes"}, function(err, records){ console.log(records.length); // Shows