db_rules revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
fb84f9014321c5f33c4682de5661b579fcde318fAndreas GustafssonCopyright (C) 1999-2001, 2004, 2016 Internet Systems Consortium, Inc. ("ISC")
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark AndrewsThis Source Code Form is subject to the terms of the Mozilla Public
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinLicense, v. 2.0. If a copy of the MPL was not distributed with this
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafssonfile, You can obtain one at http://mozilla.org/MPL/2.0/.
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson$Id: db_rules,v 1.8 2004/03/05 05:04:46 marka Exp $
af5073d03288a53b646ec3b807ac25ced64d7879Mark AndrewsHere is a more formal statement of the important database design
af5073d03288a53b646ec3b807ac25ced64d7879Mark Andrewsrules. Each rule has a 5 character mnemonic, for use in source code
af5073d03288a53b646ec3b807ac25ced64d7879Mark AndrewsReference Safety [DBREF]
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson 1) Any node reference retrieved from the database shall remain
90153b6536f7a5078e1c157c980110dbcd7fe205Mark Andrews valid until discarded by the caller.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein 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
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein type is chosen when the database is created and cannot be altered.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinBasic Versioning [DBVER]
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews 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
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein negative caching entry, DNS_R_UNKNOWN shall be returned.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCache Rdataset Lookups [DBCRL]
61e1dc26d62c2a0059e3ca7efe2ad0f4a5b8df92Mark Andrews 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.