Skip to main content

Manage Custom Fields in the Database

There a lot of debates about how to store custom fields in database. Here is some interesting links that help me to get decision (in my case is EVA solution :-))

Storing Custom Fields in the Database (see also comments) - http://blog.springframework.com/arjen/archives/2008/01/24/storing-custom-fields-in-the-database/

Thread from forum - http://osdir.com/ml/bug-tracking.bugzilla.devel/2005-01/msg00191.html

Guide to the EAV (FAD) - http://weblogs.sqlteam.com/davidm/articles/12117.aspx

http://en.wikipedia.org/wiki/Entity-Attribute-Value_model

The circumstances where you would need to go beyond standard row-modeling to EAV are listed below:

  • The data types of individual attributes varies (as seen with clinical findings).
  • The categories of data are numerous, growing or fluctuating, but the number of instances (records/rows) within each category is very small. Here, with conventional modeling, the database’s Entity-Relationship Diagram might have hundreds of tables, with the tables containing thousands/ millions of rows/instances emphasized visually to the same extent as those with very few rows; the latter are candidates for EAV.
    This situation arises in ontology-modeling environments, where categories ("classes") must often be created on the fly, and some classes are often eliminated in subsequent cycles of prototyping.
  • Certain ("hybrid*) classes have some attributes that are non-sparse (present in all or most instances), while other attributes are highly variable and sparse. The latter are suitable for EAV modeling. classes are seen in business database applications. For example, descriptions of products made by a conglomerate corporation depend on the product category, e.g., the attributes necessary to describe a brand of light bulb are quite different from those required to describe a medical imaging device, but both have common attributes such as packaging unit and per-item cost.

Comments

Popular posts from this blog

Reflector for .Net - amaizing how open your .Net source code

Reflector for .Net - Reflector is the class browser, explorer, analyzer and documentation viewer for .NET. Reflector allows to easily view, navigate, search, decompile and analyze .NET assemblies in C#, Visual Basic and IL. At same site there are also other interesting tools like: Resourcer for .NET - Resourcer is an editor for .resources binaries and .resX XML file formats used with the .NET platform Mapack for .NET - Mapack is a .NET class library for basic linear algebra computations.

Asynchronous pages in C# - When to Use It?

When do we need asynchronous page in ASP.net. Suppose you have a website with two web pages. One is your home page which display's a greeting, and the second page displays a large dataset from a database. You have 25 threads in your thread pool. 25 people simultaneously are accessing the database query page, and one additional person comes onto the site to see the home page which has static content on it. http://davidjberman.com/blogs/csharp/archive/2007/08/13/how-to-create-asynchronous-asp-net-pages-using-c.aspx

Dynamic Data Error - "'DropDownList1' has a SelectedValue which is invalid because …"

During my first investigation of Dynamic Data Support at .NET 3.5 environment, I've found that even Microsoft has bug :-))) After the following great instructions of following screen-cast I've finished in few minutes with applications that allows me to maintain all my database tables. The problem is that already at third screen I've played with I got following error message: 'DropDownList1' has a SelectedValue which is invalid because it does not exist in the list of items. Fortunately, I'm not the first who is plying with Dynamic Data at .NET 3.5 so at this blog you can find fix and good explanation of this bug.