数据库规范化还有必要吗?

发布于 2024-08-19 15:08:53 字数 190 浏览 2 评论 0原文

数据库规范化仍然是“主流”吗?

当我在数据库课程中学习时,我们被教授了各个级别的规范化,并被告知我们必须始终这样做。

现在,随着 NoSQL 运动的发展,规范化似乎不再是必要的事情了?

Is database normalization still "the thing?"

When I studied during a databases course we were taught all levels of normalization and were said that we must always do it.

Now, with all the NoSQL movement, it seems normalization is no longer the thing to do?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

憧憬巴黎街头的黎明 2024-08-26 15:08:53

这取决于使用数据库的应用程序类型。

对于 OLTP 应用程序(主要是数据输入,包括许多 INSERT、UPDATE 和 DELETES,以及 SELECT),规范化通常是一件好事。

对于 OLAP 和报告应用程序,标准化没有帮助。 SELECT 查询将针对非规范化模式更快地运行,这可以通过视图来实现。

您可能还会在这些非常流行的类似问题中找到一些有用的信息:

我应该标准化我的是否是数据库?

就术语而言对于数据库来说,“为了正确性而规范化,为了性能而去规范化”是正确的口头禅吗?

规范化数据库对资源有什么影响?

如何说服某人规范化数据库?

使用规范化表真的更好吗?

It depends on what type of application(s) are using the database.

For OLTP apps (principally data entry, with many INSERTs, UPDATEs and DELETES, along with SELECTs), normalized is generally a good thing.

For OLAP and reporting apps, normalization is not helpful. SELECT queries will run much more quickly against a denormalized schema, which could be achieved with views.

You might also find some helpful information in these very popular similar questions:

Should I normalize my DB or not?

In terms of databases, is “Normalize for correctness, denormalize for performance” a right mantra?

What is the resource impact from normalizing a database?

How to convince someone to normalize a database?

Is it really better to use normalized tables?

北风几吹夏 2024-08-26 15:08:53

NoSQL 不是灵丹妙药:它只是一种可以提供更适合的技术对于某些情况。对于关系型数据,RDBMS 不会很快消失。

NoSQL is not a silver bullet: it is simply a technology that may provide a far better fit for for certain circumstances. For relationally-shaped data, the RDBMS is not going away any time soon.

要走干脆点 2024-08-26 15:08:53

经验法则是“JOIN 的处理能力很昂贵”。我在为大型或小型项目创建数据库时使用 is 。保存用户名、地址等数据的表应始终进行标准化,因为最近访问这些数据的方式与您使用所教授的示例进行教学的方式不同。近年来,web2.0 数据、应用程序、移动服务等实际上采用了不同类型的数据,这些数据具有丰富的内存代码,甚至更低,它可以节省处理能力,将它们全部保存在同一个“表”上,而不是使其正常化。

A rule of thumb "JOIN's are Expensive on Processing Power". I use is when creating a database for a project large or small. Tables that hold data such as usernames, addresses etc should always be normalised as they are accessed less recently how you where taught using the kind of examples taught. Now in recent years web2.0 data, apps, mobile services etc. have taken in fact a different type of data which with the abundance of memory code even lower, it can save processing power to keep them all on the same "table" not normalising it.

丿*梦醉红颜 2024-08-26 15:08:53

是的,对于交易系统来说,总是会正常化,否则您很可能会在未来遇到严重的麻烦。对于将用于报告/OLAP 非规范化的数据库,模式可能非常有帮助。

yes, for a transactional system always normalise, or chances are you're going to have major headaches further down the road. For a database that will be used for reporting/OLAP denormalising the schema can be very helpful.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文