什么时候可以接受平面DB设计?

时间:2022-06-01 19:12:36

When is it ok to use a flat DB table design nowadays. Ever? What I mean is when is it ok to abandon the wisdom of relational database design and revert back a flat table structure that incorporates no links, adding extra columns to add more data, when we should be creating a key to another table to store multiple rows.

现在什么时候可以使用平面DB表设计。过吗?我的意思是,什么时候可以放弃关系数据库设计的智慧,恢复一个没有链接的平面表结构,添加额外的列来添加更多的数据,什么时候应该创建一个键到另一个表来存储多行。

I'm working on some ideas to discuss with a product management team. When I initially asked the question "Why are all these tables flat in nature" I was told that "Read centric databases display better performance with a flat table structure."

我正在和一个产品管理团队讨论一些想法。当我最初问“为什么所有这些表都在本质上是平的”时,我被告知“以一个扁平的表结构显示更好的性能,以阅读为中心的数据库”。

I struggle with this explanation b/c a flat design present so many barriers to progress down the road.

我对这种解释感到困惑,因为平面设计在未来的发展中会遇到很多障碍。

Thoughts?

想法吗?

2 个解决方案

#1


3  

"Read centric databases display better performance with a flat table structure." This statement says table won't/rarely be used to insert/update/delete operations. In that case table must be properly indexed to get good performance. Since there won't be any kind of joins so table would be using lot of filters in where clause hence indexing is really important to be used appropriately.

“以读为中心的数据库使用平面表结构显示更好的性能。”这个语句表示表不会/很少用于插入/更新/删除操作。在这种情况下,必须对表进行适当的索引以获得良好的性能。由于不存在任何类型的连接,所以表将在where子句中使用大量的过滤器,因此索引是非常重要的,需要适当地使用。

This kind of scenario is usually used in data warehouses. When we designs warehouses, we usually eliminates primary/foreign keys and uses business primary keys. This is because of huge database in wareshouse.

这种场景通常用于数据仓库。当我们设计仓库时,我们通常去掉主键/外键并使用业务主键。这是因为在wareshouse有巨大的数据库。

#2


0  

Never.

从来没有。

Whatever problem you think you are going to solve by ignoring relational database theory, you will only create many more intractable problems. Furthermore, the original problem that you attempt to avoid by ignoring relational theory will invariably be based on a misconception anyway.

不管您认为通过忽略关系数据库理论可以解决什么问题,您只会创建更多难以解决的问题。此外,您试图通过忽略关系理论来避免的最初问题始终是基于误解。

#1


3  

"Read centric databases display better performance with a flat table structure." This statement says table won't/rarely be used to insert/update/delete operations. In that case table must be properly indexed to get good performance. Since there won't be any kind of joins so table would be using lot of filters in where clause hence indexing is really important to be used appropriately.

“以读为中心的数据库使用平面表结构显示更好的性能。”这个语句表示表不会/很少用于插入/更新/删除操作。在这种情况下,必须对表进行适当的索引以获得良好的性能。由于不存在任何类型的连接,所以表将在where子句中使用大量的过滤器,因此索引是非常重要的,需要适当地使用。

This kind of scenario is usually used in data warehouses. When we designs warehouses, we usually eliminates primary/foreign keys and uses business primary keys. This is because of huge database in wareshouse.

这种场景通常用于数据仓库。当我们设计仓库时,我们通常去掉主键/外键并使用业务主键。这是因为在wareshouse有巨大的数据库。

#2


0  

Never.

从来没有。

Whatever problem you think you are going to solve by ignoring relational database theory, you will only create many more intractable problems. Furthermore, the original problem that you attempt to avoid by ignoring relational theory will invariably be based on a misconception anyway.

不管您认为通过忽略关系数据库理论可以解决什么问题,您只会创建更多难以解决的问题。此外,您试图通过忽略关系理论来避免的最初问题始终是基于误解。