The ZODB is conceptually simple. Python classes subclass a
Persistent class to become ZODB-aware.
Instances of persistent objects are brought in from a permanent
storage medium, such as a disk file, when the program needs them, and
remain cached in RAM. The ZODB traps modifications to objects, so
that when a statement such as obj.size = 1
is executed, the
modified object is marked as ``dirty''. On request, any dirty objects
are written out to permanent storage; this is called committing a
transaction. Transactions can also be aborted or rolled back, which
results in any changes being discarded, dirty objects reverting to
their initial state before the transaction began.
The term ``transaction'' has a specific technical meaning in computer science. It's extremely important that the contents of a database don't get corrupted by software or hardware crashes, and most database software offers protection against such corruption by supporting four useful properties, Atomicity, Consistency, Isolation, and Durability. In computer science jargon these four terms are collectively dubbed the ACID properties, forming an acronym from their names. The definitions of the ACID properties are:
order_number
attribute is always an integer, and not a
string, tuple, or other object.
The ZODB provides 3 of the ACID properties. Only Consistency is not supported; the ZODB has no notion of a database schema, and therefore has no way of enforcing consistency with a schema.