gpt4 book ai didi

sql - Virtuemart 如何在不使用 EAV 的情况下做 EAV?

转载 作者:行者123 更新时间:2023-12-04 20:54:27 26 4
gpt4 key购买 nike

我理解EAV中的三个基本故障,即重新组装数据需要大量工作。但是,我想要一个可以添加自定义字段的数据库。很多人说Virtuemart允许自定义字段,但不使用 EAV 数据库结构。有人可以解释如何做到这一点或提供链接吗?

最佳答案

我相信他们将自定义字段存储在一大块 XML 或 YAML 或其他特定于域的语言中。

基本上,他们使用 Martin Fowler 的 Serialized LOB图案。

这使得很难使用 SQL 表达式来查询自定义属性。您必须将整行提取回您的应用程序并解析出自定义属性。但这并不比EAV带来的痛苦更糟糕。

http://web.archive.org/web/20110709125812/http://sankuru.biz/en/blog/8-joomla-configuration-issues/35-the-cck-buzz-content-creation-kit-and-the-eav-problem.html

Virtuemart and CCK

Virtuemart (VM) custom user fields are CCK-style, but do not rely on EAV. Therefore, they are very usable, and useful. I do recommend their use.

VM product types are also CCK-style, but unfortunately do rely on EAV. Therefore, I avoid VM product types like the plague. Instead, I just manually create additional fields in the product record.

The VM attribute system (simple, custom, advanced) is actually too underpowered to be considered CCK grade.

A good improvement to VM, would consist in rephrasing the VM product types and attributes to non-EAV CCK-style custom fields (and therefore make them work more like the VM custom user fields).

关于sql - Virtuemart 如何在不使用 EAV 的情况下做 EAV?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2001939/

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