ProtoDB Writer
Introduction
The ProtoDB Writer module allows you to store, edit, and remove entries in a ProtoDB. It exposes two dedicated input connectors to control each of the basic ProtoDB operations: append, delete, and update. To alter its contents, select a ProtoDB in the Property Panel and connect an entryset to the "Set Append Entryset", "Set Delete Entryset", or "Set Update Entryset" input connector. Entrysets that arrive at these input connectors specify modifications to be made to the ProtoDB, but no edits are actually enacted on the ProtoDB until an operation's corresponding "Do" input connector receives a message.
Tracked vs. Untracked Data
Tracking the identity of entries independently of their contents is necessary to coordinate database manipulation functions, especially in multiple user scenarios. Entries are only marked as tracked when they are read from a ProtoDB, and thus a ProtoDB Writer behaves differently depending on whether an append, delete, or update operation is being performed on data originally obtained from a ProtoDB Reader.
Append Operation
All entries are appended to the ProtoDB regardless of whether they are tracked or untracked. However, the incoming entryset's attribute schema must match or be a subset of the target ProtoDB's schema.
Delete Operation
Tracked data: Delete all entries from the target ProtoDB that are from the incoming entryset.
Untracked data: Only delete entries from the ProtoDB that match all values in the incoming entryset.
Mixed data: Operate on tracked and untracked data independently according to the rules above.
In all of the above cases, the attribute schema of an incoming entryset must be either an exact match or a subset of the target ProtoDB's attribute schema. With tracked data, deleting with an incomplete incoming schema still deletes each entry from the original entryset. However, an incomplete schema of untracked data deletes all entries that match the attribute values of the incoming entries. For example, lets say a ProtoDB with two attributes, "Name" and "Location", contains three entries (George, NYC), (Abe, Chicago), and (George, Honolulu). If this ProtoDB receives a delete message containing a single-attribute entryset with only one entry, (George), it would remove both the matching entries with "George" as their "Name" attribute, leaving only the (Abe, Chicago) entry in the ProtoDB.
Update Operation
Tracked data: Updates entries in the DB that are from the incoming entryset. Any rows marked deleted in the incoming entryset are removed from the ProtoDB. The incoming entryset must either have the same attributes as or a subset of those in the ProtoDB.
Untracked data: Update does not function on untracked data. This operation is better handled by some external processing and matching of the data using standard Modules.
Mixed data: An incoming entryset is considered mixed if any of its entries originate from a ProtoDB Reader. In this case, any tracked entries already present in the target ProtoDB are updated (and those marked deleted are deleted). Any tracked or untracked entries not already present in the target ProtoDB are added.
Property Panel:
ProtoDB Writer
- Create New Database...
- Opens a window to create a new ProtoDB.
- Select Database
- Specify the target ProtoDB in which information is stored.
- View
- Filters which ProtoDBs are displayed in the "Select Database" list according to their permissions.
- Description
- A description of the currently selected ProtoDB.
- Manage Databases...
- Opens a window that allows you to manage your ProtoDBs.
See Also:
Input Menu:
Set Update Entryset
Updates the value of entries in the incoming entryset that match ones in the specified ProtoDB. This update operation occurs only when the "Do Update" input connector receives a message.
Accepted Datatypes:
- Entryset
- Must match or contain a subset of the selected ProtoDB's attribute schema.
Set Insert Entryset
Adds the entries in the incoming entryset to the specified ProtoDB. This append operation occurs only when the "Do Append" input connector receives a message.
Accepted Datatypes:
- Entryset
- Must match or contain a subset of the selected ProtoDB's attribute schema.
Set Delete Entryset
Deletes the entries in the incoming entryset from the specified ProtoDB. This delete operation occurs only when the "Do Delete" input connector receives a message.
Accepted Datatypes:
- Entryset
- Must match or contain a subset of the selected ProtoDB's attribute schema.
Set Proto Database
Sets which ProtoDB the data is written to.
Accepted Datatypes:
- Text
- The name of a currently accessible ProtoDB.
Triggered Outputs:
- Output Message:
- Get ProtoDB Name
Trigger Connectors → Do Trigger Update
Triggers an update operation on the entries sent to the "Set Update Entryset" input connector.
Accepted Datatypes:
- True/false
Trigger Connectors → Do Trigger Append
Triggers an append operation on the entries sent to the "Set Append Entryset" input connector.
Accepted Datatypes:
- True/false
Trigger Connectors → Do Trigger Delete
Triggers a delete operation on the entries sent to the "Set Delete Entryset" input connector.
Accepted Datatypes:
- True/false
Output Menu:
Get Database Name
Gets the name of the currently selected database.
Output Datatype:
- Text
Triggered By:
- Input Message:
- Set ProtoDB