Ehsan Ghanbari

Experience, DotNet, Solutions

Document store NoSQL Databases

Document-oriented databases AKA Semi-structured data are designed for managing, storing and retrieving the document orientation databases. Document data stores are kinds of NoSQL databases.  There is no any kind of schema and limitation of fixed table fields and relations of traditional RDBMS databases in Document Store Databases. these databases store documents into a database. You can imagine the document a JSON document (a self-contained data in every document). There is no limitation for fields of these documents, they are completely dynamic and could be modified easily. Document store databases store the data in documents but in a standard encoded formats such as JSON, YAML or XML. These documents are not in a regular form as in relational databases, you can't see any kind of Schema, Primary key, table or relations!


This is a sample of JSON document contained FirstName and Email :


      FirstName: "Ehsan",
      Email: "[email protected]"


And this is another JSON document for the same person but in another document with a different structure: 


     LastName : "Ghanbari",
     Age: "24",
     Cell: "+989193782914",
     Email: "[email protected]",


Both of the documents are my personal information in different formats. As you can see there is no any convention and defined rule for sorting and styling of the data. Where you have to put the same data in the relational database that you have defined before with different kinds of joins and relations. Documents are addressed in the documents via a unique key, this key could be GUID, string, URL or a path.  Document databases are a class of storage systems which save the whole object hierarchy to disk and retrieve the same without the use of relational tables. To aid the searching in such databases most Document store databases have a map function which extracts the data needed and saves that as a "view" for later browsing and searching. These databases do away with the notion of transactions and locking mechanism in the traditional sense and offer high data through-put and "eventually consistent" data views. There are lots of document store databases such as BaseX, ClusterPoint, CouchDB, FleetDB, MongoDB, RavenDB and … Document databases generally have very powerful query engines and indexing features that make it easy and fast to execute many different optimized queries. 



The benefit of using Document Store Databases:

  1. Reading from document database makes a better performance because reading related data from different kinds of joins is so slow.
  2. Documents could be shared between different kinds of nodes. Which allows data to be grouped together more naturally and logically.
  3. You don’t need to translate the business objects or aggregates(DDDesign) to SQL queries! You have the same document in the database as you have in the model.
  4. Replication is much easier in a document database because of having the original document (Not inconsistent domain model) in a database.
  5. You can save any kind of data (Unstructured data) in document databases.
  6. You don’t need to buy an RDBMS license anymore!
  7. Changes to the application can be made anytime (what attracts me!)






About Me

Ehsan Ghanbari

Hi! my name is Ehsan. I'm a developer, passionate technologist, and fan of clean code. I'm interested in enterprise and large-scale applications architecture and design patterns and I'm spending a lot of my time on architecture subject. Since 2008, I've been as a developer for companies and organizations and I've been focusing on Microsoft ecosystem all the time. During the&nb Read More

Post Tags
Pending Blog Posts
Strategic design
Factory Pattern
time out pattern in ajax
Selectors in Jquery
Peridic pattern
How to use PagedList In MVC
Redis as a cache server
Domain driven design VS model driven architecture
How to query over Icollection<> of a type with linq
What's the DDD-lite?
comments powered by Disqus