I am trying to express the constraints of a database domain. A database domain can be limits the values that can be stored in a single cell of a table.
The restriction I am trying to describe is the following: All elements of the collection must be part of the natural numbers, 0, a . or one of the letters A or B. Besides that a maximum length needs to be added to the collection.
So far I got:
$∀x; x \in \mathbb N \lor x \in \{ \cdot, 0, D, B \}$
Am I doing it correct if I write it as follows (VERSION_NUMBER is the name of the domain)?
$(∀x; x \in \mathbb N \lor x \in \{ \cdot, 0, D, B \}) \land \text {VERSION_NUMBER} \le |17|$.