Why isn't there a group_type column in the groups table?
Because that would be a denormalisation. Why isn't there object type (group type) information in any of the object tables? It's in
acs_objects
.
The group_types.group_type column references the acs_objects.object_type column...
It references the
acs_object_types.object_type
column.
Can you get a list of customer groups the user belongs to by:
select
m.group_id
from
group_approved_member_map m,
acs_objects o
where
m.member_id = :customer_id
and o.object_type = :customer_group_type
and o.object_id = m.group_id