db_rules revision dafcb997e390efa4423883dafd100c975c4095d6
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCopyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark AndrewsCopyright (C) 1999-2001 Internet Software Consortium.
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark AndrewsSee COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson$Id: db_rules,v 1.8 2004/03/05 05:04:46 marka Exp $
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonHere is a more formal statement of the important database design
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinrules. Each rule has a 5 character mnemonic, for use in source code
af5073d03288a53b646ec3b807ac25ced64d7879Mark AndrewsReference Safety [DBREF]
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews 1) Any node reference retrieved from the database shall remain
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrews valid until discarded by the caller.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews 2) Any rdataset retrieved from the database shall remain valid,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein with its rdata contents unaltered, until it has been discarded
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein by the caller.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinDatabase Type [DBTYP]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Every database is either a zone database or a cache database. This
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews type is chosen when the database is created and cannot be altered.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinBasic Versioning [DBVER]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein The rdata contents of a committed version in a zone database
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein do not change.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinDatabase Future Version [DBFUV]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 1) Zone databases may have at most one open future version.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 2) When committed, the future version becomes the current version.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 3) Until committed, the future version changes may be rolled
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinNode Lookups [DBNLU]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein A node lookup shall return:
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 1) A node handle if the node was found.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 2) A result code.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 3) Ancestor information. (XXX MORE INFO XXX)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinZone Node Lookups [DBZNL]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein A node zone lookup returns the requested node, if it exists, in the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein version specified, or DNS_R_NONEXISTENT otherwise.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinZone Rdataset Lookups [DBZRL]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein A zone lookup returns the requested data, if any, in the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein version specified, or DNS_R_NONEXISTENT otherwise.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCache Node Lookups [DBCNL]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 1) A node lookup shall return a handle to the desired node,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein if it exists.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 2) If there is a negative caching entry for the desired node,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein DNS_R_NONEXISTENT shall be returned.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 3) If the desired node does not exist, and there is not a
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews negative caching entry, DNS_R_UNKNOWN shall be returned.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCache Rdataset Lookups [DBCRL]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 1) A cache lookup returns the most recently written data
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 2) If there is a negative caching entry for the desired data,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein DNS_R_NONEXISTENT shall be returned.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 3) If the requested data does not exist, and there is not a
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein negative caching entry, DNS_R_UNKNOWN shall be returned.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCache Updates [DBCUP]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein Concurrent attempts to update the same rdataset type of a given
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein node must appear to execute in some order.