Questions tagged [nosql]

NoSQL (sometimes expanded to "not only SQL") is a broad class of database management systems that differ from the classic model of the relational database management system (RDBMS) in some significant ways.

NoSQL (sometimes expanded to "not only ") is a broad class of database management systems that differ from the classic model of the relational database management system () in some significant ways.

NoSQL systems:

  • Specifically designed for high load
  • Natively support horizontal scalability
  • Fault-tolerant
  • Store data in a denormalized manner
  • Do not usually enforce strict database schema
  • Do not usually store data in a table
  • Sometimes provide eventual consistency instead of ACID transactions

In contrast to RDBMS, NoSQL systems:

  • Do not guarantee data consistency
  • Usually support a limited query language (a subset of SQL or another custom query language)
  • May not provide support for transactions/distributed transactions
  • Do not usually use some advanced concepts of RDBMS, such as triggers, views, stored procedures

NoSQL implementations can be categorized by their manner of implementation:

Free NoSQL Books

Related tags

13110 questions
82
votes
7 answers

Why NoSQL is better at "scaling out" than RDBMS?

I have read the following text in a technical blog discussing the advantages and disadvantages of NoSQL: "For years, in order to improve performance on database servers, database administrators have had to buy bigger servers as the database load…
xiaohan2012
  • 9,870
  • 23
  • 67
  • 101
82
votes
7 answers

Can I do transactions and locks in CouchDB?

I need to do transactions (begin, commit or rollback), locks (select for update). How can I do it in a document model db? Edit: The case is this: I want to run an auctions site. And I think how to direct purchase as well. In a direct purchase I…
user2427
  • 7,842
  • 19
  • 61
  • 71
82
votes
7 answers

Why many refer to Cassandra as a Column oriented database?

Reading several papers and documents on internet, I found many contradictory information about the Cassandra data model. There are many which identify it as a column oriented database, other as a row-oriented and then who define it as a hybrid way…
cesare
  • 1,125
  • 1
  • 10
  • 14
80
votes
1 answer

Explain Merkle Trees for use in Eventual Consistency

Merkle Trees are used as an anti-entropy mechanism in several distributed, replicated key/value stores: Dynamo Riak Cassandra No doubt an anti-entropy mechanism is A Good Thing - transient failures just happen, in production. I'm just not sure I…
Johnny Graettinger
  • 1,078
  • 1
  • 8
  • 7
80
votes
6 answers

Pros/cons of document-based databases vs. relational databases

I've been trying to see if I can accomplish some requirements with a document based database, in this case CouchDB. Two generic requirements: CRUD of entities with some fields which have unique index on it ecommerce web app like eBay (better…
user2427
  • 7,842
  • 19
  • 61
  • 71
78
votes
13 answers

What type of NoSQL database is best suited to store hierarchical data?

What type of NoSQL database is best suited to store hierarchical data? Say for example I want to store posts of a forum with a tree structure: original post + re: original post + re: original post + re2: original post + re3: original post …
deamon
  • 89,107
  • 111
  • 320
  • 448
76
votes
5 answers

Query condition missed key schema element : Validation Error

I am trying to query dynamodb using the following code: const AWS = require('aws-sdk'); let dynamo = new AWS.DynamoDB.DocumentClient({ service: new AWS.DynamoDB( { apiVersion: "2012-08-10", region: "us-east-1" }), …
Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
76
votes
6 answers

How to stop insertion of Duplicate documents in a mongodb collection

Let us have a MongoDB collection which has three docs.. db.collection.find() { _id:'...', user: 'A', title: 'Physics', Bank: 'Bank_A' } { _id:'...', user: 'A', title: 'Chemistry', Bank: 'Bank_B' } { _id:'...', user: 'B', title: 'Chemistry',…
shashank
  • 947
  • 2
  • 7
  • 8
76
votes
5 answers

Update field in exact element array in MongoDB

I have a document structured like this: { _id:"43434", heroes : [ { nickname : "test", items : ["", "", ""] }, { nickname : "test2", items : ["", "", ""] }, ] } Can I $set the second element of the items array of the…
Denis Ermolin
  • 5,530
  • 6
  • 27
  • 44
75
votes
10 answers

Firestore Getting documents id from collection

I'm trying to retrieve my documents with id but can't figure it out. Currently I retrieve my documents like this : const racesCollection: AngularFirestoreCollection = this.afs.collection('races'); return racesCollection.valueChanges(); I do…
Élyse
  • 1,351
  • 1
  • 10
  • 12
75
votes
8 answers

How to find a substring in a field in Mongodb

How can I find all the objects in a database with where a field of a object contains a substring? If the field is A in an object of a collection with a string value: I want to find all the objects in the db "database" where A contains a substring…
codious
  • 3,377
  • 6
  • 25
  • 46
73
votes
7 answers

When shouldn't you use a relational database?

Apart from the google/bigtable scenario, when shouldn't you use a relational database? Why not, and what should you use? (did you learn 'the hard way'?)
Stephen
  • 1,215
  • 2
  • 25
  • 40
73
votes
2 answers

Using S3 as a database vs. database (e.g. MongoDB)

Due to simple setup and low costs I am considering using AWS S3 bucket instead of a NoSQL database to save simple user settings as a JSON (around 30 documents). I researched the following disadvantages of not using a database which are not relevant…
Simon Thiel
  • 2,888
  • 6
  • 24
  • 46
73
votes
4 answers

Retrieving/Listing all key/value pairs in a Redis db

I'm using an ORM called Ohm in Ruby that works on top of Redis and am curious to find out how the data is actually stored. I was wondering if there is way to list all the keys/values in a Redis db. Update: A note for others trying this out using…
Jagtesh Chadha
  • 2,632
  • 2
  • 23
  • 30
73
votes
3 answers

3 fields composite primary key (unique item) in Dynamodb

I am trying to create a table to store invoice line items in DynamoDB. Let's say the item is defined by CompanyCode, InvoiceNumber and LineItemId, amount and other line item details. A unique item is defined by the combination of the first 3…
HHH
  • 801
  • 1
  • 6
  • 10