db_rules revision 6a93e240dc565eeec79d3cb6da665ba4e0baa46c
6a93e240dc565eeec79d3cb6da665ba4e0baa46cBob Halley$Id: db_rules,v 1.3 1999/02/23 21:52:10 halley Exp $
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyHere is a more formal statement of the important database design
6a93e240dc565eeec79d3cb6da665ba4e0baa46cBob Halleyrules. Each rule has a 5 character mnemonic, for use in source code
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyReference Safety [DBREF]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 1) Any node reference retrieved from the database shall remain
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley valid until discarded by the caller.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 2) Any rdataset retrieved from the database shall remain valid,
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley with its rdata contents unaltered, until it has been discarded
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley by the caller.
239e16ec9e931bc94c2a00f328945951fca959f5Bob HalleyDatabase Type [DBTYP]
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley Every database is either a zone database or a cache database. This
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley type is chosen when the database is created and cannot be altered.
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyBasic Versioning [DBVER]
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley The rdata contents of a committed version in a zone database
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley do not change.
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyDatabase Future Version [DBFUV]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 1) Zone databases may have at most one open future version.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 2) When committed, the future version becomes the current version.
6a93e240dc565eeec79d3cb6da665ba4e0baa46cBob Halley 3) Until committed, the future version changes may be rolled
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyNode Lookups [DBNLU]
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley A node lookup shall return:
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley 1) A node handle if the node was found.
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley 2) A result code.
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley 3) Ancestor information. (XXX MORE INFO XXX)
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyZone Node Lookups [DBZNL]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley A node zone lookup returns the requested node, if it exists, in the
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley version specified, or DNS_R_NONEXISTENT otherwise.
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyZone Rdataset Lookups [DBZRL]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley A zone lookup returns the requested data, if any, in the
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley version specified, or DNS_R_NONEXISTENT otherwise.
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyCache Node Lookups [DBCNL]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 1) A node lookup shall return a handle to the desired node,
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley if it exists.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 2) If there is a negative caching entry for the desired node,
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley DNS_R_NONEXISTENT shall be returned.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 3) If the desired node does not exist, and there is not a
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley negative caching entry, DNS_R_UNKNOWN shall be returned.
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyCache Rdataset Lookups [DBCRL]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 1) A cache lookup returns the most recently written data
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 2) If there is a negative caching entry for the desired data,
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley DNS_R_NONEXISTENT shall be returned.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 3) If the requested data does not exist, and there is not a
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley negative caching entry, DNS_R_UNKNOWN shall be returned.
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyCache Updates [DBCUP]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley Concurrent attempts to update the same rdataset type of a given
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley node must appear to execute in some order.