News Feed
Sections




News Archive
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
July 31, 2008 @ 12: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.

1 comment voice your opinion now!
eav modeling database attribute query common alternative method


blog comments powered by Disqus

Similar Posts

Nick Halstead's Blog: 10 Reasons why PHP is still very much alive

Content with Style Blog: Zend Framework DB and Mysql pre 5.17

Ian Selby's Blog: Dynamically Add Functions to PHP Classes

Sameer Borate: Storing images into a database - resolving a contentious matter

Lukas Smith's Blog: Transforming end user queries to Solr


Community Events





Don't see your event here?
Let us know!


laravel opinion list developer introduction release threedevsandamaybe code install testing series community podcast language interview api refactor unittest symfony2 framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework