Writing Natural Language Rule Statements — a Systematic Approach Part 22: The Syntax of Some Data Content Rule Statements

Graham   Witt
Graham Witt Consultant / Author, Read Author Bio || Read All Articles by Graham Witt
About this series of articles

While my first series of articles on writing natural language rule statements[1] explored a wide variety of issues in a rather organic and hence random manner, this series takes a more holistic and systematic approach and draws on insights gained while writing my recently-published book on the same topic.[2]  Rule statements recommended in these articles are intended to comply with the Object Management Group's Semantics of Business Vocabulary and Business Rules (SBVR) version 1.0.[3]

The story so far

In earlier articles in this series (see the "Language Archives" sidebar) we have looked at standardised rule statements for various types of operative rules[4]  (data rules,[5] activity rules,[6] and party rules,[7]) and definitional rules.[8]  Each specific type of rule statement has a common formulation which we have discussed in both a relatively informal way and by way of rule statement patterns.

In the previous article[9] we looked at the syntax of data cardinality rule statements[10] in general.  In this article we will look at the general syntax of some data content rule statements.[11]

Review of data content rule statements

In this series we have encountered various types of data content rule statements:

  1. Range rule statements,[12] such as
RS57. The value specified
  
for each high value item (if any)
  
in each Travel Insurance Application
must
be more than $500.
RS61. The return date specified
  
in each Travel Insurance Application
must
be later than the departure date
  
specified in that Travel Insurance Application.
  1. Value set rule statements,[13] such as
RS67. Each region (if any) specified
  
in each Travel Insurance Application
must
be Africa, Asia, Europe, North America, Oceania or South America.
RS73. The salutation specified
  
for each passenger
  
in each Travel Insurance Application
must
be one of the name titles
  listed in AS4590-2006.
RS87. Each date specified
  
in each Reward Flight Booking
must
be other than one of the blackout dates
  
specified in the rewards programme.
  1. Uniqueness constraint statements,[14] such as
RS80. Each region (if any) specified
  
in each Travel Insurance Application
must
be different to any other region
  
specified in that Travel Insurance Application.
RS84. The combination of family name, given names and birth date specified
  
for each passenger
  
in each Travel Insurance Application
must
be different to the combination of family name, given names and birth date
 
 specified for any other passenger
  
in that Travel Insurance Application.
  1. Equality rule statements,[15] such as
RS85. The passenger name specified
  
on each Boarding Pass
    
presented by a passenger
must
be the same as the name
  
specified on the Passport
  
presented by that passenger.
  1. Inequality rule statements,[16] such as
RS86. The destination city specified
  
in each Flight Booking Request
must
be different to the origin city
  
specified in that Flight Booking Request.
  1. Data homogeneity rule statements,[17] such as
RS88. The travel class specified for each flight
  
in each Flight Booking Confirmation
must
be the same as the travel class specified for each other flight
  
in that Flight Booking Confirmation.
  1. Data combination consistency rule statements,[18] such as
RS90. The combination of departure date and return date specified
  
in each Travel Insurance Application
must
be such that
  the
return date is later than the departure date.
  1. Set function rule statements,[19] such as
RS91. The sum of the share fractions of the shares transferred specified
  
in each Real Property Transfer Instrument
must
be no more than 1.
  1. Set consistency rule statements,[20] such as
RS92. The set of passengers specified
  
for each flight
  
in each Flight Booking Confirmation
must
be the same as the set of passengers
  
specified for each other flight
  
in that Flight Booking Confirmation.
  1. Data item format rule statements,[21] such as
RS114. The contact phone number (if any) specified
  
in each Travel Insurance Application
must
be a valid Australian personal phone number.
  1. Various temporal and spatial data rule statements, to be covered in the next article.

The anatomy of a data content rule statement

Data content rule statements — like data cardinality rule statements — are operative rule statements,[22] in particular obligation statements,[23] consisting of the following syntactic components in sequence:

  • an initial determiner (Each, The, A, An, or At least one)

  • a subject

  • the keyword must

  • a predicate

  • possibly a conditional clause following if, unless, or after.

The subject of a data content rule statement

The subject of any data content rule statement consists of the following syntactic components in sequence:

  • a subject noun phrase (see below)

  • specified

  • at least one prepositional phrase, such as

    • in each Travel Insurance Application

    • for each insurance product.

The subject noun phrase may be any of the following:

  1. the term signifying the data item for which the content is constrained (as in RS57, RS61, RS67, RS73, RS87, RS80, RS85, RS86, RS88, and RS114)

  2. combination of followed by a list of associated data items for which the content is constrained (as in RS84 and RS90)

  3. set of followed by the plural form of the term signifying a set of data items for which the content is constrained (as in RS92)

  4. a set function (sum, average, maximum, or minimum) followed by of followed in turn by the plural form of the term signifying a set of data items for which the content is constrained (as in RS91).

Not every form of subject noun phrase can be used in every type of data content rule statement:

  1. A term not preceded by combination of, set of, or a set function can be used in any data content rule statement except

    1. a data combination consistency rule statement

    2. a set function rule statement or

    3. a set consistency rule statement.

  2. The combination of construction can be used in a value set rule statement or uniqueness constraint statement and must be used in a data combination consistency rule statement.

  3. The set of construction must be used in a set consistency rule statement.

  4. A construction involving a set function must be used in a set function rule statement.

Note that dependent cardinality rule statements (discussed in the previous article) actually take the form of set function rule statements using the set function number.

The predicate of a data content rule statement

Predicates of data content rule statements take different forms depending on the type of rule being stated.

The predicate of a range rule statement consists of the following syntactic components in sequence:

  • a verb phrase representing a range operator:
    be less than | be more than | be earlier than | be later than |
    be no less than | be no more than | be no earlier than | be no later than |
    be at least | be at most | be at the earliest | be at the latest

  • either
    • a literal, such as
          $500
      or
    • a qualified term, such as
          the departure date specified in that Travel Insurance Application,
          optionally preceded by an offset, such as
          2 days before

  • an optional temporal qualifying clause, such as
    as at the Date on which that Travel Insurance Application is made.

The predicate of an equality rule statement has the same form as that of a range rule statement but uses an equality operator (be the same as or be equal to) rather than a range operator.

The predicate of an inequality rule statement also has the same form as that of a range rule statement but uses an inequality operator (be different to or be unequal to) rather than a range operator.

The predicate of a set function rule statement also has the same form as that of a range rule statement but can use a range operator, equality operator, or inequality operator.

The predicate of a value set rule statement consists of the following syntactic components in sequence:

  • be, optionally followed by other than

  • one of
    • a value list, such as
      Africa, Asia, Europe, North America, Oceania or South America

    • one of the, followed by a qualified term, such as
      the departure date specified in that Travel Insurance Application, optionally preceded by an offset, such as 2 days before

    • (if and only if the subject uses the combination of construction)
      one of the combinations of, followed by a list of terms and a qualifying clause, such as
      locality name, state code and postal code allocated by Australia Post

  • an optional temporal qualifying clause.

The predicate of a uniqueness constraint statement consists of the following syntactic components in sequence:

  • be different to, optionally followed by other than

  • one of
    • any other, followed by a qualified term, such as
      region specified in that Travel Insurance Application

    • the, followed by a qualified term, such as
      the frequent flier membership
          specified for any other passenger in that Travel Insurance Application

    • (if and only if the subject uses the combination of construction)
      the combination of, followed by a list of terms and a qualifying clause, such as
      the combination of family name, given names and birth date
          specified for any other passenger in that Travel Insurance Application

The predicate of a data homogeneity rule statement consists of the following syntactic components in sequence:

  • be the same as, optionally followed by other than

  • the, followed by a qualified term, such as
    the travel class
        specified for each other flight in that Flight Booking Confirmation

The predicate of a data combination consistency rule statement consists of the following syntactic components in sequence:

  • be such that

  • a conditional clause, such as the return date is later than the departure date.

The predicate of a set consistency rule statement consists of the following syntactic components in sequence:

  • a verb phrase representing a set operator:
    be the same as | be different to | include

  • the set of, followed by a qualified term, such as
    the set of passengers specified for each other flight in that Flight Booking Confirmation.

The predicate of a data item format rule statement consists of the following syntactic components in sequence:

  • one of the verb phrases be | be represented using | form

  • a valid

  • either
    • a data type term, such as positive integer, US date, Australian date, ISO 8601 date
      or
    • a combination of such terms, such as airline code followed by up to 4 digits.

To be continued...
In the next article in this series I will look at temporal and spatial data constraint statements, data update rule statements, and the use of rule statements in describing a data model.

References

[1]  The first of which is:  Graham Witt, "A Practical Method of Developing Natural Language Rule Statements (Part 1)," Business Rules Journal, Vol. 10, No. 2 (Feb. 2009), URL:  http://www.BRCommunity.com/a2009/b461.html  return to article

[2]  Graham Witt, Writing Effective Business Rules.  Morgan Kaufmann (2012).  return to article

[3]  Semantics of Business Vocabulary and Business Rules (SBVR), v1.0.  Object Management Group (Jan. 2008).  Available at http://www.omg.org/spec/SBVR/1.0/
     The font and colour conventions used in these rule statements reflect those in the SBVR, namely underlined teal for terms, italic blue for verb phrases, orange for keywords, and double-underlined green for names and other literals.  Note that, for clarity, these conventions are not used for rule statements that exhibit one or more non-recommended characteristics.  return to article

[4]  A rule that states what must or must not happen in particular circumstances, and which can therefore be contravened, by contrast with a definitional rule.  return to article

[5]  A rule that constrains the data included in a transaction (a form or message) or a persistent data set (e.g., a database record).  return to article

[6]  A rule that constrains the operation of one or more business processes or other activities.  return to article

[7]  A rule that makes a distinction between different parties or the roles they play.  return to article

[8]  A rule that defines a construct created or used by an organisation (or the industry within which it operates), or defines a property of such a construct, and which cannot therefore be contravened, by contrast with an operative rule.  return to article

[9]  Graham Witt, "Writing Natural Language Rule Statements — a Systematic Approach — Part 21:  The Syntax of Data Cardinality Rule Statements," Business Rules Journal, Vol. 15, No. 4 (Apr. 2014). URL:  http://www.BRCommunity.com/a2014/b757.html  return to article

[10]  Statements of rules that require the presence or absence of a data item and/or place restrictions on the maximum or minimum number of occurrences of a data item.  return to article

[11]  Statements of rules that place a restriction on the values contained in a data item or set of data items (rather than whether or not they must be present and how many there may or must be).  return to article

[12]  Statements of rules that require that the content of a data item be a value within a particular inclusive or exclusive single- or double-bounded range, or that the values contained in two data items in a transaction or record have a particular relationship to each other.  return to article

[13]  Statements of rules that require that the content of a data item be (or not be) one of a particular set of values (either a fixed set or a set that may change over time), that the content of a combination of data items match or not match a corresponding combination in a set of records, or that the values contained in two or more data items form a valid combination.  return to article

[14]  Statements of rules that require that the content of a data item (or combination of data items) be different to that of the corresponding data item(s) in the same or other records or transactions.  return to article

[15]  Statements of rules that require that the content of a data item be the same as that of some other data item.  return to article

[16]  Statements of rules that require that the content of a data item be different to that of some other data item.  return to article

[17]  Statements of rules that require that the content of different data items in a transaction be the same as each other (referred to in Article 8 in this series as "set equality rule statements", an admittedly less than appropriate name).  return to article

[18]  Statements of rules that require that the content of the data items in a combination of data items be consistent with each other.  return to article

[19]  Statements of rules that place a constraint on a set function over a set of data items.  return to article

[20]  Statements of rules that require that a set of data items be the same as some other set of data items.  return to article

[21]  Statements of rules that specify the required format of a data item.  return to article

[22]  A statement of a rule that specifies what must or must not happen in particular circumstances, and which can therefore be contravened, by contrast with a definitional rule.  return to article

[23]  Rule statements that express the obligation on a process or party to act in some way, or on the content of a set of data to include values that meet some constraint.  return to article

# # #


Standard citation for this article:


citations icon
Graham Witt, "Writing Natural Language Rule Statements — a Systematic Approach Part 22: The Syntax of Some Data Content Rule Statements" Business Rules Journal, Vol. 15, No. 5, (May 2014)
URL: http://www.brcommunity.com/a2014/b762.html

About our Contributor:


Graham   Witt
Graham Witt Consultant / Author,

Graham Witt has over 30 years of experience in assisting organisations to acquire relevant and effective IT solutions. NSW clients include the Department of Lands, Sydney Water, and WorkCover while Victorian clients include the Departments of Sustainability & Environment, Education & Early Childhood Development, and Human Services. Graham previously headed the information management and business rules practice in Ajilon's Sydney (Australia) office.

Graham has developed specialist expertise in business requirements, architectures, information management, user interface design, data modelling, relational database design, data quality, business rules, and the use of metadata repositories & CASE tools. He has also provided data modelling, database design, and business rules training to various clients including NAB, Telstra, British Columbia Government, and ASIC and in the form of public courses run by Simsion Bowles and Associates (Australia) and DebTech (USA).

He is the co-author, with Graeme Simsion, of the widely-used textbook "Data Modeling Essentials" and is the author of the newly published book, "Writing Effective Business Rules" (published by Elsevier). Graham has presented at conferences in Australia, the US, the UK, and France. Contact him at gwitt@pacific.net.au.

Read All Articles by Graham Witt
Subscribe to the eBRJ Newsletter
In The Spotlight
 John A. Zachman
';
The Issue Is THE ENTERPRISE By John A. Zachman Jan. 2017 | Vol. 18, Iss. 1
 Jim  Sinur

Online Interactive Training Series

In response to a great many requests, Business Rule Solutions now offers at-a-distance learning options. No travel, no backlogs, no hassles. Same great instructors, but with schedules, content and pricing designed to meet the special needs of busy professionals.