开发者

Can I use EAV Database Pattern ( Open Schema or Schemaless ) in MySql instead of MongoDB or COuchDB?

I only have access to MySql and I need to create a System to manage Content ( mostly blog-posts ) Can I just create a MySql table called 'content-units' with 3 FIELDS cal开发者_如何学Goled 'id' , 'key' and 'value' and then keep on adding rows in the Table like 'id' (auto_increment) , 'title' = 'xxxx' , 'body' = 'yyyyyyyyyyyyy' and so on..... I mean to ask MySql table to behave like in Schema less Databases. Will it work or be worth it ?


Surely you can do that. You probably want to make the tables MyIsam for that.

If you control the rdbms server (Which you probably don't though), you might want to take a look at handlersocket


A fantastic example of EAV in MySQL is Magento's database architecture. They have recently started replacing tables with flattened versions, but up until 1.2 nearly all of the tables were EAV-based.

Magento utilizes InnoDB heavily for transactions, and MyISAM where appropriate for fulltext indexes.

See this link for more details and diagrams: http://www.magentocommerce.com/wiki/2_-_magento_concepts_and_architecture/magento_database_diagram

Best of luck.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜