Maintaining Business Rules

19
Maintaining Business Rules With Function Hierarchy Diagrammer

description

Maintaining Business Rules. With Function Hierarchy Diagrammer. Overview. Business rules: Restrictions that apply to the data set and changes in it or Specific automatic actions that must take place after some change in the set of data. Business Rules in the Repository. - PowerPoint PPT Presentation

Transcript of Maintaining Business Rules

Page 1: Maintaining Business Rules

Maintaining Business Rules

With Function Hierarchy Diagrammer

Page 2: Maintaining Business Rules

Overview

Business rules:• Restrictions that apply to the

data set and changes in itor • Specific automatic actions

that must take place after some change in the set of data

Page 3: Maintaining Business Rules

Business Rules in the Repository• Not a single Repository object

• Part of the data model– Uniqueness constraint– Mandatory relationship

• Part of the descriptive text of Part of the descriptive text of functionsfunctions – Price Paid may not exceed default

price.

Page 4: Maintaining Business Rules

Declaring Business Rules as Relational Constraints

• Uniqueness constraint• Referential constraint• Integrity constraint• Non-transferability constraint• Exclusivity constraint (arc)

Page 5: Maintaining Business Rules

Business Rules That Cannot Be Expressed as Relational

Constraints • Members may not rent more

than two ‘hot’ MOVIES at the same time.

• Terminated MEMBERSHIPS cannot take out new RENTALS.

• MEMBERSHIPS cannot be terminated when they have open RENTALS.

Page 6: Maintaining Business Rules

Documenting More Complex Business Rules

• Pure text• Related to specific entities or

business functions• Coding during build

Page 7: Maintaining Business Rules

Business Rule as Business Function

• Separate business rule hierarchy• Can be associated with entities • Can be associated with other

business functions

Page 8: Maintaining Business Rules

BusinessBusinessRulesRules

Change Event

Authorization

Static Data

Data Operation

Business Rule Classification

Page 9: Maintaining Business Rules

Static Data Rule Examples

Multiple Entity

BusinessBusinessRulesRules

Static Data

Multiple Attr

Entity

Attribute

...Duration of ...Duration of Movie must be Movie must be

positive...positive...

Attribute... Date Lost of ... Date Lost of

Copy must be after Copy must be after Acquire Date...Acquire Date...

Multiple Attr

Entity

……no more than no more than 250 Bookings...250 Bookings...

……cannot rent more cannot rent more than two hot Movies than two hot Movies

simultaneously...simultaneously...

Multiple Entity

Page 10: Maintaining Business Rules

Create

Data Operation

Change Event

Data Operation Rule Examples

Update

Delete

...no new Rentals ...no new Rentals allowed for allowed for terminated terminated

Memberships...Memberships...Create

Update

……Memberships can Memberships can not be terminated not be terminated

when there are still when there are still open Rentals...open Rentals...

...Price History ...Price History may not be deleted may not be deleted

when Effective Date is when Effective Date is in the past...in the past...

Delete

Authorization

Page 11: Maintaining Business Rules

Change Event

Change Event Rule and Authorization Rule

ExamplesChange Event

...when Rental ...when Rental Items are overdue Items are overdue

a reminder must be a reminder must be printed and printed and

mailed...mailed...Authorization...only managers may ...only managers may

terminate terminate Memberships with Memberships with

reason ‘Expelled’...reason ‘Expelled’...

Authorization

Page 12: Maintaining Business Rules

Using the Business Rule Hierarchy

Other Delete Rules

Relationship Delete

Delete Rules

Update Rules

Delete of Membership only permitted a year after termination

Price History may not be deleted when Effective Date is past

+

+ -

-

Page 13: Maintaining Business Rules

Creating the Rules

Use FHD or RON

Page 14: Maintaining Business Rules

The Rule Hierarchy

Page 15: Maintaining Business Rules

Setting Up the MXD

Page 16: Maintaining Business Rules

Making the Associations

Page 17: Maintaining Business Rules

Implementing Rules

• At analysis level, by setting constraints: Ranges, Allowable Values, FKs

• At DB design level, check constraints.

• At App design level, code modules or packages.

Page 18: Maintaining Business Rules

Auditing Rules

• Single place to start checking• Add notes to rules and objects

where implemented.• Use existing or new reports to

check.

Page 19: Maintaining Business Rules

Summary• Capturing business rules is an

important analysis task.• Business rules are modeled:

– Within the entity relationship model– Descriptive texts– Functions in the Business Rule

hierarchy