Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do NoSQL databases use or need indexes?

I am a newbie in NoSQL databases and this may sound a bit stupid but I was wondering if NoSQL databases use or need indexes? If yes, how to make or manage them? any links? Thanks

like image 826
Hossein Avatar asked Apr 10 '12 07:04

Hossein


People also ask

Does NoSQL use indexes?

There are many indexing data structures used in NoSQL databases. We will briefly discuss some of the more common methods; namely, B-Tree indexing, T-Tree indexing, and O2-Tree indexing.

What is need of NoSQL databases?

NoSQL databases store data in a single data format, including a JSON document, rather than the traditional table structure of a relational database. Because this non-relational database architecture doesn't really need a structure, it can quickly handle massive, often unorganized data sets.

Do NoSQL use tables?

To define NoSQL, it is helpful to start by describing SQL, which is a query language used by RDBMS. Relational databases rely on tables, columns, rows, or schemas to organize and retrieve data. In contrast, NoSQL databases do not rely on these structures and use more flexible data models.

Do NoSQL databases require schema?

Does NoSQL have a schema? NoSQL databases do not have a schema in the same rigid way that relational databases have a schema. Each of the four main types of NoSQL database has an underlying structure that is used to store the data.


1 Answers

CouchDB and MongoDB definitely yes. I mentioned that in my book:

  • http://use-the-index-luke.com/sql/testing-scalability/response-time-throughput-scaling-horizontal

Here are the respective docs:

  • http://guide.couchdb.org/draft/btree.html
  • http://www.mongodb.org/display/DOCS/Indexes

NoSQL is, however, too fragmented to give a definite "yes, all NoSQL systems need indexes", I believe. Most systems require and provide indexes but not at level most SQL databases do. Recently, the Cassandra people were proudly introducing secondary indexes, i.e., more than a single clustered index.

  • http://www.datastax.com/dev/blog/whats-new-cassandra-07-secondary-indexes (well, not so recently as I remember)
like image 53
Markus Winand Avatar answered Oct 11 '22 06:10

Markus Winand