How Best to Handle People’s “Attributes”?

In the process of re-writing “FOCUS” in FM12, I’m experimenting with different ways of recording people’s attributes.  I’ve realised that there’s logically no difference between a person’s gender, and the fact that s/he likes football – both of these can be regarded simply as attributes, i.e. “IsFemale” and “LikesFootball”.  In terms of reporting and counting, I think it will be much easier to treat all attributes equally, i.e. that a person either has them or doesn’t.

A while ago, I documented the way that I’ve  been handling simple “on/off” attributes, which I’ve called “tags” in the current version of the system.  Here’s that blog post – it seems to work pretty well, and the users have said that they like it.

However, because this deals only with “on/off” tags, the technique needs a bit of refinement – if I’m going to use it for things like gender, sexuality, ethnicity, etc., I need to build in the “switching off” of any currently held setting.  After all, if a person is already on the system as “female”, and we realise that we’ve recorded their gender wrongly, we can’t simply add the “IsMale” attribute – we also need to remove “IsFemale”.

So, on the Attribute record, in addition to holding the Attribute itself (“IsMale”, “Likes football”, etc.), I’m now also storing an indicator, “IsExclusive”, and an attribute type (“gender”, “sexualilty”, “tag”, etc.).  If the “IsExclusive” indicator is set to 1, it means that if a person has one attribute of this type, s/he can’t hold another.

I have to say that all this seems a bit over-complicated when the alternative is simply to have a “gender” field, possibly with a couple of Boolean calcs (IsMale and IsFemale), to be used for counting and reporting.  But there’s a real attraction in having all attributes in one place, and handled in the same way.

If you have any thoughts, opinions, or experience in this area, please comment!

Advertisements

One Comment on “How Best to Handle People’s “Attributes”?”

  1. Denis Somar says:

    I’ve thought about using this kind of key/value format for storage for a Settings table in a FM vertical market solution that would make life substantially easier for adding preferences etc.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s