Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Entity framework code first with nosql database

Can I use Entity Framework Code First Approach with NoSql Database? And how NoSql can be advantage over SQL Database for a application with large data.

like image 822
Vijayant Katyal Avatar asked Sep 10 '12 13:09

Vijayant Katyal


People also ask

Can we use Entity Framework for NoSQL database?

When you use NoSQL databases for your infrastructure data tier, you typically do not use an ORM like Entity Framework Core. Instead you use the API provided by the NoSQL engine, such as Azure Cosmos DB, MongoDB, Cassandra, RavenDB, CouchDB, or Azure Storage Tables.

Can we draw ER diagram for NoSQL database?

The result set written by SQL on relational model is similar to NoSQL data model which is aggregate data model. Therefore, entity relationship diagram and relational model can be used in NoSQL database design.

Does EF core support NoSQL?

3 Answers. Show activity on this post. Support for NoSQL database providers such as Azure Table Storage, Redis and others (like MongoDb) are still in EF Core team backlog and has not been implemented yet and will not be implemented for Core 1.0.

Can you use Entity Framework with MongoDB?

Short answer - no, it's for sure possible, but not reasonable. MongoDB is document database and not support any physical relations between collections. EF is a good fit for relational databases like SQL, MySQL, etc. MongoDB works faster with embedded documents.


2 Answers

I have been using BrightstarDb (http://www.brightstardb.com/) for the past few months and it offers code-first model generation based on Entity Framework.

BrightstarDb is a NoSql database that is also an RDF triplestore, so it's allows for more complicated relations between Entities than most traditional NoSql databases.

like image 188
elolos Avatar answered Oct 08 '22 17:10

elolos


Can i use Entity Framework Code First Approach with NoSql Database ?

No, you can't.

and how NoSql can be advantage over SQL Database for a application with large data.

Quote:

NoSQL database systems are often highly optimized for retrieve and append operations and often offer little functionality beyond record storage (e.g. key-value stores). The reduced run time flexibility compared to full SQL systems is compensated by significant gains in scalability and performance for certain data models.

In short, NoSQL database management systems are useful when working with a huge quantity of data and the data's nature does not require a relational model for the data structure. The data could be structured, but it is of minimal importance and what really matters is the ability to store and retrieve great quantities of data, and not the relationships between the elements. For example, to store millions of key-value pairs in one or a few associative arrays or to store millions of data records. This is particularly useful for statistical or real-time analyses for growing list of elements (such as Twitter posts or the Internet server logs from a big group of users).

like image 29
Darin Dimitrov Avatar answered Oct 08 '22 17:10

Darin Dimitrov