<<<<< Section >>>>> Level Up <<<<< Page >>>>> Contents
 


8.7 Advanced Functions

8.7.1 Archive a database
8.7.2 Unarchive a database
8.7.3 Merge tables
8.7.4 Indexes
8.7.5 Export table
8.7.6 Export a view
8.7.7 Notification
8.7.8 HTML Add Record forms
8.7.9 HTML View Templates


8.7.1 Archive a database

An entire database and its associated templates can be archived in order to transfer it between folders, workspaces or servers. The standard "Archive" function should NOT be used. Database archiving is accomplished via  |  DB Archive  for a database. The user prescribes a name for the archive and clicks on "Create Archive" to create the archive. The database archive is created in the user's bag and is selected. The user can choose to paste it into their chosen destination location or download the archive directly by clicking on the link with which they are presented.

The DB archive functionality has a few small limitations:

  1. Events and other related meta information is not carried across
  2. Any documents related to a "document upload" field will not be taken across.


8.7.2 Unarchive a database

An entire database can be archived in order to transfer it between folders or servers. To transfer databases between folders on the same server, the database should first be archived. This will place an archive of the database in the user's bag. This archive can be selected and then pasted into another folder on the same server where it can be unarchived using the   |  Unarchive DB  action.

To transfer the database to another server, the archived database should be saved to the user's local hard disk and then uploaded to the other server (with the MIME type application/x-rdb-archive).


8.7.3 Merge tables

The data in two or more tables can be merged into a single table by selecting the tables in the database view and selecting  Selected  |  Merge  . One of the tables must be selected to be the primary table, i.e. the table from which the merged table will derive all its default fields and settings (such as which fields are required). The user then has the opportunity to match the fields of the secondary tables with the corresponding fields of the primary table. Note that the fields do not have to have the same name in the other tables or be arranged in the same order. When the matching has been completed and a name for the merged table has been specified, select  Selected  |  Merge  . This will create a new, merged table combining the data from the fields of the secondary tables (which matched the fields of the primary table) together with the original data in the primary table. Note that any fields in the secondary tables which do not correspond to fields in the primary table will be discarded and their data lost.

Any data which cannot be inserted into the merged table will be inserted into an error table when the merged table is produced. This will be accompanied by an indication of why the data failed to be inserted into the merged table e.g. where duplication of data is detected in a primary field or where the datatypes of fields which are supposed to correspond differ.

Note that merging tables will lead to incomplete records if the secondary tables do not contain all of the fields of the primary table.


8.7.4 Indexes

A field is a suitable Index field if it will be searched on regularly. The performance of the database will be improved if Indexes are specified judiciously throughout it. Indexes are best chosen after tables, relations and queries have been set up and it is clear which fields are being searched most regularly. Indexes are specified on the "Table Indexes" page which is accessed via  View/Change  |  Modify Field Indexes  on the "Fields" page. There is no limit to the number of fields in a table which are Indexed. All fields which have Indexes are indicated by an "I" in the second column of the "Fields" page.

To stop a field from being an Index, check the field name on the "Table Indexes" page and click "Remove Selected".


8.7.5 Export table

A table can be exported as a comma separated list which can be imported into many packages, such as Microsoft Excel. Tables can also be exported in Business Collaborator Table format for import into other Business Collaborator databases. Clicking  |  Export  on a table brings up the "Export Table" page. Once the export format has been specified and "Export Table" pressed, the exported table is sent to the user's bag where it is selected. From here the user can either download the table directly from their bag or, alternatively, paste this into another location within Business Collaborator.


8.7.6 Export a view

A view can be exported as a comma separated list which can be imported into many packages, such as Microsoft Excel. Clicking  |  Export  on a view brings up the "Export View" page. From here you are able to choose to export to a text or a CSV (comma separated values) file. A CSV file is suitable for opening in Microsoft Excel and a TXT file is suitable for Mail Merge in Microsoft Word. You also have the option of downloading the file immediately or placing it in your bag for download / relocation at a later date. When you are happy with your choices, click on the "Export" button.


8.7.7 Notification

It is often useful for a database administrator to be notified whenever a new record is added to the database. This functionality is provided by selecting  View/Change   |  RDB Notification  from the table view. The email address of the person who should be contacted when a new record is added to the database is entered in the text box. Clicking the "Change" button will store this address as the person to be notified. Clicking the "Change" button will also add a new, blank text box in which a new email address can be added. Please note that the database notification is different from standard Business Collaborator because of its added functionality.

To stop the nominated person from being notified, the text box should be cleared and the "Change" button clicked.

The type of notification required can then be selected:

  • Link to Database places the authorised URL (web link) of the Relational Database Container in the email.
  • Link to Table places the authorised URL (web link) of the Table in the email.
  • Record Contents puts a copy of the record entered into the email.
  • User specifies the Business Collaborator user (if applicable) who entered the record.
  • Other Link allows a further URL (web link) to also be specified, such as a web page which may be acting as an interface to a series of views, or a link to a specific View.


8.7.8 HTML Add Record forms

It is often convenient to input data into a database table via a user-defined form rather than through the standard "Add Record" form, e.g. for entering information via a website. To generate a basic input form from a table, select  Add  |  Create HTML Add Record Form  in the table view. This will create an HTML form in the "Table Templates" sub folder of the "Templates" folder in the relational database (and if this folder does not exist it will automatically be created) - see Figure 8.7-1. This form can then be customised to the user's requirements.

Note that the customisation should be carried out by someone who is familiar with HTML. The name of the form can also be changed but it should not be moved. The form should only be generated after the database structure has been finalised because it will not update dynamically when any changes are made within the database.

By default, once a recorded is added / edited using a template, the database refreshes the screen to the default Relational Database interface. To remain within the templated environment the database developer must modify the hidden input box - "refresh_to_url".


Figure 8.7-1: Relational database showing Templates folder unfolded



8.7.9 HTML View Templates

HTML view templates are primarily designed for displaying results of queries from within a website or for allowing the creation of simple web based applications. Instead of a standard Business Collaborator View page being displayed (complete with banners, buttons etc), a series of templates can be used to 'hide' the fact that Business Collaborator is being used, and allow the database 'administrator' familiar with HTML to radically redesign the query output.

Templates are created by selecting  View/Change  |  Create Template  for an existing Database View. You will then be presented with several edit options that will allow you to edit records from a templated view. By default, the system will create templates that enable you to edit or view the records present within a view.

Once you have selected which templates you require the following files will be created:

  • Container is the general container template, which holds basic code for database results information, page navigation, search bar and the display of results, as well as the actual design of the page. This is the file that will generally be customised by the user.
  • Headings is the field headings template, which is displayed as the first row of an HTML TABLE. This template can be removed, if headings are not required.
  • Row is the template for a single record in the view.
  • Edit Headings is the field headings template, which is displayed as the first row of an HTML TABLE for the edit view. This template can be removed, if headings are not required.
  • Edit Row is the template for a single record in the edit view.
  • A table template for each table that is in the query if you selected to generate these table templates. Note that if a table template already exists no new one will be created. If you need to have multiple templates for the same add / edit record operation you can do so by creating additional templates on the table directly.

Additionally, Web links are created for using these templates. They are placed within the appropriate view and table template folders.

Note
If not already present, a Templates folder will be created inside the database. Inside that, a folder named after the view will be added to contain all templates and links which have been created.

<<<<< Section >>>>> Level Up <<<<< Page >>>>> Contents
 Business Collaborator 4.9  © 1997-2003 Business Collaborator Ltd