Combining noSQL and ORM in an MVC framework for a real-case application

前端 未结 3 1414
借酒劲吻你
借酒劲吻你 2021-02-09 06:25

I\'ve been trying for some time to put some \'cool\' things I\'ve been reading about noSQL (couchDB, mongoDB, Redis...) in the past years into practical use.

I\'m quite

3条回答
  •  没有蜡笔的小新
    2021-02-09 07:14

    It's quite an open question, there is no "correct" answer. The decision between NoSQL and SQL (ORM) depends on too many factors. Some questions I would ask:

    • How familar are you with both technologies?
    • In your scenario, what's the impact of trade - offs? Relational model provides some guarantees NoSQL doesn't, and the other way around
    • How often may your model change? Evolution of the application usually requires model changes, but how much of it do you expect?

    As I told you, it's open ended. My personal suggestion would be to start modelling with the technology you know. You can always integrate new components later, if you really need it.

    Of course if the interest is purely "academical" to use NoSQL, don't mind about the optimal scenarios, use it, you'll see what's good and bad about it.

    EDIT on comment (answer doesn't fit in comment's area):

    @Stefano I'm afraid I don't see your point, as usage fo NoSQL in frameworks (or usage of an ORM) depends on your needs.

    It's not a problem of "is good to use this tool in this framework", as support is (often) excellent. The issue should be "Do I need to use this tool, why and what benefits does it give me?".

    If the answer is "yes, I need this because A,B and/or C" then just go ahead and use it.

    If the answer is "no, because A or B" or "it doesn't make a difference", then either don't use it or choose the option you are most familiar with from the ones available to you.

    That is, the fact that one framework supports something doesn't mean it's worse or better or should or shouldn't be used. That's why I put my questions. In the end, it IS a question about NoSQL vs SQL, as the tools you use to integrate it (ORM, SQL, whatever) are just a channel to access the data, and that's less relevant than the storage system you pick for your problem (as the tool will be limited by the storage system by definition)

提交回复
热议问题