This tool is used to create and modify database definitions
Creating a Database
Table... from the menu. That will display the data source dialog. Since no data sources are currently open, the drop down menu with the list of tables will be empty. In the
New *.sbm File Name box enter the location where you wish to create the database container, and the name of the container file. In the
Table Name box enter the name of the table.
|When working with Superbase hybrid applications it is a good idea to keep table names in uppercase and no longer than 8 characters. Spaces are not permitted.|
Once you have done this click OK to display the dialog window where we can define the table
To add a field, just click on the Add Field button. That will show the box for the field name, so enter that into the box and click on the OK button.
The default data type for a new field in an empty table is string (text). It is good to change this after a number of fields have been added, since the fields inherit the data type and other characteristics from the currently selected field. There are several important columns which are not shown above. The three columns called Shareable, Share Name, and Share Type are specific to multi-user database support. They determine if the field is seen in the PPCS server, and if so, what name and what data type it will have. data type and share type should be valid (max. 16 characters beginning with a letter), and the data type and share type should be compatible. The defaults tend to be adequate. The Display Format column is used as part of the mulit-user database engine, but is also used to supply the desired display format in the data-aware form environment. It defaults to 4000 (this is also the maximum length of a text field that can be accessed via the PPCS protocol used for the current multi-user support, change this value to whatever value is appropriate. Setting this value does not cause the database to restrict the column size)
|The SBME database format does not actually have any limitations on the size of a text column, or an integer, etc., but since the initial multi-user support was designed to be 100% compatible with Superbase’s PPCS protocol, it has the exact same limitations as well. A later version of the protocol that is not intended to be Superbase compatible is planned, and will support all SIMPOL data types in their full capabilities. Also, the database engine only stores what is there, it uses variable length fields to only take up the space it must.|
To change the data type of a field, there is a drop down menu. To add an index pick the cell in the next column, Index Type, and click again to drop down the selection box, and pick either
unique as the index type, then click on the next cell to see the results.
Changing the data type from a string causes the display format to change, to change format to something more fiendly you can do this either directly or via the
Display Format button. The final result should now be shown in the Superbase NG Personal in Record View
Modifying a Database
Modifying a database is as easy as creating one, go to File → Modify and the Database Table Definition window will pop up. Here you can add, change, and delete fields. Furthermore, you can alter their display format. It is not possible to modify a table that has been accessed via PPCS. The table must first be removed from the PPCS server before it can be modified like any other. If data types are being changed it is recommended to remove the index, change the type, save the definition, reorganize the table, and then go back and add the index back onto the field
|Please note that changing a string field to a date, time or datetime, will not give the results that you wish. In fact, it will probably just lose the data. The date, time and datetime data types are all stored internally as integers. There is currently no mechanism that can convert a string to a date without using a program.|