1.1.1. Managing Databases and Documents

You can manage databases and documents within Futon using the main Overview section of the Futon interface.

To create a new database, click the Create Database … button. You will be prompted for the database name, as shown in the figure below.

Figure 1.2. Creating a Database

Creating a Database

Once you have created the database (or selected an existing one), you will be shown a list of the current documents. If you create a new document, or select an existing document, you will be presented with the edit document display.

Editing documents within Futon requires selecting the document and then editing (and setting) the fields for the document individually before saving the document back into the database.

For example, the figure below shows the editor for a single document, a newly created document with a single ID, the document _id field.

Figure 1.3. Editing a Document

Editing a Document

To add a field to the document:

  1. Click Add Field.

  2. In the fieldname box, enter the name of the field you want to create. For example, company.

  3. Click the green tick next to the field name to confirm the field name change.

  4. Double-click the corresponding Value cell.

  5. Enter a company name, for example Example.

  6. Click the green tick next to the field value to confirm the field value.

  7. The document is still not saved as this point. You must explicitly save the document by clicking the Save Document button at the top of the page. This will save the document, and then display the new document with the saved revision information (the _rev field).

    Figure 1.4. Edited Document

    Edited Document

The same basic interface is used for all editng operations within Futon. You must rememmbr to save the individual element (fieldname, value) using the green tick button, before then saving the document.