How do you create an extensible data model?

I am going to create an e-commerce application with an extensible data model using NHibernate and Fluent NHibernate. Having an extensible data model, I have the opportunity to define a Product object and allow the user in the application to expand it with new fields / properties with different data types, including user data types.

Example: A product may have fields to add, such as: Size - int Color - string Price - decimal Collection ColoredImage - name, image (for example, "Red", red.jpg (binary file))

An additional requirement is the ability to filter products with these additional / advanced fields. How to implement this?

Thanks in advance.

+4
source share
5 answers
+1

- EAV (Entity-Attribute-Value).

, , ( , )

, (sympthoms).

Entity (Id) (, Product) (Id, ColumnName) (EntityId, AttributeId, )

.

, , . : ShortStringValue (EntityId, AttributeId, nvarchar (50)); LongStringValue (EntityId, AttributeId, nvarchar (2048)); MemoValue (EntityId, AttributeId, nvarchar (max)); IntValue (EntityId, AttributeId, int);

: ColorComponentsValue (EntityId, AttributeId, R int, G int, B int);

, EAV . EAV , Product. , EAV.

, . , , . .

, : , , , - , . , .

EAV 20 4 , .

+1

XML XPath/XQuery . XML, ExtendedData, .

0

- , .

NOSQL (couchDB, mongoDB, cassandre...) propretyfield, , .

0

N2 CMS (http://n2cms.com), . , . , , , HQL, , , QueryOver/Linq, . ContentItem, DetailCollection, ContentDetail, QueryBuilder/DetailCriteria.

0

All Articles