db_rules revision 6b85b14c920fce30fead7fa9611a92d43b30876b
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyHere is a more formal statement of the important database design
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halleyrules. Each rule is given a 5 character mnemonic for referral
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.
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyBasic Versioning [DBVER]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley The rdata contents of a committed version 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.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 3) Until it is committed, the future version changes may be
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley rolled back.
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyNode Lookups [DBNLU]
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.