...
...
...
...
...
...
Table of Contents |
---|
Introduction
A Data Type is the constraint on a column or a simple type in an xsd or a set of enumerations in a form etc.
Every data element should be constrained by a data type.
There are a number of different types:
Primitives, include types such as an integer, long, string, varchar etc.
- They can include additional validation such as a regular expression or custom java / groovy code
- They do not have a measurement unit
The following types are primitive types (taken from wc3 xsd spec) and should come preloaded in the catalogue.
- string
- boolean
- decimal
- float
- double
- duration
- dateTime
- time
- date
- gYearMonth
- gYear
- gDay
- gMonth
- hexBinary
- base64Binary
- anyURI
For Example:
Note:
1) Name, ID, Version and Description
...
4) Other data types that use this as a base i.e. a data type such as Age
Simple
Simple types are derived from primitive types but they usually have additional
- condtrained range.
- upper and lower range (normal range)
- Can have a unit of measure.
- Can have a regular expression as a constraint.
- Or a complex rule constraint i.e. checksum written in groovy or java
Can be a:
- Range
- Quantity
- i.e. age, distance, duration, currency
- Result
- Timing
- Ratio
- Regular expressions or Measurement Units etc.
...
3) Age is measured in years i.e. it uses the Year measurement unit
Enumerated
Enumerated types are ordered collections of individuals or codes
i.e. M:Male, F:Female, U:Unknown
For Example:
Note:
1) Enumerations codes and descriptions
...
*in addition you can create subsets of enumerations
Complex / Reference Types
In some cases it is useful to model data types that are reference type. These use a class as the reference type.
i.e. a data type address could have a Type of Address which includes first line, postcode, country etc.
...