Use Entity framework code first with nosql database

13,853

Solution 1

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.

Solution 2

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).

Share:
13,853

Related videos on Youtube

Vijayant Katyal
Author by

Vijayant Katyal

Updated on September 15, 2022

Comments

  • Vijayant Katyal
    Vijayant Katyal over 1 year

    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.

    • Markus
      Markus over 8 years
      I've been reading lately that EF7 will have better support for different data models, such as NoSQL. I think this question deserves another look at by the community.
  • Vijayant Katyal
    Vijayant Katyal over 11 years
    Thank you sir for your feedback !
  • Raheel Khan
    Raheel Khan almost 11 years
    @Darin, With EF5 now out, is it possible to create some sort of an interface over a NoSQL source and then use it with EF?
  • Darin Dimitrov
    Darin Dimitrov almost 11 years
    No, that's not possible. EF is SQL oriented.
  • Charlie Brown
    Charlie Brown about 10 years
    This is incorrect, I have had success using both MongoDB and Hadoop with EF Code first 4.0 and up.
  • Isuru Fonseka
    Isuru Fonseka over 9 years
    I agree, this is the only nosql db i have found that supports EF. Your models become "views" to the data, im quite happy with it so far.
  • Sergey Kostrukov
    Sergey Kostrukov over 8 years
    The fact that EF is SQL-oriented doesn't mean that it couldn't be used for NoSQL databases in theory. Just drop the Linq/EntityQuery part and take advantage of entity definition and CRUD, optimistic concurrency for entity merges etc. Some key-value storages like Redis even support aggregation queries on rows. It could be usable to have EF adapters for NoSQL.