Index: openacs-4/packages/acs-core-docs/www/groups-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/groups-design.html,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-core-docs/www/groups-design.html 28 Feb 2003 05:36:04 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/groups-design.html 24 Jun 2003 03:58:11 -0000 1.9 @@ -1,15 +1,15 @@ -OpenACS 4 Groups Design

OpenACS 4 Groups Design

+OpenACS 4 Groups Design

OpenACS 4 Groups Design

by Rafael H. Schloming and Mark Thomas
- OpenACS docs are written by the named authors, but may be edited + OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

Essentials

Introduction

Almost all database-backed websites have users, and need to model the +

Essentials

Introduction

Almost all database-backed websites have users, and need to model the grouping of users. The OpenACS 4 Parties and Groups system is intended to provide the flexibility needed to model complex real-world organizational structures, particularly to support powerful subsite services; that is, where one OpenACS installation can support what appears to the user as distinct web services -for different user communities.

Historical Considerations

The primary limitation of the OpenACS 3.x user group system is that it +for different user communities.

Historical Considerations

The primary limitation of the OpenACS 3.x user group system is that it restricts the application developer to representing a "flat group" that contains only users: The user_groups table may contain the group_id of a parent group, but parent-child relationship @@ -26,7 +26,7 @@ (e.g., a row with a scope value of "group" but a null group_id)

  • perform extra checks in Tcl and PL/SQL functions and procedures to check both the user_id and -group_id values

  • Competitive Analysis

    ...

    Design Tradeoffs

    The core of the Group Systems data model is quite simple, but it was +group_id values

    Competitive Analysis

    ...

    Design Tradeoffs

    The core of the Group Systems data model is quite simple, but it was designed in the hopes of modeling "real world" organizations which can be complex graph structures. The Groups System only considers groups that can be modeled using directed acyclic graphs, but queries over these @@ -39,7 +39,7 @@ without making the system too complex or too slow. The added triggers, views, and tables and will increase storage requirements and the insert and delete times in an effort to speed access time. The limited flexibility (no updates -on membership) trades against the complexity of the code.

    Data Model Discussion

    The Group System data model consists of the following tables:

    parties +on membership) trades against the complexity of the code.

    Data Model Discussion

    The Group System data model consists of the following tables:

    parties

    The set of all defined parties: any person, user, or group must have a corresponding row in this table.

    persons @@ -62,16 +62,16 @@

    The set of direct membership relationships between a group and a party.

    group_member_index -

    A mapping of a party P to the groups -{Gi}the party is a member of; this mapping +

    A mapping of a party P to the groups +{Gi}the party is a member of; this mapping includes the type of relationship by including the appropriaterel_id from the membership_rels table.

    composition_rels

    The set of direct component relationships between a group and another group.

    group_component_index -

    A mapping of a group Gto the set of groups -{Gi} that G is a component of; +

    A mapping of a group Gto the set of groups +{Gi} that G is a component of; this mapping includes the type of relationship by including the appropriaterel_id from the composition_rels table.

    New groups are created through the group.new constructor. When a specialized type of group is required, the group type can be extended @@ -116,26 +116,26 @@

    A person may appear in the group member map multiple times, for example, by being a member of two different groups that are both components of a third -group. This view is strictly a mapping of approved members +group. This view is strictly a mapping of approved members to groups.

    group_component_map -

    A mapping of a group Gto the set of groups -{Gi} group G is a component of; +

    A mapping of a group Gto the set of groups +{Gi} group G is a component of; this mapping includes the type of relationship by including the appropriaterel_id from the composition_rels table.

    party_member_map -

    A mapping of a party P to the set of parties -{Pi} party P is a member +

    A mapping of a party P to the set of parties +{Pi} party P is a member of.

    party_approved_member_map -

    A mapping of a party P to the set of parties -{Pi} party P is an -approved member of.

    API

    +

    A mapping of a party P to the set of parties +{Pi} party P is an +approved member of.

    API

    The API consists of tables and views and PL/SQL functions. -

    Tables and Views

    The group_types table is used to create new types of groups.

    The group_member_map, group_approved_member_map, +

    Tables and Views

    The group_types table is used to create new types of groups.

    The group_member_map, group_approved_member_map, group_distinct_member_map, group_component_map, party_member_map, and party_approved_member_map views are -used to query group membership and composition.

    PL/SQL API

    Person

    person.new creates a new person and returns the +used to query group membership and composition.

    PL/SQL API

    Person

    person.new creates a new person and returns the person_id. The function must be given the full name of the person in two pieces: first_names and last_name. All other fields are optional and default to null except for object_type which defaults @@ -162,7 +162,7 @@ function person.name ( person_id persons.person_id%TYPE ) return varchar; -

    User

    acs_user.new creates a new user and returns the user_id. +

    User

    acs_user.new creates a new user and returns the user_id. The function must be given the user's email address and the full name of the user in two pieces: first_names and last_name. All other fields are optional. The interface for this function is:

    @@ -204,7 +204,7 @@
     procedure acs_user.unapprove_email (
       user_id       users.user_id%TYPE
     );
    -

    Group

    acs_group.new creates a new group and returns the +

    Group

    acs_group.new creates a new group and returns the group_id. All fields are optional and default to null except for object_type which defaults to 'group', creation_date which defaults to sysdate, and @@ -232,7 +232,7 @@ group_id groups.group_id%TYPE, party_id parties.party_id%TYPE, ) return char; -

    Membership Relationship

    membership_rel.new creates a new membership relationship type +

    Membership Relationship

    membership_rel.new creates a new membership relationship type between two parties and returns the relationship type's rel_id. All fields are optional and default to null except for rel_type which defaults to membership_rel. The interface for this function is:

    @@ -278,7 +278,7 @@
     procedure membership_rel.delete (
       rel_id           membership_rels.rel_id%TYPE
     );
    -

    Composition Relationship

    composition_rel.new creates a new composition relationship type +

    Composition Relationship

    composition_rel.new creates a new composition relationship type and returns the relationship's rel_id. All fields are optional and default to null except for rel_type which defaults to composition_rel. The interface for this function is:

    @@ -295,10 +295,10 @@
     procedure membership_rel.delete (
       rel_id           composition_rels.rel_id%TYPE
     );
    -

    User Interface

    Describe the admin pages.

    Configuration/Parameters

    ...

    Acceptance Tests

    ...

    Future Improvements/Areas of Likely Change

    ...

    Authors

    System creator +

    User Interface

    Describe the admin pages.

    Configuration/Parameters

    ...

    Acceptance Tests

    ...

    Future Improvements/Areas of Likely Change

    ...

    Authors

    System creator

    Rafael H. Schloming

    System owner

    Rafael H. Schloming

    Documentation author -

    Mark Thomas

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation08/22/2000Rafael H. Schloming
    0.2Initial Revision08/30/2000Mark Thomas
    0.3Additional revisions; tried to clarify membership/compostion09/08/2000Mark Thomas
    View comments on this page at openacs.org
    +

    Mark Thomas

    Revision History

    Document Revision #Action Taken, NotesWhen?By Whom?
    0.1Creation08/22/2000Rafael H. Schloming
    0.2Initial Revision08/30/2000Mark Thomas
    0.3Additional revisions; tried to clarify membership/compostion09/08/2000Mark Thomas
    View comments on this page at openacs.org