5
votes

I am very excited to use Cosmos DB into my current application instead of Azure SQL database.

Before use Cosmos DB as backend in my current application, I have few questions in my mind those are

  1. In my current application I used Entity framework.
  2. And also used column encryption, dynamic data masking features.

So, if I moved to Cosmos DB instead of using Azure SQL database then how can I achieve those features by using Cosmos DB?

Documentation doesn't specify details about encryption, masking and entity framework.

Can you please tell me “is it possible to use Cosmos DB with above requirements instead of Azure SQL Database?

1
No, Cosmos DB is not a relational database! Just migrating is not an option in your scenario.Peter Bons

1 Answers

9
votes

Entity Framework is specific to relational databases, so it doesn't fit with Cosmos DB's document store (or graph, or tables).

Regarding encryption: Cosmos DB provides encryption-at-rest, built-in. There is no per-property data-masking feature built-in; you'd have to do your own data masking.

Whether you migrate to a document (or graph, or table) store is really up to you, and whether you want to re-shape your data to fit in such a storage model, vs a relational model. No real way to answer that for you. (TL;DR you cannot just switch from relational to, say, document, without any changes, as they are fundamentally different storage concepts).