2.2.1. Domains
First, we define some domains that we will use in column definitions.
CREATE DOMAIN D_BOOLEAN ASSMALLINTCHECK (VALUE IN (0, 1));COMMENT ON DOMAIN D_BOOLEAN IS'Boolean type. 0 - FALSE, 1- TRUE';CREATE DOMAIN D_MONEY ASNUMERIC(15,2);CREATE DOMAIN D_ZIPCODE ASCHAR(10) CHARACTER SET UTF8CHECK (TRIM(TRAILING FROM VALUE) SIMILAR TO '[0-9]+');COMMENT ON DOMAIN D_ZIPCODE IS'Zip code';
BOOLEAN Type
In Firebird 3.0, there is a native BOOLEAN type. Some drivers do not support it, due to its relatively recent appearance in Firebird’s SQL lexicon. With that in mind, our applications will be built on a database that will work with either Firebird 2.5 or Firebird 3.0.
Before Firebird 3, servers could connect clients to databases that were created under older Firebird versions. Firebird 3 can connect only to databases that were created on or restored under Firebird 3. |