The purpose of Base Data Type declarations is to provide a point of declaration of all the primitive datatypes that are in use within the domain and can be used to describe the contents of the Business Information Model.
A significant problem with the XML Schema Definition standard is that it is designed to solve a large number of software implementation problems and so provides an equally large number of datatypes with each datatype describing a variation on a theme.
For example as well as "number" we also have "short" (with a range of values corresponding to that which may be stored a 16 bit computer word), "long", "int", "integer", "decimal", "double", "byte" and quite a few other number variations. However many of these datatypes are highly-specialized computer-focused definitions that have little or no relevance to the Business stakeholders.
Most likely the business stakeholders would only recognise a limited number of datatypes - such as String, Date, Time, Integer, Decimal - and some domain-specific ones - such as Money (amount + currency attribute) - and will prefer the model to be restricted to that small set.
The advantages of defining a set of base data types and gathering them together in a single file are:
* It allows documented controls to be placed on the primitive types that are used in any schema.
* It will improve consistency of use of primitive types (e.g. consistent use of "integer" rather than "int", "long" etc.) that must be handled by applications
* It will improve code reuse.
* It allows standard attributes to be added to all elements whilst hiding the detail in a non business definition layer.
The principle is something like the way datayping is implemented in Java (as well as other programming languages) where every primitive datatype, such as "string", is wrapped by an equivalent complex class such as "String".The Java developer could declare object attributes using the "string" primitive but this isn't regarded as good practice. By using the "pfdt:string" class instead they are protected from physical changes to the implementation of "string" and also gain an extension point where additional behaviour not supported by the primitive datatype can be defined.
The declarations in this file underpin the User Defined Types, Message Infrastructure and Business Entity Template declarations.
Extension of a Decimal value for use with monetary values where a currency code needs to
be specified.
The currency code is actually metadata about the value so, in line with good XML practice, the Currency Code is declared as an XML-Attribute of the Money datatype rather than as a separate XML-Element.
The currency attribute should then include a list of valid currencies codes that are supported.
A count of the number of occurrences of something - must therefore be >=0. This is the functional equivalent of the XML nonNegativeInteger datatype.
A Classifier is an extended datatype used as the basis for a data-item whose allowed values are restricted to a pre-defined set of Classifiers or Enumerated Codes.
Classifier should never actually be used as the datatype for any data-item in a finished data model because a specific Enumerated Domain should be declared for defining the specific values in the domain. However it is acceptable in an incomplete model where definition of the domain has yet to be completed.
The Reference Data Type is any association between two Business Entities (or their sub-
components). In order to be consistent across the entire dataset all references contain the ID of the thing being referenced and the value actually assigned to the element is the 'display value'. The type of reference is derived from the underlying data model
This has a shortcoming in that we can't support multi-value keys using this datatype. However
I'm reluctant to extend the datatype to include the ID as a nested element because it becomes very cumbersome to use. Instead, in all likelihood, the Primary Key to any entity in a data processing application is likely to be a single-value, system-generated key so we're imposing that restriction here as well.
A measurement of something such as a length or area. All measurements are to 2 decimal places and must be positive.
A string containing a unique identifier for something.
The underlying assumption is that each instance of a class or entity will have a unique identifier assigned to it which can then be assigned to any referencing entity as a reference to the entity instance.
This is a very similar concept to XML ID datatype but is locally defined because of the need to extend the datatype with domain specific attributes.
A Numeric String is a string based datatype for representing strings, such as telephone numbers and IP addresses, that are limited to the numeric character-set.
The Boolean datatype is a redefinition of the XML Schema defined "Boolean". The XSD version is a logical True / False datatype whereas from a data processing perspective it is more likely to be a string based Y/N value. This could be seen as an Enumerated Domain but "Boolean" is so common that it makes more sense to be a base datatype.
Yes
No
English
Welsh
An extended boolean type that also allows 'unknown' as a value.
String value with a language code for natural-language text.
Identifies the language that the sentence is recorded in.
The Report Reference Number is a 20-digit unique identifier assigned to each Report.
It is formatted as five blocks of four digits i.e. 9999-9999-9999-9999-9999 and generated by an algorithm described in Appendix A "Report ID Generation" of Section 18 "Transformation Rules" of the Technical Standards.