nosql

OrientDB geolocation

落花浮王杯 提交于 2019-12-07 05:59:49
问题 I´m using the OrientDB for NoSQL database, and i dont know how to query in geolocation exactly. I´ve read the specific documentation: OrientDB Functions but does not understand the significance of the values. The distance function: distance() - Computes the distance between two points in the globe using the Haversine algorithm. Coordinates must be as degrees Example: where distance(x, y,52.20472, 0.14056) <= 30 Two questions: What is the X, Y, and the 30 values? Are the values (52.20472, 0

FluentCassandra range selection problem

依然范特西╮ 提交于 2019-12-07 05:23:46
问题 I have a problem in getting some data out from Cassandra using c# and FluentCassandra. In my Cassandra keyspace i have the following super column family definition: <ColumnFamily Name="MySCFName" ColumnType="Super" CompareWith="TimeUUIDType" CompareSubcolumnsWith="AsciiType"/> What i would like to do is run a query on this supercolumnfamily similar to the following in sql: select "something" from MyTable where "timestamp" between "2011-01-01 00:00:00.000" and "2011-03-01 00:00:00.000"

Warning on starting cqlsh

。_饼干妹妹 提交于 2019-12-07 05:06:12
问题 The following warning appears every time I start cqlsh:- warning: pyreadline dependency missing. Install to enable tab completion. Please help me through this.. 回答1: Install pyreadline for DataStax Cassandra Set PATH variable for Python to C:\Program Files\DataStax Community\python 1. Download pyreadline: https://github.com/pyreadline/pyreadline 2. Click on "ZIP" to download a zip file of PyReadline repository 3. Extract to C:\pyreadline 4. At the command prompt: navigate to C:\pyreadline 5.

Google App Engine Datastore / NoSQL example with ancestor queries

大兔子大兔子 提交于 2019-12-07 05:02:27
I'm very used to SQL, and not the NoSQL paradigm of App Engine Datastore, so I had to write a piece of example code to understand how to do ancestor queries correctly. Thought I'd share it with you here; maybe it's interesting to someone. #!/usr/bin/env python # -*- coding: utf-8 -*- import webapp2 from google.appengine.ext.webapp.util import run_wsgi_app import logging from google.appengine.ext import db # MODELS class Child_model(db.Model): name = db.StringProperty() class Parent_model(db.Model): name = db.StringProperty() class Root_model(db.Model): pass # MAIN class MainHandler(webapp2

are adhoc queries/updates starting to kill your productivity with MongoDB?

隐身守侯 提交于 2019-12-07 04:52:58
问题 i've been developing a asp mvc website for almost a year now exclusively on mongodb. i've loved it for the most part. development productivity has been great using a C# mongodb driver and tools like mongovue. however, i've started to reach a point where there are things i really wish i had a SQL server database for. simple tasks like updating a record in the DB and only mildly complex queries to generate some type of report are becoming a pain. i read an article somewhere that in order for

nosql的使用

依然范特西╮ 提交于 2019-12-07 04:28:24
nosql常见的几种类型: 1. k-v存储。(Redis,Memcache) 键值数据库就像在传统语言中使用的哈希表。你可以通过key来添加、查询或者删除数据。 适用场景: 储存用户信息,比如session、缓存html,配置文件、参数、购物车等等。这些信息一般都和ID(键)挂钩,这种情景下键值数据库是个很好的选择。 不适用场景: 直接查找value。 2. 文档数据库(MongoDB、CouchDB) 面向文档数据库会将数据以文档的形式储存。每个文档都是自包含的数据单元,是一系列数据项的集合。每个数据项都有一个名称与对应的值, 值既可以是简单的数据类型,如字符串、数字和日期等;也可以是复杂的类型,如有序列表和关联对象 。数据存储的最小单位是文档,同一个表中存储的文档属性可以是不同的,数据可以使用XML、JSON或者JSONB等多种形式存储。 适用场景: mysql的替代品,需要动态的查询,更偏向与定义索引而非 map/reduce,针对大数据想要更好的性能。例如:日志。企业环境下,每个应用程序都有不同的日志信息。Document-Oriented数据库并没有固定的模式,所以我们可以使用它储存不同的信息 不适用场景: 不支持事务。 3. 列存储。(Cassandra、HBase、Redis) 列存储数据库将数据储存在列族中,一个列族存储经常被一起查询的相关数据。举个例子

Which NoSQL database best for append only audit logging use case?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 03:52:12
问题 My use case is audit logging for resources. For discussion consider a very simple schema: a resource name, access time stamp, and accessing user name. With all the NoSQL options out there, I'm wondering which solution is best for my use case? The resource names are being held in a graph database (Neo4j) and while we could add vertices and edges to an audit vertex connected to the resource vertex, the audit info could be large and I fear pollute a relatively simple graph. I'm currently leaning

couchdb views tied between two databases?

橙三吉。 提交于 2019-12-07 03:10:14
问题 Say I have several databases on my couch instance (in my case a user account database and login session database) The sessions have fields corresponding to a field in the user database. Is there a way to create a view, or make a call that encompasses this correlation, or would it just have to be done with an external script? To be more clear, here's an example. Account db: { "_id": "78555fdfdd345debf427373f9dfaeca4", ... "username" : "bob" } Sessions db: { "_id":

Mongodb remove item from array

主宰稳场 提交于 2019-12-07 02:20:19
问题 I'm trying to remove an element from an array using Java and haven't been successful... I have a "emailsInApp" collection and inside I have this: { "_id" : "750afe", "list" : [ "John@gmail.com", "Mike@gmail.com" ] } { "_id" : "711850", "list" : [ "example@gmail.com" ] } It holds for each id the registered emails. What I would like to do is: given an id and an email, remove that email from that appId. This is what I have atm and when I run it it doesn't change the array at all: DBCollection

Full-text search on MongoDB GridFS?

家住魔仙堡 提交于 2019-12-07 01:26:22
问题 Say, if I want to store PDFs or ePub files using MongoDB's GridFS, is it possible to perform full-text searching on the data files? 回答1: You can't currently do real full text search within mongo: http://www.mongodb.org/display/DOCS/Full+Text+Search+in+Mongo Feel free to vote for it here: https://jira.mongodb.org/browse/SERVER-380 Mongo is more of a general purpose scalable data store, and as of yet it doesn't have any full text search support. Depending on your use case, you could use the