Studio 3T lets you view a collection in Tree View, Table View, and JSON View. In this exercise, you will review the welsh_pubs collection in all three views. You will also update some preferences to make it easier to view documents in Tree View.
Table View displays the document data in a grid that contains one column for each top-level field in the documents:
|Array||Contains a group of elements, which typically are all of the same data type such as an integer or string. An array data type makes it possible to store multiple values in one field. (source)|
|Date||Contains date values, time values, or date and time values. (source)|
|Int32||Represents signed integers with values that range from negative 2,147,483,648 (which is represented by the Int32.MinValue constant) through positive 2,147,483,647 (which is represented by the Int32.MaxValue constant. (source)|
|Int64||Represents signed integers with values that range from negative 9,223,372,036,854,775,808 (which is represented by the Int64.MinValue constant) through positive 9,223,372,036,854,775,807 (which is represented by the Int64.MaxValue constant. (source)|
|Object||Used for embedding documents. Embedded documents are documents embedded in another document in the form of a field-value pair. (source)|
|ObjectId||Small, likely unique, fast to generate, and ordered, ObjectId values consist of 12 bytes, where the first four bytes are a timestamp that reflect the ObjectId’s creation. (source)|
|String||The most commonly used data type. Used to to represent text rather than numbers. It is comprised of a set of characters that can also contain spaces and numbers. (source)|
The grid now displays the individual values of the embedded documents, along with the
_id values, as shown in the following figure.
Tree View displays the document data in a grid that contains three columns—Key, Value, and Type—with each document in its own row.
The Type column refers to the data type, which in this case, is Document.
To open the preferences:
These settings can help you personalize the interface and make you more productive. For this exercise, select the Auto-expand first document in tree view check box on the General tab, and then click OK.
The first document should now be expanded to the first level.
Notice that the Type column displays the data type of each field. The address and location fields are configured with the Object data type because they contain embedded documents.
This expands the field to display the individual fields in the embedded document.
Studio 3T now displays the documents in the JSON format.
In JSON View, you can see the name/value pairs for each field and embedded document. This view is more consistent with how data is added and stored in a MongoDB database.
The figure shows the documents in the Mongo Shell Format, one of the display options available to the JSON View. You can also display the documents in the Simple Format or the Mongoexport Format. To choose a display option, click the settings icon near the tab’s upper right corner and select the appropriate option.