0
$\begingroup$

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|$.

$\endgroup$
4
  • 1
    $\begingroup$ Welcome to MSE. For some basic information about writing mathematics at this site see, e.g., basic help on mathjax notation, mathjax tutorial and quick reference, main meta site math tutorial and equation editing how-to. $\endgroup$ Commented Oct 3, 2019 at 7:46
  • $\begingroup$ I just tried editing it but I am not able to escape the bracket in the way explained in your link \{. $\endgroup$ Commented Oct 3, 2019 at 7:53
  • $\begingroup$ @MauroALLEGRANZA how would I combine the two? $\endgroup$ Commented Oct 3, 2019 at 8:09
  • $\begingroup$ @MauroALLEGRANZA does this not express that every element of VERSION_NUMBER is allowed to have a length of 17? What I tried to say was that the first restrictions apply to every element and the length constraint applies to the collection. $\endgroup$ Commented Oct 3, 2019 at 8:37

0

You must log in to answer this question.

Browse other questions tagged .