entity-attribute-value

How to optimize this complicated EAV MYSQL query?

点点圈 提交于 2019-11-30 18:34:07
问题 Is it possible to optimize this query I have written I've created a sort of dynamic virtual database to give my users the ability to add custom fields without affecting the database structure. Here is a very simplified view of the stucture so far. tables | columns db_cases | caseid db_structure | fieldname db_data | fieldname, data, caseid db_names | nameid We can create a new field by adding a row to db_structure Any data we wish to record is recorded to db_data. Names are stored in db_names

Work around the 61 table JOIN limit in MySQL by nesting subqueries within each other

Deadly 提交于 2019-11-30 16:17:01
问题 I figured out that you can get around the 61 table join limit in MySQL by using subqueries. https://stackoverflow.com/a/20134402/2843690 I'm trying to figure out how to easily use this in a program I'm working on to get a detailed product list from Magento (but I think the answer to this question could apply to a lot of situations where eav is involved). The tables that need to be joined look something like this: catalog_product_entity +-----------+----------------+ | entity_id | entity_type

Work around the 61 table JOIN limit in MySQL by nesting subqueries within each other

给你一囗甜甜゛ 提交于 2019-11-30 15:58:02
I figured out that you can get around the 61 table join limit in MySQL by using subqueries. https://stackoverflow.com/a/20134402/2843690 I'm trying to figure out how to easily use this in a program I'm working on to get a detailed product list from Magento (but I think the answer to this question could apply to a lot of situations where eav is involved). The tables that need to be joined look something like this: catalog_product_entity +-----------+----------------+ | entity_id | entity_type_id | +-----------+----------------+ | 1 | 4 | | 2 | 4 | | 3 | 4 | | 4 | 4 | | 5 | 4 | | 6 | 4 | | 7 | 4

How to overcome shortcomings in reporting from EAV database?

末鹿安然 提交于 2019-11-30 14:09:10
问题 The major shortcomings with Entity-Attribute-Value database designs in SQL all seem to be related to being able to query and report on the data efficiently and quickly. Most of the information I read on the subject warn against implementing EAV due to these problems and the commonality of querying/reporting for almost all applications. I am currently designing a system where the fields for one of the entities are not known at design/compile time and are defined by the end-user of the system.

Can EntityFramework support an EAV model?

China☆狼群 提交于 2019-11-30 11:10:02
问题 Can EntityFramework support an EAV model? Is this a workable scenario, or a nightmare? I want to use an EAV model for a system, and I'd like to embrace EF if possible, but I'm concerned that these two philosophies are in conflict. 回答1: It depends how do you expect to use EAV in the application. EF can be used to map this: public partial class Entity { // Key public virtual int Id { get; set; } // Other common properties // Attributes public virtual ICollection<EavAttriubte> Attributes { get;

How to overcome shortcomings in reporting from EAV database?

女生的网名这么多〃 提交于 2019-11-30 09:39:24
The major shortcomings with Entity-Attribute-Value database designs in SQL all seem to be related to being able to query and report on the data efficiently and quickly. Most of the information I read on the subject warn against implementing EAV due to these problems and the commonality of querying/reporting for almost all applications. I am currently designing a system where the fields for one of the entities are not known at design/compile time and are defined by the end-user of the system. EAV seems like a good fit for this requirement but due to the problems I've read about, I am hesitant

MySQL correlated subquery in JOIN syntax

泪湿孤枕 提交于 2019-11-30 06:28:07
I would like to provide a WHERE condition on an inner query by specifying innertable.id = outertable.id. However, MySQL (5.0.45) reports "Unknown column 'outertable.id' in 'where clause'". Is this type of query possible? The inner query is pivoting rows to columns using a GROUP BY. This could be entirely be performed in the outer query, but would possibly incur additional overhead due to the extra joins. Alternatively, I can leave off the WHERE condition in the inner query and instead specify an ON outertable.id = innerquery.id, but it would then fetch the entire inner query rowset to join

How to design a database schema to support tagging with categories?

ぐ巨炮叔叔 提交于 2019-11-30 06:12:38
问题 I am trying to so something like Database Design for Tagging, except each of my tags are grouped into categories. For example, let's say I have a database about vehicles. Let's say we actually don't know very much about vehicles, so we can't specify the columns all vehicles will have. Therefore we shall "tag" vehicles with information. 1. manufacture: Mercedes model: SLK32 AMG convertible: hardtop 2. manufacture: Ford model: GT90 production phase: prototype 3. manufacture: Mazda model: MX-5

mysql table structure proposal?

99封情书 提交于 2019-11-30 05:30:20
is this table any good for mysql? I wanted to make it flexible in the future for this type of data storage. With this table structure, you can't use a PRIMARY KEY but an index ... Should I change the format of the table to have headers - Primary Key, Width, Length, Space, Coupling ... ID_NUM Param Value 1 Width 5e-081 1 Length 12 1 Space 5e-084 1 Coupling 1.511 1 Metal Layer M3-0 2 Width 5e-082 2 Length 1.38e-061 2 Space 5e-081 2 Coupling 1.5 2 Metal Layer M310 No, this is a bad design for a relational database. This is an example of the Entity-Attribute-Value design. It's flexible, but it

If EAV is evil, what to use for dynamic values?

橙三吉。 提交于 2019-11-30 03:06:41
问题 I need to create database where Accountgroup table will have dynamic fields so that Accounts can enter those dynamic field values when needed. It's probably not important but I'm using C# with EF and Linq. It's hard for me because I never done anything like that and since I did my research everyone is saying that EAV systems are horrible and you should design it differently , the problem is that nobody tells afterwards - how? So maybe you can help me out and tell how can I implement something