← Back to team overview

openerp-expert-framework team mailing list archive

wide tables: res.partner

 

In a recent commit, I just noticed another module that inherits "res.partner" 
and adds 3-4 columns. 
Counted the columns in one db, and found 50. 

I think we're doing something wrong here.

Many modules need to store information per partner. They just add extra fields 
in the table. They also add one boolean field "is_member", "is_employee", 
"is_clown" etc. 
The same, of course, may be true for other tables, like product, for example.

I suggest, generally, that we avoid this pattern in setting up our schema. My 
feeling is that we waste resources (although pg's toast does compression) in 
storing NULLs for all these columns.

At least, these booleans could be somehow covered by the partner categories.
Then, other explicit data per partner, could be put in an "attributes" table.

wdyt?



Follow ups