Subject | Re: [firebird-support] Basic questions |
---|---|
Author | Helen Borrie |
Post date | 2005-06-24T12:27:31Z |
At 12:02 PM 24/06/2005 +0000, you wrote:
http://www.cvalde.net/ibDocumentation.htm
use consistently throughout your database in the definitions of different
columns in any tables.
e.g. This one is useful:
CREATE DOMAIN D_BOOLEAN AS
CHAR
CHECK (VALUE IS NULL OR VALUE IN ('T', 'F');
Another one might be
CREATE DOMAIN D_IDENTIITY AS
BIGINT NOT NULL;
CREATE TABLE TABLEA (
ID D_IDENTITY,
ISCURRENT D_BOOLEAN);
(RDB$DB_KEY) is not really an "official" language element. It's a unique
physical locator that has no guarantee of persistency beyond a certain
scope. IB_SQL makes use of it to provide unique values for unkeyed tables
in its object browser and in other (otherwise) non-unique output sets.
Domains seem a little like custom data types but they are not. You can't,
for example, declare local, input or output variable for procedures using
domains. IBO (with which IB_SQL was built) does some special tricks with
domains on the client side.
./hb
>What is db_key?Read about it here: (2 articles):
http://www.cvalde.net/ibDocumentation.htm
>What is domain..A domain is a set of data attributes that you can bunch together and then
use consistently throughout your database in the definitions of different
columns in any tables.
e.g. This one is useful:
CREATE DOMAIN D_BOOLEAN AS
CHAR
CHECK (VALUE IS NULL OR VALUE IN ('T', 'F');
Another one might be
CREATE DOMAIN D_IDENTIITY AS
BIGINT NOT NULL;
CREATE TABLE TABLEA (
ID D_IDENTITY,
ISCURRENT D_BOOLEAN);
>i see it in ib_sql?Both are available via Firebird's SQL language, though the db_key
(RDB$DB_KEY) is not really an "official" language element. It's a unique
physical locator that has no guarantee of persistency beyond a certain
scope. IB_SQL makes use of it to provide unique values for unkeyed tables
in its object browser and in other (otherwise) non-unique output sets.
Domains seem a little like custom data types but they are not. You can't,
for example, declare local, input or output variable for procedures using
domains. IBO (with which IB_SQL was built) does some special tricks with
domains on the client side.
./hb