db_rules revision 40f53fa8d9c6a4fc38c0014495e7a42b08f52481
9bff67898d55cddfcec9ce30cc2b1bb6211ec691David LawrenceCopyright (C) 1999, 2000 Internet Software Consortium.
9bff67898d55cddfcec9ce30cc2b1bb6211ec691David LawrenceSee COPYRIGHT in the source root or http://www.isc.org/copyright for terms.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence$Id: db_rules,v 1.5 2000/08/01 01:18:08 tale Exp $
6a93e240dc565eeec79d3cb6da665ba4e0baa46cBob Halley
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
6a93e240dc565eeec79d3cb6da665ba4e0baa46cBob Halleycomments.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyReference Safety [DBREF]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 1) Any node reference retrieved from the database shall remain
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley valid until discarded by the caller.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
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 Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
239e16ec9e931bc94c2a00f328945951fca959f5Bob HalleyDatabase Type [DBTYP]
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley
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.
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyBasic Versioning [DBVER]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley The rdata contents of a committed version in a zone database
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley do not change.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyDatabase Future Version [DBFUV]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 1) Zone databases may have at most one open future version.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 2) When committed, the future version becomes the current version.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6a93e240dc565eeec79d3cb6da665ba4e0baa46cBob Halley 3) Until committed, the future version changes may be rolled
6a93e240dc565eeec79d3cb6da665ba4e0baa46cBob Halley back.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyNode Lookups [DBNLU]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley A node lookup shall return:
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley 1) A node handle if the node was found.
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley 2) A result code.
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley
239e16ec9e931bc94c2a00f328945951fca959f5Bob Halley 3) Ancestor information. (XXX MORE INFO XXX)
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyZone Node Lookups [DBZNL]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
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 Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyZone Rdataset Lookups [DBZRL]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley A zone lookup returns the requested data, if any, in the
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley version specified, or DNS_R_NONEXISTENT otherwise.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyCache Node Lookups [DBCNL]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 1) A node lookup shall return a handle to the desired node,
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley if it exists.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 2) If there is a negative caching entry for the desired node,
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley DNS_R_NONEXISTENT shall be returned.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence
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 Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyCache Rdataset Lookups [DBCRL]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 1) A cache lookup returns the most recently written data
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley (if any).
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley 2) If there is a negative caching entry for the desired data,
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley DNS_R_NONEXISTENT shall be returned.
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
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 Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob HalleyCache Updates [DBCUP]
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley Concurrent attempts to update the same rdataset type of a given
6b85b14c920fce30fead7fa9611a92d43b30876bBob Halley node must appear to execute in some order.