SlideShare ist ein Scribd-Unternehmen logo
1 von 8
Object-Relationships The ]project-open[ Data-Model , Frank Bergmann,  2010-09-22 This tutorial explains how to create generic relationships between OpenACS/]project-open[ objects. Such relationships include the “is-member-of” relationship between users and business objects, but also relationships like “is-employee-of”, “is-invoice-for”, “is-group-member-of” etc.
GUI Example ,[object Object],[object Object],[object Object]
Types of Relationships ,[object Object],[object Object],Company Other Company User Project Other User is_customer (1:n rel) is_member is_member (project manager) is_member is_friend (Sample N:M Relationships between a user and several ]po[ objects)
The acs_rels Table ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],rel_type object_id_two rel_id acs_rels object_id_one SELECT p.project_name, im_name_from_user_id(u.user_id) as user_name FROM acs_rels r, im_projects p, users u WHERE r.object_id_one = p.project_id and r.object_id_two = u.user_id user_id user . . . username (A sample SQL query to list all user-project memberships) The acs_rels table is essentially a generic mapping table for acs_objects. Once we come up with a way to associate attributes with relationship types, we could replace many of the ACS 3.x mapping tables like user_content_map, user_group_map, and user_group_type_modules_map with this one table. Much application logic consists of asking questions like "Does object X have a relationship of type Y to object Z?" where all that differs is X, Y, and Z. Thus, the value of consolidating many mapping tables into one is that we can provide a generic API for defining and querying relationships. In addition, we may need to design a way to enable "type_specific" storage for relationships (i.e., foreign key columns for one-to-many relationships and custom mapping tables for many-to-many relationships), instead of only supporting "generic" storage in the acs_rels table. This would parallel what we do with acs_attributes. project_id im_projects project_name . . . project_nr
Relationship Types ,[object Object],rel_id im_biz_object_members object_role_id ,[object Object],[object Object],percentage object_id object_type acs_objects rel_id acs_rels object_id_one object_id_two rel_type rel_id membership_rels member_state rel_id admin_rels rel_id composition_rels rel_id group_rels rel_type group_id rel_type acs_rel_type object_type_two role_one object_type_one role_two min_n_rels_one max_n_rels_one min_n_rels_two max_n_rels_two
Range and Domain Constraints ,[object Object],[object Object],[object Object],[object Object],[object Object],Object 1 Object 2 relationship Domain (Example: Person) Range (Example: Project) ( Relationship can be constraint to specific Domain and Range for consistency checking ) rel_type acs_rel_type object_type_two role_one object_type_one role_two min_n_rels_one max_n_rels_one min_n_rels_two max_n_rels_two
Exercises ,[object Object],[object Object]
Frank Bergmann [email_address] www.project-open.com

Weitere ähnliche Inhalte

Mehr von Klaus Hofeditz

]project-open[ Screenshots
]project-open[ Screenshots ]project-open[ Screenshots
]project-open[ Screenshots
Klaus Hofeditz
 
]project-open[ CVS+ACL Permission Configuration
]project-open[ CVS+ACL Permission Configuration]project-open[ CVS+ACL Permission Configuration
]project-open[ CVS+ACL Permission Configuration
Klaus Hofeditz
 

Mehr von Klaus Hofeditz (20)

Serious Sencha - Data Layer and Server-Side REST Interface
Serious Sencha - Data Layer and Server-Side REST InterfaceSerious Sencha - Data Layer and Server-Side REST Interface
Serious Sencha - Data Layer and Server-Side REST Interface
 
]project-open[ Budget Planning and Tracking
]project-open[ Budget Planning and Tracking]project-open[ Budget Planning and Tracking
]project-open[ Budget Planning and Tracking
 
Serious Sencha - Using Sencha ExtJS/Touch for Enterprise Applications
Serious Sencha - Using Sencha ExtJS/Touch for Enterprise ApplicationsSerious Sencha - Using Sencha ExtJS/Touch for Enterprise Applications
Serious Sencha - Using Sencha ExtJS/Touch for Enterprise Applications
 
Eclipse Mylyn Integration with ]project-open[
Eclipse Mylyn Integration with ]project-open[Eclipse Mylyn Integration with ]project-open[
Eclipse Mylyn Integration with ]project-open[
 
]project-open[ on Amazon AWS
]project-open[ on Amazon AWS]project-open[ on Amazon AWS
]project-open[ on Amazon AWS
 
Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[
Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[
Tutorial: Writing Sencha Touch Mobile Apps using ]project-open[
 
]project-open[ Data-Model 100511b
]project-open[ Data-Model 100511b]project-open[ Data-Model 100511b
]project-open[ Data-Model 100511b
 
]project-open[ Screenshots
]project-open[ Screenshots ]project-open[ Screenshots
]project-open[ Screenshots
 
]project-open[ CVS+ACL Permission Configuration
]project-open[ CVS+ACL Permission Configuration]project-open[ CVS+ACL Permission Configuration
]project-open[ CVS+ACL Permission Configuration
 
Po workflow-tutorial-1-overview.100603
Po workflow-tutorial-1-overview.100603Po workflow-tutorial-1-overview.100603
Po workflow-tutorial-1-overview.100603
 
]project-open[ Reporting & Indicators Options
]project-open[ Reporting & Indicators Options]project-open[ Reporting & Indicators Options
]project-open[ Reporting & Indicators Options
 
]project-open[ Workflow Developer Tutorial Part 4
]project-open[ Workflow Developer Tutorial Part 4]project-open[ Workflow Developer Tutorial Part 4
]project-open[ Workflow Developer Tutorial Part 4
 
]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3]project-open[ Workflow Developer Tutorial Part 3
]project-open[ Workflow Developer Tutorial Part 3
 
]project-open[ Workflow Developer Tutorial Part 2
]project-open[ Workflow Developer Tutorial Part 2]project-open[ Workflow Developer Tutorial Part 2
]project-open[ Workflow Developer Tutorial Part 2
 
]project-open[ Workflow Developer Tutorial Part 1
]project-open[ Workflow Developer Tutorial Part 1]project-open[ Workflow Developer Tutorial Part 1
]project-open[ Workflow Developer Tutorial Part 1
 
]project-open[ Reporting & Indicators Options
]project-open[ Reporting & Indicators Options]project-open[ Reporting & Indicators Options
]project-open[ Reporting & Indicators Options
 
]project-open[ Package Manager
]project-open[ Package Manager]project-open[ Package Manager
]project-open[ Package Manager
 
]project-open[ My First Package
]project-open[ My First Package]project-open[ My First Package
]project-open[ My First Package
 
]project-open[ Data-Model “Categories”
]project-open[ Data-Model “Categories”]project-open[ Data-Model “Categories”
]project-open[ Data-Model “Categories”
 
]project-open[ Roll Out Plan
]project-open[ Roll Out Plan]project-open[ Roll Out Plan
]project-open[ Roll Out Plan
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 

]project-open[ Data-Model: Object-Relationships

  • 1. Object-Relationships The ]project-open[ Data-Model , Frank Bergmann, 2010-09-22 This tutorial explains how to create generic relationships between OpenACS/]project-open[ objects. Such relationships include the “is-member-of” relationship between users and business objects, but also relationships like “is-employee-of”, “is-invoice-for”, “is-group-member-of” etc.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Frank Bergmann [email_address] www.project-open.com