SITH Starter

After SITH has been launched, several windows will be displayed. All windows in SITH are one of two basic types, table windows or object windows. The window labelled "S.I.T.H." is the main application window. It is a table window that displays the table of tables (that is a list of all tables in the database) and has been specialized to provide some menu options. Additionally, closing the main application window will cause all other windows to close and SITH to exit., two of which are of primary interest - the window labelled "S.I.T.H" and the window labelled "Class Table (700009)".

Using Table Windows

When SITH is first launched, a plain table window titled "Class Table (70009)" will be shown. The "Class Table" part of the title is the name of the table being viewed while the "(70009)" indicates the unique key of the the table object displayed. Every table window contains one or more columns, each of which has a header at the top of every column containing "<>". Each row represents an object stored in the table. The left-most column lists contain "Row Buttons" which are labelled object name and the unique key of the object in brackets. Other columns contain attributes for the object that were not inherited. The name of the attribute(s) is listed in the header to the left of the "<>". Columns other than the row button column can be resized by clicking and dragging anywhere along the right border of the column.

There is no sorting in table windows. To find an object easily, you can add a filter. Every column can be filtered and the filters are cumulative in the order entered. The filter for a particular column is always displayed within the "<>" and respresents a sub-string. To change a filter, click on a header, type the string being searched for (no characters will be shown until <ENTER> is pressed) and press <ENTER>

In the example the filter is for any object that has a name or key containing "class".

Contextual menus are available for each row button by right-clicking on the row button. The menu has several options broken into three areas. The top section provides standard database functionality in "Change", "Add" and "Delete". Change and Add will both display an Object Window for editing an object. Delete will of course delete the object. The ".java" option writes the class to a Java file. The second group of options is a list of messages particular to the objects being viewed that can be emitted. The third group of options is a list of messages inherited by the objects that can be emitted. Selecting any option in the second or third group will cause a Message Window to be opened.

Using the SITH Window

The SITH window is a table window that displays the table of tables (that is a list of all tables in the database) and has been specialized to provide some menu options. Filtering for the SITH window works just the same as a regular table window.

You can open a table window for any one of the tables listed by right-clicking on the row button of the table you wish to open and then selecting the "Open" option. A new table window will appear. Note that SITH has a contextual menu similar to a regular table window's, but the ".java" option is missing and the "Open" option has been added.

There are two menus on the SITH window, "File" and "Help". The Help menu contains one option, "About" which just displays some simple information about SITH. The File menu has six options. The first is "FileSave", this will save the entire memory database to the "dump.out" file, where it can be read in from disk the next time SITH is loaded. The second option is "ToJava", it will write every class to a .java file, and can take several minutes. Third is "Auto", it creates the auto.java file that contains all objects that represent the classes. Fourth is "Garbage" which runs a garbage collection routine. Fifth is "DoItAll" performs menu items one through four. Sixth is "HTML" which generates class documentation for all of the objects in the database. Near the bottom is "SaveAndExit", which does the same as the "FileSave" option and then exits. for precisely that. Finally there is "Exit" to exit without changing the DB file.

Using the Object Window

Object windows can be displayed by right-clicking the row button of a table window and selecting "Open". Object windows are used the view and editing the Go back to the SITH window and filter for "table space".

The Table Space window lists all table in the database. Open the Table Space window using the contextual menu. Filter for the Table Space table (you can do this since the Table Space table is itself a table.

We will modify the Table Space object. Select "Change" from the contextual menu. An object window will now open.

The menu bar has many menus. The first is "Record", and it has three options "Save", "Save&Exit" and "Cancel". Save save the changes to the object while Save&Exit does the same but also closes the object window. Cancel closes the object window without saving any changes. The other menus stem from the classes this object is an instance of. The menu items for these "instance" menus provide a list all the child classes for each. Selecting any of these child classes will make the current object an instance of the selected class

There are 6 buttons below the menubar, one for each class. These are supposed to represent tabs, but Swing is broken, so I made my own. Each of the tabs has a list of fields (attributes) and tables (records in a many-one relationship with this object). There is a scroll bar available to see all the tables.

The example is showing the Table Table object, it is scattered across 6 tables; indicated by the "tabs". The pink tab is the current one viewed. You can see the single attribute that an instance of Object_Class has; the Primary Key. We will select the "Table Class" tab.

There are 2 fields here, and many tables. Since we were previously viewing the Table Table in the SITH window, we note that these two fields here correlate to the two elements in the Table Table record. We could change them, but remember not to save. The button with the "V" is supposed to be a drop down box, click it:

My ugly "select box" shows a table. You will also see that the whole view has adjusted to fit this table The table is just like any other table in SITH. You can add, change records, and add filters on the spot. A single click has the added functionality of selecting that record to be the value for the field. Since I have no desire to damage the delicate database I will just click on the "V" again to replace the select-table with the original display of the field value.

Let us new select the "Name Class" tab:

There is only one attribute here, and it is the name of this object. You can change this name if you want. The Name attribute on every object is irrelevant to the operation of SITH and the DBOS. You must remember that the name will change everywhere, including our original SITH window. The filter in the SITH window many not be valid anymore.

Goto Record->Cancel to remove this window and continue the tutorial.


Using the 1-Many relation tables

One table that pops up automatically at startup is the Class Table. It lists all the classes in the database.

There are a lot of classes. Just like any other object (and like the Table Table example), you can right-click on a row button to get a list of options. All the classes shown here are boring. Let us look at a message type called "ChangeElementComplete". This message is passed from records to any listening objects whenever a change to any of its elements is made. Click on the General Filter button, type "changeelementcomplete" (Please no capitals) and press enter. There will be three records. One of them has captitals, it is the message type we are looking for. The others are handlers. Right-click on the "ChangeElementComplete" row button, and select "Change".

We will go to the "Class Table" tab. Scroll down a bit.

The "Attribute Class.Classs" is a list of all the attributes for this type of message. Any ChangeRecordComplete message will keep track of the old value (From), and the element that was changed in the record (Element). We can scroll down more to see Option.Child (the parents of this class) which is a generic message type

The tables have a funny naming convention. The name of the table is the name of the related class, append ".", and the name of the field that is of the type currently viewed. We can conclude from " Option Class.Child " that there exists a class called "Option Class", and it has a field called "Child". The table shown lists all records in the Option Class with the Child field set to the key of the record viewed (top right = 90114).

Note: The Option Table is the table that holds all the class hierarchy information.

You might be tempted to right-click on record 90118 and open the generic message object. This would not be the result. Since everything is an object, even relations, record 90118 is a inheritance relation record, it will be the object that is opened.

Conclusion

The SITH user interface is quite simple, despite being ugly. The simplicity of the interface has not adversly affected the expresability of objects in SITH. SITH has been in use now for over a year, and has had almost no changes. There are no future plans for SITH; it will be replaced by a pure DBOS version in the coming months. It is then that the look of the application will be improved.