nosql

How are Cassandra's 0.7 Secondary Indexes stored?

£可爱£侵袭症+ 提交于 2019-12-10 16:45:20
问题 We have been using Cassandra 0.6 and now have Column Families with millions of keys. We are interested in using the new Secondary Index feature available in the 0.7 but couldn't find any documentation on how the new index is stored. Is there any disk-space limitation or is the index stored similar to keys in that it's spread over multiple nodes? I've tried combing through the Cassandra site for an answer but to no avail. 回答1: Secondary indexes are stored as Column Families that are not

Main differences/features among the most known NoSQL systems

萝らか妹 提交于 2019-12-10 16:40:10
问题 I have no experience with NoSQL database systems but if I would have to choose one of the most known (MongoDb, Cassandra, CouchDb, Redis), can someone describe the relevant main features/differences of every one? Is there anything I should know with regards to their capabilities that might affect the choice of NoSQL system I use> 回答1: Redis is a key-value store . You can usually insert a primitive value (int, string, bool), or an array of primitives under a single key. Retrieval of data is

Writing a simple group by with map-reduce (Couchbase)

徘徊边缘 提交于 2019-12-10 16:39:51
问题 I'm new to the whole map-reduce concept, and i'm trying to perform a simple map-reduce function. I'm currently working with Couchbase server as my NoSQL db. I want to get a list of all my types: key: 1, value: null key: 2, value: null key: 3, value: null Here are my documents: { "type": "1", "value": "1" } { "type": "2", "value": "2" } { "type": "3", "value": "3" } { "type": "1", "value": "4" } What I've been trying to do is: Write a map function: function (doc, meta) { emit(doc.type, 0); }

Using CouchDb on a android phone and mongodb on the server side

跟風遠走 提交于 2019-12-10 15:53:35
问题 I have the following scenario.I need to have an embedded database(nosql) on Android and i have a master database on the server which should ideally be nosql database.There needs to be syncing between the two.All queries from the mobile will go to the iternal database.We have differnt options 1)Use couchDB on the mobile side and also use couchdb on the server side 2)Use couchDb on the mobile side and use Mongodb on the server side 3)Use sqlLite on the mobile side and use MongoDb/CouchDb on the

MongoDB group with multiple id

拥有回忆 提交于 2019-12-10 15:24:45
问题 I have a set of documents with more than 20 keys in each of them, and the keys vary with documents. Some keys may not be present in all the documents. I am trying to run a MongoDB group operation using the aggregation framework. The query looks something like this - db.collection.aggregate([{'$group': {'count': {'$sum': 1}, '_id': {'location': '$location', 'type': '$type', 'language': '$language'}}}]) In ideal case, it should return the documents where 3 of the keys should be present and

DocumentDB / CosmosDB - Entity with the specified id does not exist in the system

无人久伴 提交于 2019-12-10 15:17:53
问题 i tried to connect documentdb from my asp.net website but i am getting this error. Entity with the specified id does not exist in the system DocumentClientException: Entity with the specified id does not exist in the system code as follows in aspx code behind protected async void Page_Load(object sender, EventArgs e) { Response.Write("Page Load<br/>"); await GetData(); } public async Task GetData() { try { Response.Write("<br/> Get Data function Start<br/><br/>"); using (var client = new

Spring and Mixing SQL and NoSQL db

一曲冷凌霜 提交于 2019-12-10 14:52:01
问题 The answers to my previous post encouraged me mixing SQL and NoSQL db. What is the best practice implementation of two databases in terms of application context configuration and DAO creation? Let's choose Derby as the SQL db and Cassandra as the other one. What I am searching for is e.g. an example appcontext.xml, two DAOs, one implementing CRUD on Derby and the other one ond Cassandra and one (not two) sample unit test using both DAOs simultanously. Tutorials, sample (maven ;-) ) projects,

is there any trick to do wildcards search on apache cassandra?

匆匆过客 提交于 2019-12-10 14:49:36
问题 i need to do something like this on apache cassandra, SELECT * FROM mytable where address = "%indonesia%" any idea how to do it on cassandra? 回答1: Its not supported out of the box. You must maintain your own indices. I would recommend to use "Supercolumn index" or use a order preserving partitioner (e.g. org.apache.cassandra.dht.OrderPreservingPartioner) in conjunction with range queries. Take a look at the slides from Benjamin Black's excellent talk about cassandra and index 回答2: Just to add

Parse.com equivalent to SQL joins

痴心易碎 提交于 2019-12-10 14:14:34
问题 I know that Parse.com is a NoSql database and SQL concepts should not be applied to it , anyway, besides theory, i bet there is a way to do in Parse something like classic SQL joins. For example, assume we have 3 tables/classes in our DB: People, Cities and Countries, with example values in brackets. People: -Name (Mario Rossi) -Age (23) -City (Bologna) Cities: -Name (Bologna) -PostalCode (40100) -Country (Italy) Countries: -Name (Italy) -Continent (Europe) Given this structure, let's say I

Using Spring Data Mongodb, is it possible to get the max value of a field without pulling and iterating over an entire collection?

只谈情不闲聊 提交于 2019-12-10 13:57:34
问题 Using mongoTemplate.find() , I specify a Query with which I can call .limit() or .sort() : .limit() returns a Query object .sort() returns a Sort object Given this, I can say Query().limit(int).sort(), but this does not perform the desired operation, it merely sorts a limited result set. I cannot call Query().sort().limit(int) either since .sort() returns a Sort() So using Spring Data, how do I perform the following as shown in the mongoDB shell? Maybe there's a way to pass a raw query that I