Skip to Content.
Sympa Menu

grouper-dev - Re: [grouper-dev] referential integrity of membership owners

Subject: Grouper Developers Forum

List archive

Re: [grouper-dev] referential integrity of membership owners


Chronological Thread 
  • From: Tom Barton <>
  • To: Chris Hyzer <>
  • Cc: "" <>
  • Subject: Re: [grouper-dev] referential integrity of membership owners
  • Date: Fri, 02 Jan 2009 16:51:51 -0600

Your idea makes sense to me. -Tom

Chris Hyzer wrote:
Hey,


Im thinking more about the grouper registry data design and improvements we can make for 1.5. In the grouper_memberships table, there is an owner_id col, which points to the group id or stem id that the membership involves. It is impossible to put a foreign key on this col since it points to two different tables.


I bet we could relatively easily change the data model (and perhaps not the java object model), so that instead of owner_id, there is owner_group_id and owner_stem_id which would be mutually exclusive. Then we could put foreign keys on those columns so we know the uuid’s are valid. Another advantage is when using the data model (e.g. for triggers or views or whatever), it isn’t easy to tell if a membership record involves a group or stem, it requires a lookup in another table (either field table, or groups or stems).


Any thoughts on this?


Thanks,

Chris





Archive powered by MHonArc 2.6.16.

Top of Page