entity-attribute-value

Add new values to a attribute option in magento

微笑、不失礼 提交于 2019-12-03 13:58:44
I am trying to add new values to attribute option in magento using a script to speed up the process since I have over 2,000 manufactuers Here is a piece of code that I used to perform exactly this task. Create a custom module (using ModuleCreator as a tool) and then create a mysql4-install-0.1.0.php under the sql/modulename_setup folder. It should contain the following (adapted to your own data, of course!). $installer = new Mage_Eav_Model_Entity_Setup('core_setup'); $installer->startSetup(); $aManufacturers = array('Sony','Philips','Samsung','LG','Panasonic','Fujitsu','Daewoo','Grundig',

Magento ORM Documentation

人走茶凉 提交于 2019-12-03 12:10:18
问题 Outside of the source code, is there any extensive documentation on the Magento ORM? I get the basics, and can usually dig through the Mage code base, litter it with Mage::Log calls and figure out something that works, but my efficiency would go way up if I had a high level overview of how the models are intended to be used. How do the aggregate methods work, what's the best way to join, when should you extend the models, when's the best time to use the eav models vs. the non-eav ones, etc.

Database design: EAV options?

与世无争的帅哥 提交于 2019-12-03 08:54:16
This is just a database concept question: what are the pros and cons of the following model for EAV? Model 1: TABLE: attribute_value ====================================== | id | fk_id | attribute | value | ====================================== | 1 | 10 | FName | John | | 2 | 10 | Lname | Doe | | 3 | 55 | FName | Bob | | 4 | 55 | Lname | Smith | -------------------------------------- Model 2: TABLE: attribute ================== | id | attribute | ================== | 1 | FName | | 2 | Lname | ------------------ TABLE: value ===================================== | id | attribute_id | fk_id |

can we have one attribute with multiple values in an eav design?

筅森魡賤 提交于 2019-12-03 08:36:35
i am doing a database design using EAV. I am facing an issue when i try to model an entity with attribute having multiple values? For example Entity id | name | description -- | ---- | ------------ 1 | configuration1 | configuration1 Attribute id | entityId | name | type -- | -------- | ---- | ---- 1 | 1 | att1 | string 2 | 1 | att2 | int 3 | 1 | att3 | List<String> (How will i model this?) Value id | attributeId | value -- | ----------- | ----- 1 | 1 | a 2 | 2 | 1 3 | 3 | b 4 | 3 | c 5 | 3 | d Is this the correct way to handle list of values? Please provide any helpful link to model this? Two

How to define structure in a tag-based organization?

心已入冬 提交于 2019-12-03 08:29:11
[former title: Is there a way to force a relationship structure on a tag-based organizational methodology?] I have some entities, and they have a series of attributes. Some of the attributes affect what other attributes the entity can have, many of the attributes are organized into groups, and occasionally entities are requited to have certain numbers of attributes from certain groups, or possibly a range of attributes from certain groups. Is there a way to model these sorts of tag-to-tag relationships, such as requirement, grouping, exclusion, etc. using a database, or is this only possible

Looking for a right EAV structure based on jsonb

落爺英雄遲暮 提交于 2019-12-03 08:03:12
I wondering what will be the right approach to build EAV on jsonb. I have Attribute -> Values tables as like in standard EAV. CREATE TABLE attribute_values ( id INTEGER, attribute_id INTEGER, value VARCHAR(255) ); CREATE TABLE attributes ( id INTEGER, name VARCHAR(255) ); Values will saved in attributes filed of Entity CREATE TABLE entity ( id INTEGER, title TEXT, attributes JSONB ); Tables Attribute created to control duplicate attributes their types and better determine what it's a attribute is. For example to avoid: {weight: 100} and {Weight: 100} or {weigh: 100} . Values for work with

Database Structure involving dynamic fields

情到浓时终转凉″ 提交于 2019-12-03 07:40:00
问题 Im working on a project. Its mostly for learning purposes, i find actually trying a complicated project is the best way to learn a language after grasping the basics. Database design is not a strong point, i started reading up on it but its early days and im still learning. Here is my alpha schema, im really at the point where im just trying to jot down everything i can think of and seeing if any issues jump out. http://diagrams.seaquail.net/Diagram.aspx?ID=10094# Some of my concerns i would

How would you design your database to allow user-defined schema

匆匆过客 提交于 2019-12-03 02:28:52
问题 If you have to create an application like - let's say a blog application, creating the database schema is relatively simple. You have to create some tables, tblPosts, tblAttachments, tblCommets, tblBlaBla… and that's it (ok, i know, that's a bit simplified but you understand what i mean). What if you have an application where you want to allow users to define parts of the schema at runtime . Let's say you want to build an application where users can log any kind of data. One user wants to log

Database Structure involving dynamic fields

旧街凉风 提交于 2019-12-02 21:08:06
Im working on a project. Its mostly for learning purposes, i find actually trying a complicated project is the best way to learn a language after grasping the basics. Database design is not a strong point, i started reading up on it but its early days and im still learning. Here is my alpha schema, im really at the point where im just trying to jot down everything i can think of and seeing if any issues jump out. http://diagrams.seaquail.net/Diagram.aspx?ID=10094# Some of my concerns i would like feedback on: Notice for the core attributes like area for example, lets say for simplicity the

Table Module vs. Domain Model

我怕爱的太早我们不能终老 提交于 2019-12-02 18:10:45
I asked about Choosing a method to store user profiles the other day and received an interesting response from David Thomas Garcia suggesting I use the Table Module design pattern. It looks like this is probably the direction I want to take. Everything I've turned up with Google seems to be fairly high level discussion, so if anyone could point me in the direction of some examples or give me a better idea of the nuts and bolts involved that would be awesome. The best reference is "Patterns of Enterprise Application Architecture" by Martin Fowler: Here's an excerpt from the section on Table