• Bhushan Kulkarni (12/21/2015)


    Hi,

    In our project, we have requirement such that user can set user defined properties for Entities- these properties will be dynamic.

    So we implemented it using EAV model.

    Base table is BaseEntity which stored basic information of Entity such as Name, createddate, createdby,BusinessEntityType etc.

    And BaseEntityAttribute table stores dynamic properties for each entity in key value pair.

    User can set upto 500 properties for each entity and on an average each business entity has 25 properties.

    So this is causing performance issues when we retrieve data for Particular Business Entity type. We are using Pivot while retrieving data.

    We cant not use XML data type as User may add new property or delete any existing property.

    Is there any alternative in SQL Server 2008R2 or 2012 version.

    Or we need to look to for any NoSQL Database.

    Please give your suggestion that will really help us.

    Thanks

    Quick question, why can't you use XML?

    😎

    Suggest you look into sparse columns, supported by SQL Server 2008R2 and later, very efficient way of handling this and no need for pivoting the data.