Presentation is loading. Please wait.

Presentation is loading. Please wait.

The interplay of mandatory role and set-comparison constraints Dr. Peter Bollen School of Business and Economics Maastricht University, the Netherlands.

Similar presentations


Presentation on theme: "The interplay of mandatory role and set-comparison constraints Dr. Peter Bollen School of Business and Economics Maastricht University, the Netherlands."— Presentation transcript:

1 The interplay of mandatory role and set-comparison constraints Dr. Peter Bollen School of Business and Economics Maastricht University, the Netherlands e-mail: p.bollen@maastrichtuniversity.nlp.bollen@maastrichtuniversity.nl 1 Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy

2 Introduction In this presentation we will give a formal modeling procedure to derive mandatory role constraints that is a further specification of step 6 of the ORM-CSDP. This procedure will contain an algorithm that can be applied by an analyst in an analyst-user dialogue leading leading to a complete procedure-driven derivation of all mandatory role constraints in a given Universe of Discourse (UoD). Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy2

3 Definition of Mandatory Role constraints In the FBM defining literature a mandatory role is defined as follows: ‘A role is mandatory if and only if, for all states of the database, the role must be played by every member of the population of its object type; otherwise the role is optional’ (Halpin and Morgan, 2008: p. 162). Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy3

4 The Conceptual Schema Design Procedure in Fact- based Modeling Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy4 CSDP StepsHalpin and Morgan (2008) step 1From examples to elementary facts step 2Draw fact types and populate step 3Trim schema; note basic derivations step 4Add uniqueness constraints and check arity of fact types step 5 Add mandatory role constraints and check for logical derivations step 6Add value, subset, equality, exclusion and subtype constraints step 7Add other constraints and perform final checks

5 If we for example consider the following fact types: Person lives at Address Person owns Car and the following documented business rule: For every Person an Address must be recorded This business rule maps to a mandatory role constraint defined on the Person role of the Person lives at Address fact type. Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy5

6 In some exploratory knowledge domains the tacit (business) rules that govern the domain can only be made explicit by rigorously applying a conceptual schema design procedure in which the FBM analyst present permutations of domain examples to the domain expert in order to derive instances of domain constraints. Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy6

7 The set-comparison constraint derivation algorithm (presented during ORM 2011) Algorithm 2: Set comparison constraint derivation. BEGIN take first role combination WHILE still rolecombinations SETCOMPARISON_on_2_rolecombinations Let (R1,....RN) and (RN+1,....R2n) be the role combinations on which the set comparison should be performed. Let (a1,.. M) be a sentence instance of the fact type (FT1) that contains roles (R1,....RN) (MN) Let N+1,.. 2N+L and N+1,.. 2N+L be sentence instances of the fact type (FT2) that contains roles (RN+1,....R2n) Furthermore, let IM:={FT1,FT2}. Create three user examples that reflect following fact type extensions (FT1+FT2): EXT1(IM): { (1,.. M)} EXT2(IM): { (1,.. M),( N+1,.. 2N+L) | 1=N+1 ,.. N= 2N} EXT3(IM): { (1,.. M),( N+1,.. 2N+L), (N+1,.. 2N+L) | 1=N+1 ,.. N= 2N} Let the user determine which of these extensions refer to an allowed population state for the universe of discourse by showing (sets of) real-life examples that match these three extensions one at a time. Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy7 ENDWHILE END

8 The kernel of the set-comparison constraint derivation algorithm consists of the generation of 3 example populations for each pair of role (combination)(s) on which potentially set-comparison constraints can be defined. For each pair of roles played by the same object type, the following example extensions have to be generated: Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy8

9 Summarizing the results of the application of the set-comparison derivation algorithm We note that for the other 4 possible outcomes of the algorithm no set-comparison constraints will be derived. Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy9 1234 EXT1AllowedNot Allowed Allowed EXT2Allowed Not Allowed EXT3Not AllowedAllowedNot Allowed Constraint type Subset1 (FT2->FT1) Subset2 (FT1->FT2) equalityexclusion

10 An integrated algorithm to derive mandatory role and set- comparison constraints We will now take the set-comparison constraint derivation algorithm as a starting point for an integrated algorithm in which we can ‘derive’ the mandatory role constraints by analyzing the subset- and equality constraint configurations that are centered around a given object type. It is further assumed that the ‘independence’ status of this object type is known. Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy10

11 The integrated algorithm will contain the set-comparison derivation algorithm. The outcome of the first step in the algorithm will contain all set-comparison constraints between pairs of role(s) (combinations) and will therefore lead to a constraint configuration as is shown on the next slide. Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy11

12 Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy12

13 Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy13 Algorithm A BEGIN Algorithm derive set-comparison and mandatory role(fact type model,object type). WHILE still rolecombinations left DO Take next_2_role_combination Algorithm SETCOMPARISON_on_2_rolecombinations(see [7]) ENDWHILE create a tabular format by 1. copying subset constraints 1-on-1 into the table 2. copying exclusion constraints into exactly one of the applicable table cells. 3. copying an equality constraint as 2 subset constraints, mirrored across the diagonal of the table 4. remove all copied set-comparison constraints from the information model take the first column from the table WHILE still columns left DO Take next column. Check all entries in the column IF (all column entries = subset constraint AND object type IS NOT independent) THEN mandatory role defined for the role on the column. Remove subset constraints from column ENDIF ENDWHILE WHILE still constraint entries in table DO check next constraint IF constraint=subset THEN check for mirrored constraint IF mirrored constraint exist THEN add equality constraint in model Remove both subset constraints fr table ELSE add subset constraint in model Remove sub-set constraint from table ENDIF ELSE add exclusion constraint to model Remove exclusion constraint from table ENDIF ENDWHILE Remove implied constraints END

14 Create a tabular format by: 1.copying subset constraints 1-on-1 into the table 2. copying exclusion constraints into exactly one of the applicable table cells. 3. copying an equality constraint as 2 2 subset constraints, mirrored across the diagonal of the table 4. remove all copied set-comparison constraints from the information model

15 IF (all column entries = subset constraint AND object type IS NOT independent) THEN mandatory role defined for the role on the column. Remove subset constraints from column ENDIF IF mirrored constraint exist THEN add equality constraint in model Remove both subset constraints fr table ELSE add subset constraint in model Remove sub-set constraint from table ENDIF Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy15

16 Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy16

17 Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy17

18 Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy18

19 The integration of the mandatory role and set-comparison constraints from local sub- schemas to a global schema By integrating two conceptual schemas, (some of) the mandatory role constraints in the local conceptual schema(s) cannot directly be copied into the integrated schema that captures the global ‘semantics’ of the local mandatory role constraint. Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy19

20 We therefore, propose to apply the set- comparison constraint derivation algorithm first when analyzing the ‘local’ UoD’s Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy20

21 Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy21 In UoD1 we have fact types and constraints that represent the following (local) domain semantics: Each employee has exactly one rank. Each employee has exactly one supervisor Each supervisor is an employee. In UoD2 we have the following (local) domain semantics: Each employee is located in exactly one room An employee can be reached via zero, one or more telephone extensions. Note that in UoD2 only a subset of the ‘global’ employee population is relevant: those employees that are located in a room. This explains the existence of mandatory role constraint c7 in the right-hand figure.

22 Proto Conceptual schemas Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy22

23 Semantics of the integrated domain Each employee has exactly one rank. Each employee has exactly one supervisor Each supervisor is an employee. An employee can be located in a room. An employee that is located in a room can be reached via zero, one or more telephone extensions Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy23

24 We notice that the result of the integration of the local schemas into a global schema with global semantics has had the following implications in terms of the mandatory role and set-comparison constraints: mandatory role constraint c7 in the local schema has been replaced by subset constraint c8 in the global schema. Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy24

25 In this case it is recommended to apply the set- comparison derivation algorithm in for the creation of the local proto conceptual schemas. In an integration step of two (or more) proto conceptual schemas the same algorithm can be applied on those new role combinations that have emerged from the federation of the local proto conceptual schemas into the new ‘global’ proto-conceptual schema (procedure beta ). The latter schema can now serve as input for procedure gamma, i.e. the application of the 2 nd part of the set- comparison and mandatory role derivation algorithm to map the set-comparison constraints to mandatory role and remaining (non-implied) set comparison constraints Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy25

26 Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy26

27 Conclusion In this presentation we have shown that the algorithm for the ‘example-based’ derivation of set-comparison constraints can be used as a starting point for an integrated algorithm that will generate the mandatory role and the non-implied set-comparison constraints. We have also shown that for the integration of multiple ‘local’ conceptual schemas, the logic of the algorithm allows us to integrate those sub-schemas with a minimum of integration effort. By expressing the mandatory role constraints in the local (proto) schema as (combinations of) set comparison constraints the process of data federation can focus on the derivation of set-comparison constraints for the ‘new’ role combinations that govern the integrated UoD. Dr. Peter Bollen, ORM 2012, 13 September 2012, Rome, Italy27


Download ppt "The interplay of mandatory role and set-comparison constraints Dr. Peter Bollen School of Business and Economics Maastricht University, the Netherlands."

Similar presentations


Ads by Google