A circular reference is a series of references where the last object references the first, resulting in a closed loop. Simple example "Y," a newcomer to a city asks "Z" where the temple is. "Z" replies, "it is in front of the post-office." After a moment's contemplation, Y asks again, "OK, please tell me, where is the post-office?" Z replies, "it is in front of the temple!" In language A circular reference is not to be confused with the logical fallacy of a circular argument. Although a circular reference will often be unhelpful and reveal no information, such as two entries in a book index referring to each other, it is not necessarily so that a circular reference is of no use. Dictionaries, for instance, must always ultimately be a circular reference since all words in a dictionary are defined in terms of other words, but a dictionary nevertheless remains a useful reference. Sentences containing circular references can still be meaningful: Her brother gave her a kitten; his sister thanked him for it. is circular, but not without meaning. Indeed, it can be argued that self-reference is a necessary consequence of Aristotle's Law of non-contradiction, a fundamental philosophical axiom. In this view, without self-reference, logic and mathematics become impossible, or at least, lack usefulness. In computer programming Circular references can appear in computer programming when one piece of code requires the result from another, but that code needs the result from the first. For example, the two functions, posn and plus1 in the following Python program comprise a circular reference: def posn(k: int) -> int: if k < 0: return plus1(k) return k def plus1(n: int) -> int: return posn(n + 1) Circular references like the above example may return valid results if they have a terminating condition. If there is no terminating condition, a circular reference leads to a condition known as livelock or infinite loop, meaning it theoretically could run forever. def posn(k: int) -> int: return plus1(k) def plus1(n: int) -> int: return posn(n + 1) In ISO Standard, SQL circular integrity constraints are implicitly supported within a single table. Between multiple tables circular constraints (e.g. foreign keys) are permitted by defining the constraints as deferrable (See CREATE TABLE for PostgreSQL and DEFERRABLE Constraint Examples for Oracle). In that case the constraint is checked at the end of the transaction not at the time the DML statement