A place where data is stored. Provides a single namespace. Key/value stores can be represented with a single storage object, some other databases will require multiple storage objects (e.g. each “database” of CouchDB or each “collection” of MongoDB). Docu does not use nested namespaces because in document databases they mean nothing anyway.
Doqu offers a uniform API for different databases by providing “storage adapters”. See Backend API for technical details and Extensions for a list of adapters bundled with Docu.
An dictionary with metadata. Can be associated with a record in a storage. The structure can be restricted by schema. Optional validators determine how should the document look before it can be saved into the storage, or what records can be associated with documents of given class. Special behaviour can abe added with methods of the Document subclass (see Document API).
The simplest document is just a dictionary with some metadata. The metadata can be empty or contain information about where the document comes from, what does its record look like, etc.
A document without schema or validators is equal to its record. A document with schema is only equal to the record if they have the same sets of fields and these fields are valid (i.e. have correct data types and pass certain tests).
As you see, there is a difference between documents and records but sometimes it’s very subtle.