InterviewSolution
| 1. |
What Is Document? |
|
Answer» A document refers to an entry in the database (other databases MAY refer to the same concept as a row). A document has an ID (primary key in other databases), which is UNIQUE to the document and by which it can be located. The document value contains the actual application data; for example, a product document may CONTAIN information about the price and DESCRIPTION. Documents are usually ( but not ALWAYS) stored as JSON on the server. Because JSON is a structured format, it can be subsequently searched and queried. { “type”: “product”, “sku”: “CBSRV45DP”, “msrp”: [5.49, “USD”], “ctime”: “092011”, “mfg”: “couchbase”, “tags”: [“server”, “database”, “couchbase”, “nosql”, “fast”, “json”, “awesome”] } A document refers to an entry in the database (other databases may refer to the same concept as a row). A document has an ID (primary key in other databases), which is unique to the document and by which it can be located. The document value contains the actual application data; for example, a product document may contain information about the price and description. Documents are usually ( but not always) stored as JSON on the server. Because JSON is a structured format, it can be subsequently searched and queried. { “type”: “product”, “sku”: “CBSRV45DP”, “msrp”: [5.49, “USD”], “ctime”: “092011”, “mfg”: “couchbase”, “tags”: [“server”, “database”, “couchbase”, “nosql”, “fast”, “json”, “awesome”] } |
|