entity-attribute-value

Is using a Master Table for shared columns good practice for an entire database?

南笙酒味 提交于 2019-11-27 08:51:52
问题 Below, I explain a basic design for a database I am working on. As I am not a DB, I am concerned if I am on a good track or a bad one so I wanted to float this on stack for some advice. I was not able to find a similar discussion that fit's my design. In my database, every table is considered an entity. An Entity could be a customer account, a person, a user, a set of employee information, contractor information, a truck, a plane, a product, a support ticket, etc etc. Here are my current

Best beginner resources for understanding the EAV database model? [closed]

 ̄綄美尐妖づ 提交于 2019-11-27 06:28:09
I'm doing some custom work with Magento, which has a database design based upon the EAV model, and I need some good resources/tutorials that explain the EAV database model. Please don't provide Wikipedia as a resource... I'm looking for something that teaches EAV in a friendly way for beginners. Here you go. An illustrative story: http://www.simple-talk.com/opinion/opinion-pieces/bad-carma/ The friendliest thing you can do for a beginner is to teach them the down side of EAV. The up side of EAV is so seductive that a lot of newbies will dig a very big hole for themselves before they realize it

Pivoting EAV data from the client to a Relational Model on the server

淺唱寂寞╮ 提交于 2019-11-27 04:48:54
问题 I am building a software platform for mobile electronic data collection. It should support any type of data. For example, the government might use it for a population survey; a manufacturing company might use it to evaluate plant condition at their factories; a research organizations might use it for clinical trials, e.t.c As such, the software is powered by a database, with standard relational design for the metadata and entity attribute value for the actual data. Client software then reads

What is best performance for Retrieving MySQL EAV results as Relational Table

∥☆過路亽.° 提交于 2019-11-27 01:38:11
问题 I want to extract results from EAV (entity-attribute-value) tables, or more specifically entity-metadata tables (think like wordpress wp_posts and wp_postmeta ) as a "nicely formatted relational table", in order to do some sorting and/or filtering . I've found some examples of how to format the results within the query (as opposed to writing 2 queries and joining the results in code), but I would like to know the "most efficient" method for doing so, especially for larger result sets. And

Key/Value pairs in a database table

℡╲_俬逩灬. 提交于 2019-11-27 00:58:02
问题 I need to design a Key/value table in my database and I'm looking for guidance on the best way to do this. Basically, I need to be able to associate values to a dynamic set of named properties and apply them to an external key. The operations I need to be able to support are: Apply a key/value pair to a group of items Enumerate all of the currently-active keys Determine all of the items that have a value for a given key Determine all of the items where the value associated with a given key

Alternatives to Entity-Attribute-Value (EAV)?

一曲冷凌霜 提交于 2019-11-27 00:02:54
Our database is designed based on EAV (Entity-Attribute-Value) model. Those who have worked with EAV models know all the crap that comes with for the purpose of flexibility. I asked my client about the reasons why using EAV model (flexibility), and their response was: Their entities change over time. So, today they may have a table with a few attributes, but in a month time, a few new attributes may be added, or an existing attribute may be renamed. They need to produce reports to get back to any stage in time and query the data based on the shape of entities at that stage. I understand this

Improving a query using a lot of inner joins to wp_postmeta, a key/value table

泪湿孤枕 提交于 2019-11-26 20:27:43
问题 am working with a wordpress website that is performing the following query, but I see this query is doing many inner joins and the website takes long to load and goes down a lot, and I have been trying to create a query that produces the same result but with no success yet I would like to know what could be a better way to do this SELECT * FROM wp_posts INNER JOIN wp_postmeta color ON wp_posts.ID = color.post_id INNER JOIN wp_postmeta transmission ON wp_posts.ID = transmission.post_id INNER

Should I use EAV model?

感情迁移 提交于 2019-11-26 19:29:54
I'm am designing my database/domain for an eCommerce application and I'm having a hard time figuring out how to store products. The website will sell a wide range of products, pens, thongs, tattoos, umbrellas, everything. Each of these product will share a few common attributes, height, width, length, weight, etc but some products have special data. For example, pens have different ink colors and tips/lids and brochures can have different types of folds. So far I have thought up some 20+ extra attributes, but these attributes may only apply to 1% of products on the website. So I am wondering

Entity-Attribute-Value Table Design

北慕城南 提交于 2019-11-26 17:40:43
I am currently designing a database structure for the products section of an ecommerce platform. It needs to be designed in such a way that makes it possible to sell an infinite number of different types of products with an infinite number of different attributes. E.g. The attributes of a laptop would be RAM, Screen Size, Weight, etc. The attributes of a book would be Author, ISBN, Publisher, etc. It seems like an EAV structure would be most suitable. Select a product Product belongs to attribute set Attribute set contains attributes x and y Attribute x is data type datetime (values stored in

Magento - Retrieve products with a specific attribute value

好久不见. 提交于 2019-11-26 16:58:27
In my block code I am trying to programmatically retrieve a list of products that have a attribute with a specific value. Alternately if that is not possible how would one retrieve all products then filter them to just list the products with a specific attribute? How would I perform a search using standard boolean filters AND or OR to match a subset of my products? Alan Storm Almost all Magento Models have a corresponding Collection object that can be used to fetch multiple instances of a Model. To instantiate a Product collection, do the following $collection = Mage::getModel('catalog/product