[英]Moving webshop storage to NoSQL solution
If you had a webshop solution based on SQL Server relational DB what would be the reasons, if any, to move to NoSQL storage ? 如果你有一个基于SQL Server关系数据库的网上商店解决方案,那么迁移到NoSQL存储的原因是什么? Does it even make sense to migrate datastores that rely on relations heavily to NoSQL? 将依赖关系的数据存储迁移到NoSQL甚至是否有意义? If starting from scratch, would you choose NoSQL solution over relational one for a webshop project, which will, after a while, again end up with a bunch of tables like Articles, Classifications, TaxRates, Pricelists etc. and a magnitude of relations between them? 如果从头开始,你会选择NoSQL解决方案而不是关系网络项目,这会在一段时间之后再次出现一堆表格,如文章,分类,税率,价目表等,以及它们之间的关系。 ?
What's the support like in .NET (4.0) for MongoDB or MongoDB's support for .NET 4.0? .NET(4.0)对MongoDB或MongoDB对.NET 4.0的支持有什么支持? Can I count on rich code generation tools similar to EF wizard, L2SQL wizard etc. for MongoDB? 对于MongoDB,我可以依靠类似于EF向导,L2SQL向导等的丰富代码生成工具吗?
Because as what I have read so far, NoSQL's are mostly suited for document storage, simpler object models. 因为就我到目前为止所读到的,NoSQL主要适用于文档存储,更简单的对象模型。
Your answer to this question will help me make the right infrastructure design decisions. 您对此问题的回答将帮助我做出正确的基础架构设计决策。
UPDATE: If I was developing my solution around ASP.NET MVC and rely heavily on Model classes, would it be the easiest way to go to choose DB4o to simply serialize and deserialize my objects to and from datastore? 更新:如果我正在围绕ASP.NET MVC开发我的解决方案并且严重依赖于Model类,那么选择DB4o来简单地将对象序列化和反序列化到数据存储区和从数据存储区反序列化是否是最简单的方法?
Well quite a open-ended question. 这是一个非常开放的问题。
Migration to a NoSQL-datastore for an existing software 迁移到现有软件的NoSQL数据存储区
Well often there's a lot of experience and knowledge for the existing relational technologies. 通常,现有的关系技术有很多经验和知识。 When you're application runs fine, its probably not worth the effort. 当你的应用程序运行良好时,它可能不值得努力。 However when you have unsolvable issues with the current solution, then it's an option. 但是,如果当前解决方案存在无法解决的问题,那么它是一个选项。
Does it even make sense to migrate datastores that rely on relations heavily to NoSQL? 将依赖关系的数据存储迁移到NoSQL甚至是否有意义?
Well you have to consider that the three technologies (Document-DB, RDBMS, Object Database) are very different from each other. 那么你必须考虑到三种技术(Document-DB,RDBMS,Object Database)彼此非常不同。
Here's a good blog-post which compares the design-difference of MongoDB (document database) and db4o (object-database) 这是一篇很好的博客文章 ,它比较了MongoDB(文档数据库)和db4o(对象数据库)的设计差异
In the end you model should fit to your database. 最后,您的模型应该适合您的数据库。 For example, don't try to use a model for a relation database and store it 1:1 in a document database. 例如,不要尝试将模型用于关系数据库,并将其以1:1的形式存储在文档数据库中。 See also Ayende's blog about modeling for a object-database . 另见Ayende的博客,关于对象数据库的建模 。
What's the support like in .NET (4.0) for MongoDB or MongoDB's support for .NET 4.0? .NET(4.0)对MongoDB或MongoDB对.NET 4.0的支持有什么支持?
Gates VP has already answered this for MongoDB . 盖茨副总裁已经为MongoDB做了回答 。 The .NET 4.0-version of db4o is in development. .NET 4.0版本的db4o正在开发中。 Meanwhile the 3.5 version also works fine on the 4.0 framework. 同时3.5版本也适用于4.0框架。
Can I count on rich code generation tools similar to EF wizard, L2SQL wizard etc. for MongoDB? 对于MongoDB,我可以依靠类似于EF向导,L2SQL向导等的丰富代码生成工具吗?
For both, MongoDB and db4o you don't need to generate code. 对于MongoDB和db4o,您不需要生成代码。 Your classes are the schema. 您的类是架构。 You just store you objects and the database takes care of the rest. 您只需存储对象,数据库将处理剩下的事情。 See also Gates VP answer 另见盖茨VP答案
Because as what I have read so far, NoSQL's are mostly suited for document storage, simpler object models. 因为就我到目前为止所读到的,NoSQL主要适用于文档存储,更简单的对象模型。
Well the range is quite big. 那么范围很大。 From really simple key-value-stores, to more advanced document-databases, colum-oriented-databases, graph-databases and object-databases. 从非常简单的键值存储,到更高级的文档数据库,面向colum的数据库,图形数据库和对象数据库。
Of course the document-database work excellent when you have store document-like data (for example a blog-software). 当然,当您拥有类似文档的数据(例如博客软件)时,文档数据库的工作非常出色。 While graph- and object-databases are good at handling extreme complex data structures. 而图形和对象数据库擅长处理极端复杂的数据结构。
OK, that's a lot of questions, let's see which ones I can really address. 好的,这是很多问题,让我们看看我能真正解决哪些问题。
Does it make sense to migrate existing relational datastores? 迁移现有的关系数据存储是否有意义?
Not unless you have a really big performance problem. 除非你有一个非常大的性能问题。 Here's the deal, "web-scale" performance problems are typically solved by denormalization. 这是交易,“网络规模”的性能问题通常通过非规范化来解决。 MongoDB is an inherently denormalized database. MongoDB是一个固有的非规范化数据库。
If starting from scratch, would you choose NoSQL solution over relational one for a webshop project... 如果从头开始,你会选择NoSQL解决方案而不是关系网络项目...
Yes. 是。 MongoDB is a very natural fit for typical web-based projects. MongoDB非常适合典型的基于Web的项目。 However, if you have lots of SQL experience, you'll probably find the reporting a little awkward. 但是,如果您有很多SQL经验,那么您可能会发现报告有点尴尬。
.NET 4.0 support? .NET 4.0支持? Can I count on rich code generation tools similar to EF wizard, L2SQL wizard etc. for MongoDB? 对于MongoDB,我可以依靠类似于EF向导,L2SQL向导等的丰富代码生成工具吗?
Mongo has a driver available for .NET. Mongo有一个可用于.NET的驱动程序。
There's no L2SQL or EF wizard for Mongo, but there really shouldn't be. Mongo没有L2SQL或EF向导,但真的不应该。 Honestly, what you'll probably miss most is Enterprise Manager for analyzing the DB. 老实说,你可能最想念的是用于分析数据库的企业管理器。
MongoDB doesn't really need an EF wizard. MongoDB并不真正需要EF向导。 EF is MS's solution for the "impedance mismatch" between DBs and objects. EF是MS针对DB和对象之间“阻抗不匹配”的解决方案。 MongoDB doesn't have the "impedance mismatch", just stuff the objects in the DB and go. MongoDB没有“阻抗不匹配”,只是填充数据库中的对象然后去。 Much of the same goes for L2SQL. L2SQL的情况大致相同。 People have built some Linq support (just a quick google), but things like joins won't work b/c Mongo doesn't do joins. 人们已经建立了一些Linq支持(只是一个快速的谷歌),但像连接这样的东西将无法工作b / c Mongo不会加入。
From a "data objects" standpoint, Mongo only needs a very lightweight framework. 从“数据对象”的角度来看,Mongo只需要一个非常轻量级的框架。 Honestly it's as simple as stuffing the properties into the DB. 老实说,这就像将属性填充到数据库中一样简单。 If you want to "add a column", you simply add the property to your object and it starts saving in the DB. 如果要“添加列”,只需将属性添加到对象中,它就会开始保存在数据库中。 So things like L2SQL start becoming really unecessary. 所以像L2SQL这样的东西开始变得非常不必要。
Don't get me wrong, there's room for a different querying paradigm, but in that regards you're in new territory. 不要误解我的意思,有不同的查询范式,但在这方面,你处于新的领域。 (you will be for all key-value and document-oriented stores). (您将成为所有键值和面向文档的商店)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.