Am Freitag, 24. August 2007 00:50 schrieb Nathaniel Martin:
> I'm hoping that some of the django experts on this list can help me with a
> problem I'm working on designing the architecture of a site I'm working on.
> I want to have many objects that each belong to a category. Each category
> has a bunch of attributes. Each object would set values for each of those
> attributes.

...
[cut]
> B) Have an 'Objects' table, a 'Categories' table, and multiple 'Attributes'
> tables, one for each datatype I think will be used. The 'Objects' table has
> a column tying it to a certain category. The 'Categories' table has a
> column for each attribute table, and lists which attributes are used for
> which table. Each 'Attribute' table stores all the attributes of that
> datatype, with a column pointing to which category and object it's for.
>
> Downsides: Really complicated. I can see this getting very messy very
> quickly. Lots of tables.

I have started an application that uses this approach. It is far from being
finished. I do something like inheritance at database level:

One Category can have an other Category as parent. A subcategory has
all the attributes of its parent and grandparents. 

The user can:
 - change the hierarchie of categories
 - add categories
 - add existing attributes to categories

Up to now he can't:
 - add new attributes. (
    This would need a python file and something like syncdb.
    That should be done by a developer)


 Thomas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to