Questions tagged [nosql]

1

votes
2

answer
34

Views

how to get data from child node in firebase in iOS

my database structure is appname: Tasks: childbyautoid1: 'name': 'myname' 'age': '18' childbyautoid2: 'name': 'yourname' 'age': '20' I want to know how to get all data that is name and age of all the child node as I don't know the childbyautoid I am writing Database.database().reference().child('T...
Mohammad Yunus
1

votes
2

answer
19

Views

MongoDB issue in query returning value from user

I am using MongoDB with Nodejs and I am trying to find the usertype value of a specific user so I've got this: var myQuery= { username: req.body.username }, { 'usertype': 1 }; dbo.collection('usercollection').find(myQuery, function(err, obj) { ... What I need returned is the value of usertype from t...
monroe2019
1

votes
2

answer
1k

Views

DynamoDB Schema Design

I'm thinking of using Amazon AWS DynamoDB for a project that I'm working on. Here's the gist of the situation: I'm going to be gathering a ton of energy usage data for hundreds of machines (energy readings are taken around every 5 minutes). Each machine is in a zone, and each zone is in a network. I...
s_dolan
1

votes
1

answer
46

Views

Cassandra constraints

We have a usecase of allowing only certain values in a cassandra column. Example: CREATED TABLE Cars( company text, model text, year int, vin text ) where a company may be from a spcific list of car makers e.g. GM, Toyota, Honda etc. Does cassandra support defining constraints for above use-case ? O...
Amit Kaneria
1

votes
2

answer
28

Views

Is it possible to select X records from every clustering key Y in a partition?

Given a table with PRIMARY KEY (pkey, ckey_a, ckey_b, etc) WITH CLUSTERING ORDER BY (ckey_a, ckey_b, etc), is it possible to make a select statement to get the first 30 records of every ckey_b grouping from a specific primary key/wide row?
DJ_R
1

votes
2

answer
930

Views

Getting MongoDB current collection name

I am using mongoDB + Java+SpringData. Is it possible to get current collection, without it's name? Thanks!
EK.
0

votes
0

answer
9

Views

Selecting a Database Type to hold Product Information Data

I'm working on a database design project where we need to store product information data and make it accessible through a REST API. The end goal is make the product data available to multiple companies who intend to use the product data on multiple, varying e-commerce platforms. The data store wher...
Gary Gerson
1

votes
0

answer
429

Views

Sync NoSQL with SQL

Is there a way to sync NoSQL and SQL databases? My problem is: We have a software that uses MSSQL. We also have a mobile application that uses MongoDB. We want to sync data (on create/update) between those databases. Mostly from MongoDB to MSSQL. It is not a problem for us (if we have to) to use di...
italomarca
1

votes
0

answer
310

Views

MongoDB - Problems with database design and statistical data calculation

I am currently facing a problem with MongoDB and that's probably due to my schema design, but I am unsure how to go about it. So basically I have this collection (mongoose Schema): const PlayerStatsCollection = { sportType: MongoId, player: MongoId, match: MongoId, team: MongoId, date: Date, league:...
Morphex
1

votes
0

answer
20

Views

How to store data objects that change all the time?

I have a complex data problem and no idea how to solve : i want to create an app where my users can create processes and add data to these processes. Example : UserA creates a form1 with 2 fields (input/textarea) and saves his form as a process He starts process1 and fills up his form with data -...
Tibo
1

votes
0

answer
253

Views

Node/Mongo autocomplete with search on two fields

I am using Node/Express/Mongo/Mongoose/jQuery/jQuery UI Auto-complete. I have a collection of Businesses that look like this: [ { name: 'Example Corporation', 'address': { 'city': 'New York', 'state: 'NY' }, { name: 'ABC Corp', 'address': { 'city': 'Atlanta', 'state: 'GA' }, { name: 'ACME Inc', 'add...
boxmatic
1

votes
0

answer
43

Views

How to calculate set intersection of items between large number of users in a NoSQL database?

I am facing an efficiency problem trying to calculate set intersection of items between different users. Let's say that a user, called Bob, owns different items he would like to trade with other items other users own. Bob has an inventory and a wishlist. Now if Bob wants to obtain an item, say item...
Badie
1

votes
1

answer
534

Views

MongoDB throwing TimeoutException on collection find?

I'm getting an unknown and unexpected error when trying to get a players data with MongoDB? I'm a newbie to mongo so I was wondering if anyone could help. System.TimeoutException: 'A timeout occured after 3000ms selecting a server using CompositeServerSelector{ Selectors = MongoDB.Driver.MongoClient...
regu
1

votes
1

answer
55

Views

ArangoDB - Exception in JsonTextReader.ParseValue() when inserting Large document to Remote Server

I have two instances of ArangoDB running, one on a remote/cloud server and one on a local server. Both instances are accessible and I can insert/query data on both instances. I have a document that contains an array 56,000+ doubles and when I try to insert this document to the remote server, I get a...
TimF
1

votes
1

answer
24

Views

How to do neo4j parameter safe for Ruby on Rails?

For example, the sentence is 'I'm playing football' The parameter needs to be 'I\'m playing football' with single quote to neo4j architecture... I tried variable.html_safe but unfortunatelly, it doesn't work. Runtime information: Neo4j database version: neo4j 3.3.1 neo4j gem version: 9.0.7 neo4j-cor...
Hasan
1

votes
1

answer
232

Views

Aws Dynamo Time Series Read Data

What would be the best way to model a time series data, that needs fast lookup for single items, however writes are not important. columns: Time(PK), value Time will be stored as an Unix timestamp, value as an int. Queries I want to perform: Given a timestamp, find the closest timestamp in table to...
WeCanBeFriends
1

votes
0

answer
262

Views

Polymorphic deserialization with morphia

I have a java object with nested lists as properties. Something like this: @Entity(value='Users', noClassnameStored = true ) public class User implements IUser { @Id private ObjectId id; private String userName; private String email; @Embedded private List...
AnneP
1

votes
0

answer
20

Views

Trouble with Emulator view since last Android Studio update

I tried to make a NoSQL database using mLab, and then import the database in Android Studio so I can make an app that allows me to add users, edit or delete them. However, after the last update from Android Studio 3.0 to 3.0.1 I am having trouble with my emulator. It opens the app, but then it doesn...
Bianca
1

votes
0

answer
49

Views

Structure data inside a Document database

I'm building a app that is going to serve as an agenda or a scheduling book for some services. It's planned to the app to work in a 'per customer' way, Angular in the front-end and to use the new Google Firestore, for all the real time and pseudo-backendless stuff. The question is, as I have never w...
Diego Barreto
1

votes
1

answer
49

Views

Improve couchbase like query performance

I have a N1QL query which takes 20 seconds to complete. Database contains 1.1 million records and it has a GSI for locationCode, type. Below is the query. SELECT * FROM appdb WHERE locationCode='1-1-03-010' AND type='institute' AND lowerName LIKE '%acg%' LILMIT 10 OFFSET 0; But the performance is v...
lahiru madhumal
1

votes
1

answer
43

Views

DataModel in NoSQL from multiple SQL tables

I have a database which look like this uploaded on a SQL Server : And this specific scenario : The airport web page allows viewers to see details of an airport together with the city that it serves including details such as the timezone and day light savings, a list of the airlines, and a list of de...
Lord Djaz
1

votes
0

answer
841

Views

Using Mongodb with Firebase/Firestore

I am considering using Firebase/Firestore and Mongodb together for data storage. The idea is to use Firebase to store data that users will interact with on mobile and use MongoDB for more backend stuff or web content that won't be accessible on the app. I've found a lot of people switching between t...
Ruan Steenkamp
10

votes
4

answer
10.7k

Views

mongodb best practice: nesting

Is this example of nesting generally accepted as good or bad practice (and why)? A collection called users: user basic name : value url : value contact email primary : value secondary : value address en-gb address : value city : value state : value postalcode : value country : value es address : val...
1

votes
0

answer
107

Views

Sort is not a function in mongodb

I am new in Mongodb. I am getting the following error -- E QUERY [thread1] TypeError: db.events.findOne(...).sort is not a function : db.events.findOne({ 'userId' : { '$ne' : '' }, '$and' : [ { 'userId' : { '$exists' : true } } ] }).sort({ '_id' : -1 }); When I add limit then it works but wit...
Prithviraj Mitra
1

votes
0

answer
26

Views

Is a multi-model database a good solution for storing frequently updated data alongside referential WORM data?

I'm working on an application that frequently requires data updates. An RDBMS meets our needs but future product strategy will require storage of static referential domain data and a lot of cross-referencing. Is a multi-model database a good way to meet this challenge? How well do databases like Mon...
Jay J
1

votes
1

answer
125

Views

Query/ Filter a attribute of type array in PoucheDB/ Hoodie JS

I am new in the NoSql / Hoodie JS / PouchDB stuff and so I try to find the best (most efficient way) to handle my data. I try to store some 'employee' data and their vacations. Something like this: { firstName: 'Test', lastName: 'User', vacations: [ {start:'2018/03/02', end:'2018/03/03'}, {start:'2...
PiTo
1

votes
2

answer
672

Views

How to use QueryStringQueryBuilder

I've tried to use QueryStringQueryBuilder in a very simple case, but I dont understand why I get another result than the result I get from Kibana. What am I doing wrong? Kibana: GET .../_search { 'query': { 'query_string' : { 'query' : '\'this is a query\'', 'lenient': true, 'default_operator': 'OR'...
Nicole
1

votes
1

answer
26

Views

Mongodb: project to get only numeric values from string

Is there any logic as javascript replace(/[^\d.]/g, '') method. to get only numeric values of string. Get only integer from string Sample Document: { '_id' : '1', 'planName' : 'Options Silver 1431B' } { '_id' : '1', 'planName' : 'Options Silver 1431A' } { '_id' : '1', 'planName' : 'myOptions 1431A'...
vishwajith reddy
1

votes
0

answer
50

Views

Getting linked documents in single lookup query in Elastic Search

To provide some context : I want to write a bulk update query(possibly affecting 0.5 - 1M docs). The update would be in the aspects field (shown below) which are mostly duplicated. My thinking was if I normalised it into another entity (aspect_label), the amount of docs updated would be reduced dr...
Shivendra Soni
1

votes
0

answer
60

Views

Combining Object data Angular 5

Im Creating a scheduling app using a NoSQL database built with Angular 5.1 Here is my Sample Data staff = [ { name: 'John Stewart', updatedTimestamp: '1520221418024', office: 'A', scheduledDay: '03/25/2018', scheduledHours: [114, 115, 116, 117, 118, 119, 120, 121] }, { name: 'John Stewart', availabl...
bjwhip
1

votes
0

answer
239

Views

Backup and Restoration Strategy for Cassandra 3.11

We are working on Cassandra backup restoration strategy, currently having 9 node cluster with replication factor 3. So we are backing up Global cluster with nodetool snapshot for all keyspaces sstable. We get snapshot folder for each keyspace on each node. We are now interested to know the best way...
Vasu Tyagi
1

votes
0

answer
401

Views

Dynamodb sorting and filtering by multiple keys

I am trying to store three main columns to save the score for a user against a time User DateTime Score 1 2018-01-01-09-00 5 1 2015-11-24-11-32 2 2 2014-11-24-11-32 1 3 2016-11-24-11-32...
Nyxter
1

votes
1

answer
93

Views

Does using postgres datatypes like ltree, json is related to NoSQL?

While I am designing a table in PostgreSQL, I planned to use ltree or path datatypes to achieve my functionality. But team members are told if we use ltree then our whole table design will become NoSQL format. Is it true? If Yes, then how I can achieve this ltree design in SQL format? If No, could y...
Satz
1

votes
1

answer
237

Views

Is it possible to query attributes from objects in lists on DynamoDB?

I have this JSON structure on my dataset to a Japanese dictionary (it has more entities, but the snippet will do as example): 'id' : 1259290, 'kanji' : [ { 'common' : true, 'text' : '見る', 'tags' : [ ] }, { 'common' : false, 'text' : '観る', 'tags' : [ ] }, { 'common' : false, 'text' :...
leonardo.teteo
1

votes
1

answer
54

Views

Can Cassandra be used for creating tables on the fly? If yes, how much time will it take on an average?

Our customers are allowed to create custom modules(tables) and properties(columns). Currently we are using RDBMS(multi tenant) for handling this usecase and have created a table to store the schema and another table with predefined set of data types in columns(10 columns for each type) to store cust...
bin
1

votes
0

answer
14

Views

Memcache with Cloudant/Nosql, is it possible?

Is there a way to use memcached with any nosql database. In my case in production I have cloudant instance with a near to million users but incur high charges as simply there are more redundant reads than writes. Any thoughts or pointers to using memcache on node.js with any nosql dB will be helpfu...
BalajiK
1

votes
1

answer
48

Views

Read record after write in eventual consistency environment

How can I read a record back after I write to a NoSQL eventual consistency environment? For instance, I went to a large ecommerce site and after I placed an order, I got order confirmation page but when I clicked on the order number, I got order not found message, but worked fine after a minute, due...
Suneel
1

votes
1

answer
88

Views

ElasticSearch Availability / Partition Tolerance with 3 Nodes

I'm new to ElasticSearch and try to figure out proper Setup for a 3 Node Cluster that should tolerate the loss of 2 Nodes. From what I understand, setup would be: DC1: 2 nodes DC2: 1 node shards: 3 replicas: 2 minimum_master_nodes: 1 Is it correct that without setting minimum_master_nodes to 1, if D...
genguy
1

votes
2

answer
265

Views

Model Firestore Data

I am creating a new database using Firestore. I am new to NoSQL and trying to determine best practices for modeling my data. I know that Firestore data is shallow by default (as opposed to the Realtime Database) so nesting isn't a problem. That said, what would be the best way to model a more-or-les...
Matt Campbell
1

votes
0

answer
33

Views

Self declare an object to insert into NoSQL DB

I have 4 variables to put into an object and then I will be using JsonConvert.Serialize to serialize them into Json format. However, I tried doing with one variable only var sampleinfo = [{'Name': 'name'}]; It doesn't work and kept prompting } expected . May I know why? The other 3 variables I have...
Arane

View additional questions