Skip to Content.
Sympa Menu

comanage-dev - Re: [comanage-dev] CO-94 Demographics vs data model

Subject: COmanage Developers List

List archive

Re: [comanage-dev] CO-94 Demographics vs data model


Chronological Thread 
  • From: Benn Oshrin <>
  • To: comanage-dev <>
  • Subject: Re: [comanage-dev] CO-94 Demographics vs data model
  • Date: Thu, 24 Nov 2011 23:15:05 -0500

Ethnicity should be a pop-up since it has two mutually exclusive values (er, I think?). Or not?

Anyway, I'd not worry too much about making it pretty, since as you say we'll have to revisit it with the Fancy New UI. Let's just worry about functional for now.

On 11/22/11 10:29 PM, Marie Huynh wrote:
https://skitch.com/mariehuynh/gk4rm/comanage-registry-edit

I'm having trouble formatting this (e.g. bold the options, shift the
descriptions right) because any html is escaped before rendering if
attached to the checkboxes. We can detach them and put the text in
another column though. Any new thoughts on layout? We'll have to
revisit everything when doing the UI, but I'd like to sprinkle some
more classes for CSS over things now while I'm thinking about it.

On Tue, Nov 22, 2011 at 11:37 AM, Benn
Oshrin<>
wrote:
I think we'll probably want to discuss this on tomorrow's call, but here's a
writeup of the options that have been proposed thus far:

[1] VARCHAR

This was my original proposal. Basically, each option gets a character
representation, and each elected value gets encoded in the VARCHAR. For
example, "race" has 5 possible values and so would be a VARCHAR(5). A person
who identified as "asian" and "black" might be represented as "AB".

[2] INTEGER

Similar to VARCHAR, but using binary logic. Thus "asian" and "black" might
be represented as 1|4 = 5.

[3] WIDE TABLE

Add one column per possible value. Thus

INSERT INTO cm_demographics (co_person_id, race_asian, race_black)
VALUES (123, true, true);

[4] MANY-TO-MANY

Instead of having one table, we have one table per demographic type. Thus

INSERT INTO cm_demographics_race (co_person_id, value)
VALUES (123, 'asian');
INSERT INTO cm_demographics_race (co_person_id, value)
VALUES (123, 'black');

In both cases [1] and [2], the model translates between the encoding and the
view representation.

Note the cm_demographics wiki page is currently a hybrid of [1] and [2].
We'll need to fix that once we decide on a path.

Any other proposals to throw out there before we decide?

-Benn-





Archive powered by MHonArc 2.6.16.

Top of Page