25

I am choosing database technology for my new project. I am wondering what are the key differences between Azure DocumentDB and Azure Table Storage?

It seems that main advantage of DocumentDB is full text search and rich query functionality. If I understand it correctly, I would not need separate search engine library such as Lucene/Elasticsearch.

On the other hand Table Storage is much cheaper.

What are the other differences that could influence my decision?

David Makogon
  • 69,407
  • 21
  • 141
  • 189
SoftwareFactor
  • 8,430
  • 3
  • 30
  • 34
  • 1
    Asking why to use table (key/value database) vs DocumentDB (document database) is an opinion-based question and doesn't fit here. That said: There are objective differences between the two specific types of database technologies. I answered a similar question [here](http://stackoverflow.com/a/7997456/272109) about mongodb vs table storage. It does not attempt to give guidance when to use one vs the other (again, that's opinion-based, as well as app-based). – David Makogon Aug 22 '14 at 19:48
  • Are you sure about DocumentDB providing full text search capability? Please point to a source if it is so. – Abhay Kumar Jan 05 '15 at 15:10

1 Answers1

14

I consider Azure Search an alternative to Lucene. I used Lucene.net in a worker role and simply the idea of not having to deal with the infrastructure, ingestion, etc.. issues make the Azure Search service very appealing to me.

There is a scenario I approached with Azure storage in which I see DocumentDB as a perferct fit, and it might explain my point of view.
I used Azure storage to prepare and keep daily summaries of the user activities in my solution outside of Azure SQL Database, as the summaries are requested frequently by a large number of clients with good chances to experience spikes on certain times of the day. A simple write once read many scenario usage pattern (my schema) Azure SQL db found it difficult to cope with while it perfectly fit the capacity of storage (btw daily summaries were not in cache because of size) .
This scenario evolved over time and now I happen to keep more aggregated and ready to use data in those summaries, and updates became more complex.

Keeping these daily summaries in DocumentDB would make the write once part of the scenario more granular, updating only the relevant data in the complex summary, and ease the read part, as the capability of getting parts of more summaries becomes a trivial quest, for example.

I would consider DocumentDB in scenarios in which data is unstructured and rather complex and I need rich query capability (Table storage is lagging on this part).
I would consider Azure Search in scenarios in which a high throughput full-text search is required.

I did not find the quotas/expected perf to precisely compare DocumentDB to Search but I highly suspect Search is the best fit to replace Lucene.

HTH, Davide

DavideB
  • 609
  • 5
  • 10
  • This is *one* opinion. Which is why it's best not to post opinion-based answers. There's simply no single correct opinion. – David Makogon Aug 22 '14 at 19:50
  • 2
    @DavidMakogon: in your opinion should I delete the response as it is an opinion? Sorry I did not pay attention to the policy as I replied. – DavideB Jan 19 '15 at 10:13
  • In short it sounds like you are saying Document DB is ideal if you need to run search queries on the data. Thank you for your helpful answer. – ToddBFisher Mar 06 '15 at 15:48