Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Arnold Daniels' Blog:
An alternative way of EAV modeling
Jul 31, 2008 @ 17:54:23

Arnold Daniels has posted some thoughts on a topics recently featured in a cover story by php|architect - EAV modeling.

I had seen this db structure in other project, but didn't know that it was called EAV. For those who don't read php|architect, EAV describes a method of saving a large set of attributes, only some of which apply to an individual entity. Normally you would create a table, with a row for each entity and save each attribute in a column. With EAV you save each attribute as a row.

He suggests two ways to do the modeling - the more "common" way and an alternative way that splits up the data types to make querying simpler (into scalars and arrays). A sample database structure and example query for it are included.

tagged: eav modeling database attribute query common alternative method

Link:

Matthew Turland's Blog:
EAV Modeling - Square Peg in a Round Hole?
Jul 25, 2008 @ 16:14:15

Matthew Turland has posted about a topic that was the subject of a recent cover story in php|architect magazine - EAV modeling.

The mental image that came to me when reading about this approach to data modeling was taking the traditional relational table and turning it on its head. [...] EAV actually has to circumvent, work around, or reimplement features that most mainstream database servers today provide "for free" to the traditional relational counterparts of EAV in order to get equal functionality.

He talks about features the structure has (including row-level referential integrity and schema metadata) and points out some of the other document-focused database systems like Lucene and CouchDB.

Check out the story in the June 2008 issue of php|architect for that cover story from Carl Welch.

tagged: eav modeling document based database storage system

Link:


Trending Topics: