Managing ProtoDBs
Understanding Proto’s Shared Data Management System
This article explains how to create, use, and manage ProtoDBs.
Introduction
An important function of entrysets is their ability to archive data for storage and reuse in multiple custom modules and amongst multiple users. A ProtoDB is a way of saving, sharing, and reusing entrysets. Essentially, a ProtoDB is just an entryset stored on the hard disk. ProtoDBs are stored in a repository and can be specified as either private or public. The ProtoDB Writer enables you to store entrysets or append, delete, and update entries in an already stored entryset. The ProtoDB Reader accesses entrysets from stored ProtoDBs. For more information about the specific reading and writing functionality of ProtoDBs, including details about appending, deleting, and updating entries, please refer to the ProtoDB Writer and ProtoDB Reader module documents.
The Database Repository Manager
The Database Repository Manager window allows you perform all ProtoDB management functionality. There are several different ways to open this window: you can select Manage Resources → ProtoDBs… from the File menu or click the button on either the ProtoDB Reader or ProtoDB Writer’s Property Panel. From this window, you can browse all available ProtoDBs in your current repository, edit the name, description, structure, and permissions of existing ProtoDBs, create new ProtoDBs, and import and export ProtoDBs into and out of the repository.
Creating a New ProtoDB
You may need to create a new ProtoDB to store information in a new, unique location or to fit the structure of an existing entryset that you want to store for later use. To create a new ProtoDB, click the button in the Repository Manager window. First, choose a name for the ProtoDB and provide a description of it. Its name must be unique within the current repository. Its description, which is optional, will appear alongside the ProtoDB when it is browsed from a list of available ProtoDBs, either in the ProtoDB Reader’s or ProtoDB Writer’s Property Panel or in the Database Repository Manager window. Next, set its initial permission level—public or private. A private ProtoDB is only accessible to the user that created it, while public ProtoDBs can be accessed and edited by other users connected to the same repository depending on their permissions. See “Editing a ProtoDB’s Permissions” below for more information about ProtoDB permissions. Finally, define an attribute structure for the ProtoDB including the number of attributes, their names, their data type restrictions, and their default value in a newly created row. Note that each attribute must have a unique name and a designated data type: text, number, date, true/false or entryset. Once the new ProtoDB is configured completely, click to create it or to return to the Database Repository Manager window without creating a new ProtoDB.
Editing the name and description of a ProtoDB
The Database Repository Manager window also enables you to edit the name and description of an existing ProtoDB by clicking the button when the desired ProtoDB is selected. You can change the name of a ProtoDB if you have write permission for that ProtoDB, it is not currently in use (i.e. setup to be read by a ProtoDB Reader), and its new name is not shared by another ProtoDB in the same repository. Edit its description to include any changes made to the ProtoDB that other users who share that ProtoDB may need to know about. Click to enact the name and description changes; click to revert to its previous name and description.
Editing a ProtoDB’s Permissions
Each ProtoDB has a set of associated permissions that dictates which users can use it and how. “Read” permission allows a user to access a ProtoDB but not make any changes to it. However, it is still possible for a user to edit a ProtoDB for which they only have read permission by copying it to a new ProtoDB for which they have edit permission. “Read and Write” permission allows a user to read and edit a ProtoDB and save the changes. “Control” permission includes read and write permission, while also allowing a user to edit any of the user permissions for that ProtoDB. Users can also have “None” permission, which means that they cannot read, view, or open that ProtoDB. Furthermore, it is possible for ProtoDBs to be stored as “Private.” Those ProtoDBs are still stored in the repository, but all users besides their creator always have “None” permission.
Click on the button in the Database Repository Manager window to assign user permissions for the selected ProtoDB. You can only edit the permissions of a ProtoDBs that you have “Control” permission for. In the Edit Permissions window, select whether you want the ProtoDB to be public or private. If a ProtoDB is public, you can assign individual access permissions to each user in the repository. Assign user permissions by clicking on the appropriate check box next to each user in the table. Assign permissions to the “Everyone User,” which determines the permissions for any Proto user, and the “Repository User,” which determines the permission for anyone joined to the repository. It is important to understand that an individual user’s permissions for a ProtoDB are determined by the union of their user permissions, the “Repository User” permissions, and the “Everyone User” permissions, with the higher access permissions taking precedence. This means that if you assign an individual user “Read” permission, but the “Repository User” has “Read and Write” permission, then that user would have “Read and Write” permission.
Viewing the Contents of a ProtoDB’s
Clicking the button while the ProtoDB that you want to edit is highlighted in the Database Repository Manager window opens the Edit Database Structure window. This window displays a table that allows you to add, delete, rename, change the designated data type, and change the default value of an attribute in the ProtoDB’s structure. Editing the structure is necessary when you want to store an entryset that does not match the structure of the existing ProtoDB. Be warned that a ProtoDB will permanently delete information stored in attributes that are no longer a part of its structure. Click or to enact or revert the changes.
Viewing a ProtoDB’s Contents
Select a ProtoDB in the Database Repository Manager window and click the button. This opens the View Database Contents window. This window displays a table representation of the entryset contained in the selected ProtoDB which allows you to examine the contents of the ProtoDB.
Importing and Exporting ProtoDBs
You can move ProtoDBs into and out of repositories using the and buttons in the Database Repository Manager window. You can export any accessible ProtoDB in the repository by selecting it and clicking the button. Choose a save location for the ProtoDB and select and it immediately becomes available as a .protodb file at that location. You can then move, email, and copy that file as if it were a regular Windows file. It is important to note that exporting a ProtoDB does not remove it from its current repository. To import a ProtoDB files into another repository, you must first be connected to that repository. Click the button and find the .protodb file in the Open window that appears. Click the button to include that ProtoDB in your current repository. It is possible to import a ProtoDB that has not been exported from a repository by browsing for it in the file system. In this case, you are constrained by the “Everyone User” permissions assigned to that ProtoDB and would be unable to import a ProtoDB that you do not have “Read” permission for.
Since a ProtoDB’s permissions are stored by its repository, an exported .protodb file does not retain any of its associated permissions. When imported, a ProtoDB becomes public by default, but its permissions can be changed by clicking the ” button.