Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
70 CHAPTER 4 Types of rules As also discussed in Chapter 2, rules governing the collection and recording of data operate in three distinct environments: 1. the user interfaces whereby human operators enter data into systems; 2. electronic messages whereby one system transfers data to another; 3. persistent data stores, typically databases, where data is recorded for future use. In each of these environments, much the same types of rules operate: in particular, each environment requires 1. rules ensuring that particular data items are present: for example, an online shopping user interface requires data identifying the purchaser, the product being purchased, and the payment mechanism, as does the database in which orders are recorded; 2. rules ensuring that data items contain values that are valid in the circumstances: for example, a leave application entered into an employee self-service system must specify only an allowed leave type, must specify valid dates, and must specify an end date that is no earlier than the start date. 4.4.1 Data cardinality rules Rules that ensure that particular data items are present are commonly referred to as mandatory data