nosql

Is an ORM redundant with a NoSQL API?

北慕城南 提交于 2019-12-20 17:35:27
问题 with MongoDB (and I assume other NoSQL database APIs worth their salt) the ways of querying the database are much more simplistic than SQL. There is no tedious SQL queries to generate and such. For instance take this from mongodb-csharp: using MongoDB.Driver; Mongo db = new Mongo(); db.Connect(); //Connect to localhost on the default port. Document query = new Document(); query["field1"] = 10; Document result = db["tests"]["reads"].FindOne(query); db.Disconnect(); How could an ORM even

SQL vs NoSQL for an inventory management system

我们两清 提交于 2019-12-20 12:46:07
问题 I am developing a JAVA based web application. The primary aim is to have inventory for products being sold on multiple websites called channels. We will act as manager for all these channels. What we need is: Queues to manage inventory updates for each channel. Inventory table which has a correct snapshot of allocation on each channel. Keeping Session Ids and other fast access data in a cache. Providing a facebook like dashboard(XMPP) to keep the seller updated asap. The solutions i am

Most Efficient One-To-Many Relationships in Google App Engine Datastore?

柔情痞子 提交于 2019-12-20 10:43:53
问题 Sorry if this question is too simple; I'm only entering 9th grade. I'm trying to learn about NoSQL database design. I want to design a Google Datastore model that minimizes the number of read/writes. Here is a toy example for a blog post and comments in a one-to-many relationship. Which is more efficient - storing all of the comments in a StructuredProperty or using a KeyProperty in the Comment model? Again, the objective is to minimize the number of read/writes to the datastore. You may make

ElasticSearch returning only documents with distinct value

百般思念 提交于 2019-12-20 10:36:09
问题 Let's say I have this given data { "name" : "ABC", "favorite_cars" : [ "ferrari","toyota" ] }, { "name" : "ABC", "favorite_cars" : [ "ferrari","toyota" ] }, { "name" : "GEORGE", "favorite_cars" : [ "honda","Hyundae" ] } Whenever I query this data when searching for people who's favorite car is toyota, it returns this data { "name" : "ABC", "favorite_cars" : [ "ferrari","toyota" ] }, { "name" : "ABC", "favorite_cars" : [ "ferrari","toyota" ] } the result is Two records of with a name of ABC.

How to model Student/Classes with DynamoDB (NoSQL)

社会主义新天地 提交于 2019-12-20 10:28:09
问题 I'm trying to get my way with DynamoDB and NoSQL. What is the best (right?) approach for modeling a student table and class tables with respect to the fact that I need to have a student-is-in-class relationship. I'm taking into account that there is no second-index available in DynamoDB. The model needs to answer the following questions: Which students are in a specific class? Which classes a student take? Thanks 回答1: A very simple suggestion (without range keys) would be to have two tables:

Mongo DB Design, embedding vs relationships

匆匆过客 提交于 2019-12-20 10:25:33
问题 I'm building a simple accounting system where a user has many bills. Now I'm trying to decide if bills should be its own collection, or nested within the user. I'm leaning towards the former but I've NEVER done any noSQL stuff so I'm just going by trial and error and what I think makes sense to me. I understand that Mongo has a 4mb document size limit which is what's making me think that I should have a separate collection for bills, as these will accumulate daily and could eventually take up

How can I access Amazon DynamoDB via Python?

 ̄綄美尐妖づ 提交于 2019-12-20 10:18:35
问题 I'm currently using hbase with my Python apps and wanted to try out Amazon DynamoDB. Is there a way to use Python to read, write and query data? 回答1: You can use boto: https://github.com/boto/boto docs: https://boto.readthedocs.org/en/latest/dynamodb2_tut.html api reference: https://boto.readthedocs.org/en/latest/ref/dynamodb2.html 回答2: Another alternative is PynamoDB. PynamoDB provides an ORM like interface to DynamoDB and supports both Python 2 and Python 3. The entire DynamoDB API is

MongoDB - children and parent structure

随声附和 提交于 2019-12-20 10:11:51
问题 Having just recently delved into the world of NoSQL with MongoDB, I am still struggling to understand the best approach to architecture without 3rd normalizing the data and then joining upon it. Currently the project I am designing is a simple collection of articles, akin to a wiki. An article will have a title and text, as well as (possibly) a parent article and one or more children articles. I have had a number of differing ideas of for the database design and want to pick the one that best

Using MongoDB vs MySQL with lots of JSON fields?

和自甴很熟 提交于 2019-12-20 10:06:05
问题 There is a microblogging type of application. Two main basic database stores zeroed upon are: MySQL or MongoDB. I am planning to denormalize lot of data I.e. A vote done on a post is stored in a voting table, also a count is incremented in the main posts table. There are other actions involved with the post too (e.g. Like, vote down). If I use MySQL, some of the data better suits as JSON than fixed schema, for faster lookups. E.g. POST_ID | activity_data 213423424 | { 'likes': {'count':213,

How to store 800 billion GPS markers in database [closed]

烈酒焚心 提交于 2019-12-20 09:56:40
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I need to store GPS tracks that users record into a database. The tracks will consist of a marker every 5 meter of movement for the