Forum OpenACS Q&A: Response to trying to understand the acs_attributes table... what are sort_order, static_

what is "sort_order" used for? I think i know why if they are "unique key" all the values in my table "1" - is it because sort order only needs to be unique in relation to attribute_id - is this correct?

In the problem set 4 datamodel, sort_order was for ordering in table creation when writing a code generation script. I am not sure why it has a unique constraint in acs_attributes.

Also, what is the intended purpose of the static_p field?

from packages/acs-kernel/sql/postgresql/acs-metadata-create.sql...

"comment on column acs_attributes.static_p is ' Determines whether this attribute is static. If so, only one copy of the attribute''s value exists for all objects of the same type. This value is stored in acs_static_attr_values table if storage_type is "generic". Otherwise, each object of this type can have its own distinct value for the attribute."

Am i correct in assuming that i can have a repeated pretty_name as long as it belongs to an object other than the one i am creating for my package

Yes.