Document-oriented Database - Documents

Documents

The central concept of a document-oriented database is the notion of a Document. While each document-oriented database implementation differs on the details of this definition, in general, they all assume documents encapsulate and encode data (or information) in some standard formats or encodings. Encodings in use include XML, YAML, JSON, and BSON, as well as binary forms like PDF and Microsoft Office documents (MS Word, Excel, and so on).

Documents inside a document-oriented database are similar, in some ways, to records or rows, in relational databases, but they are less rigid. They are not required to adhere to a standard schema nor will they have all the same sections, slots, parts, keys, or the like. For example here's a document:

{ FirstName:"Bob", Address:"5 Oak St.", Hobby:"sailing" }

Another document could be:

{ FirstName:"Jonathan", Address:"15 Wanamassa Point Road", Children:[ {Name:"Michael",Age:10}, {Name:"Jennifer", Age:8}, {Name:"Samantha", Age:5}, {Name:"Elena", Age:2} ] }

Both documents have some similar information and some different. Unlike a relational database where each record would have the same set of fields and unused fields might be kept empty, there are no empty 'fields' in either document (record) in this case. This system allows new information to be added and it does not require explicitly stating if other pieces of information are left out.

Read more about this topic:  Document-oriented Database

Famous quotes containing the word documents:

    In the course of writing one historical book or another, it has happened that I could hardly restrain myself from simply copying entire documents. Indeed, I sometimes sank down among the documents and said to myself, I can’t improve on these.
    Alfred Döblin (1878–1957)

    The American Constitution, one of the few modern political documents drawn up by men who were forced by the sternest circumstances to think out what they really had to face instead of chopping logic in a university classroom.
    George Bernard Shaw (1856–1950)

    Our medieval historians who prefer to rely as much as possible on official documents because the chronicles are unreliable, fall thereby into an occasionally dangerous error. The documents tell us little about the difference in tone which separates us from those times; they let us forget the fervent pathos of medieval life.
    Johan Huizinga (1872–1945)