索引太多了 [英] Too Many Indexes

查看:87
本文介绍了索引太多了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我正在为考古学家创建一个数据库。对于给定的工件,有几个属性:颜色,形状,大小,用法等。我为每个属性创建了一个表,然后创建了一个包含每个属性表的主键的主表。当我创建一个关系时,我想要执行所有三个标准:强制引用完整性,级联更新和级联删除。问题是我很快就达到了32个索引限制。我该怎么做才能解决这个问题?我不确定我是否可以打破这些表格,而且我不想放弃级联更新/删除。


想法?


提前谢谢!

解决方案

我没有看到每个属性有一个表的原因。

给定工件A:它可以有许多属性。这意味着一对多,因此只需要两张桌子...我不理解对你的情况至关重要的事情,为每个属性制作一张桌子吗?


两张桌子将远远低于这个指数限制,对吗?


问候,

Scott


打扰一下,你真的有多对多工件和属性之间的关系。然而,即便如此,它实际上只需要三张桌子......


问候,

Scott


Just订阅。

Hello all,

I am creating a database for archaeologists. For a given artifact there are several attributes: color, shape, size, usage, etc. I have created a table for each attribute, and then created a master table that holds the primary key of each attribute table. When I create a relationship I''d like to do all three of the standards: enforce referential integrity, cascade updates, and cascade deletes. The problem is that I reach the 32 indexes limit pretty quickly. What can I do to fix this? I''m not sure I can break the tables out any more than they are, and I''d hate to have to forsake the cascading update/delete.

Thoughts?

Thanks in advance!

解决方案

I fail to see the reason for one table for each attribute.

Given Artifact A: It can have many Attributes. That means One to Many, therefore needing only two tables... Am I not understanding something vital to your situation that makes one table for each attribute necessary?

Two tables would be far below this index limit, right?

Regards,
Scott


Excuse me, You actually have a Many to Many relationship between Artifacts and Attributes. However, even with this, it really only requires three tables...

Regards,
Scott


Just subscribing.


这篇关于索引太多了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆