CHECK pens_in_drawer violates "preferred formalisms" re. BETWEEN
Gumnos opened this issue · 1 comments
Gumnos commented
The "Preferred Formalisms" section advises
Make use of
BETWEEN
where possible instead of combining multiple statements withAND
.
but the example in the "Defining Constraints" section has
CHECK(pens_in_drawer >= 1 AND pens_in_drawer < 100)
which should likely be
CHECK(pens_in_drawer BETWEEN 1 AND 99)
(though I'd also posit that it might make sense not to have any pens in the drawer and thus it should be BETWEEN 0 and 99
)
treffynnon commented
I've updated the examples across the languages. Also, if you don't have a pen in your drawer then you cease to be a member of staff!