gpt4 book ai didi

.net - 数据集是否可扩展?像 myspace 这样的网站会使用它们进行数据检索吗?

转载 作者:行者123 更新时间:2023-12-04 17:23:15 26 4
gpt4 key购买 nike

数据集的可扩展性如何?团队成员想要使用数据集进行数据检索和操作,使用内置的数据完整性等,使用对象来执行数据更新等。

我们的系统有望扩展到数百万用户。

我读过的所有内容都针对企业环境中的数据集,我在这里错了还是什么?

最佳答案

免责声明-这些是我从个人经验中得出的意见

数据集使用起来非常痛苦,我真的不建议使用它们,除非你有特定的需求。我从事过大型 .NET 1.0 时代项目(包含数千个数据集),我发现它们 难以维护、使用和测试 .除非您使用强类型数据集,否则您必须使用基于数组的语法访问所有内容,而您将永远维护这些数据集。

我真的建议使用像 NHibernate 这样的 ORM .您可以通过这些 screen casts 了解有关 NHibernate 的更多信息.

如果您对可销售架构感兴趣,您应该查看 High Scalability网站,您可以在其中找到 MySpace Architecture你在问题中提到的。

有关数据集的更公正的意见,请查看此 MSDN link (总结如下)

何时使用哪个

Both DataSets and custom classes don't limit what you can do in any way, and both can be used to accomplish the same aims. That said, DataSets are fantastic tools for prototyping applications and represent excellent solutions for building systems in a kind of emergency—a limited budget, an approaching deadline, or a short application lifetime. For relatively simple applications, custom entities add a perhaps unnecessary level of complexity. In this case, I suggest that you seriously consider using DataSets.

In the economy of a large, durable, complex enterprise system that takes several months to complete, the cost of architecting and implementing a bunch of collections classes is relatively minimal and is incurred only once. The advantages in terms of performance, expressivity, readability, and ease of maintenance largely repay the investment. You are not bound to a tabular rendering of data. Business rules and custom business entities can't always be adapted to look like a collection of tables. In general, you should avoid adapting data to the data container—quite the reverse, I'd say. Finally, using custom classes makes for easier unit testing because classes and logic are more strictly related than with DataSets. In Figure 3, you find a synoptic table with DataSets, typed DataSets, and custom entities compared by several factors.

关于.net - 数据集是否可扩展?像 myspace 这样的网站会使用它们进行数据检索吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/651412/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com