4 avg. rating (80% score) - 1 votes
Getting prepared for DocumentDB job? Do not panic, we will guide you how and what to answer in your interview. If you are preparing for DocumentDB job interview then go through Wisdomjobs interview questions and answers page. DocumentDB is a database to store documents. It was created by Microsoft as a high performance non-normalized database. It is flexible, with high availability and automatic scaling. DocumentDB has a REST API that allows it to be called by any language capable of handling HTTP and HTTPS requests. There are libraries for Java, .NET, Python. The information is stored in JSON documents. There are many openings for this job as this is much popular. Please have a look at DocumentDB interview questions and answers page to win your interview.
The Azure Cosmos DB DocumentDB API or SQL (DocumentDB) API is now known as Azure Cosmos DB SQL API. You don't need to change anything to continue running your apps built with DocumentDB API. The functionality remains the same.
If you had a DocumentDB API account before, you now have a SQL API account, with no change to your billing.
Each DocumentDB document has an ETag property that is updated each time the document is updated and you can enforce that the ETag must be identical to what you opened before when you replace the your document.
The problem with the ETag is that it is attached to the document not the stored JSON object. So all methods we have for fetching a typed Order and write typed Linq statements against the order is effectively made unusable. You should not (in my opinion) manually add the ETag to the orders object as JSONProperty either. In theory you could add a property in your objects like.
So now we have prepared for usage of Optimistic Concurrency. Now it is just to make sure that we use it. The way DocumentDB implements Optimistic Concurrency is by using AccessConditions. These are added as RequestOptions in the ReplaceDocument API call.
I added the following two overloads in the DocumentDBRepository. One accepts dynamic and one that accepts a Document (I recommend using the Document overload).
There is no built-in support for handling pessimistic concurrency in DocumentDB so you would have to implement it yourself. I would not recommend this because you have to handle deadlocks, lock expiry and advanced database topics manually.
I haven’t read up on permissions on documents yet and maybe that could be a start to limit access to a document temporary (have to return on that issue). Doing it the hard way and implementing your own pessimistic locking mechanism is to a series of posts itself and frankly it will most likely be a bad idea as one of DocumentDBs major benefits isthe fast throughput/access times which you may very likely kill if you add pessimistic concurrency to this component.
When precondition (ETag match) fails Replace Document Async will throw Document Client Exception (Inner Exception to be specific).
To check if the reason of exception is non-current ETag we have to check if Status Code is Http Status Code. Precondition Failed.
DocumentDB is a fully managed NoSQL database service built for fast and predictable performance, high.availability, elastic scaling, global distribution, and ease of development. As a schema-free NoSQL database,DocumentDB provides rich and familiar SQL query capabilities with consistent low latencies on JSON data -ensuring that 99% of your reads are served under 10 milliseconds and 99% of your writes are served under 15milliseconds.
These unique benefits make DocumentDB a great fit for web, mobile, gaming, and IoT, and manyother applications that need seamless scale and global replication.
A quick way to learn about DocumentDB and see it in action is to follow these three steps:
Azure DocumentDB offers the following key capabilities and benefits:
Elastically scalable throughput and storage: Easily scale up or scale down your DocumentDB JSONdatabase to meet your application needs. Your data is stored on solid state disks (SSD) for owredictablelatencies. DocumentDB supports containers for storing JSON data called collections that can scale to virtuallyunlimited storage sizes and provisioned throughput.
Multi-region replication: MDocumentDB transparently replicates your data to all regions you've associated with your DocumentDB account, enabling you to develop applications that require global access to data whileproviding tradeoffs between consistency, availability and performance, all with corresponding guarantees.DocumentDB provides transparent regional failover with multi-homing APIs, and the ability to elastically scalethroughput and storage across the globe.
Azure DocumentDB manages JSON data through well-defined database resources. These resources are replicatedfor high availability and are uniquely addressable by their logical URI. DocumentDB offers a simple HTTP based.
RESTful programming model for all resources.The DocumentDB database account is a unique namespace that gives you access to Azure DocumentDB. Beforeyou can create a database account, you must have an Azure subscription, which gives you access to a variety ofAzure services.All resources within DocumentDB are modeled and stored as JSON documents.
Azure DocumentDB exposes resources through a REST API that can be called by any language capable of makingHTTP/HTTPS requests. Additionally, DocumentDB offers programming libraries for several popular languages.
These libraries simplify many aspects of working with Azure DocumentDB by handling details such as addresscaching, exception management, automatic retries and so forth.
Azure DocumentDB is a general purpose NoSQL database that is used in a wide range of applications and usecases. It is a good choice for any application that needs low order-of-millisecond response times, and needs toscale rapidly.
The following are some attributes of DocumentDB that make it well-suited for high-performanceapplications:
DocumentDB is commonly used within web and mobile applications, and is particularly well suited for modelingsocial interactions, integrating with third-party services, and for building rich personalized experiences.
Social application: A common use case for DocumentDB is to store and query user generated content (UGC) for web and mobile applications, particularly social media applications.
DocumentDB Related Tutorials
|DB2 Using SQL Tutorial||Document Type Definition (DTD) Tutorial|
|DocumentDB SQL Tutorial|
DocumentDB Related Interview Questions
|DB2 Using SQL Interview Questions||Dbase Interview Questions|
|DB2 SQL Programming Interview Questions||Document Type Definition (DTD) Interview Questions|
|CouchDB Interview Questions||DB 400 Interview Questions|
|Documentum Interview Questions|
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.