SAT Demo Applications
S@
Home SATGUI SATSHELL SATFORM SATFILTER SATREPORT SATMYSQL License Download Examples Contact

Introduction

It is best to explain how to use the SAT facilities by example. The demo applications used here are simple computer inventory systems. I've incorporated as many SAT features as possible, which may seem a little over-the-top for such small applications, but serves well as a demonstration.

Before examining the application configuration and code, you should take a look at the Demo1/Demo2 application user guide. After all, the code won't mean much if you don't know what it's trying to do!

There are two versions of the demo application Demo1 which uses buttons for action/navigation, and Demo2 which uses a menubar.

Demo Application Database

The database used by the demo application is defined as follows:-

mysql> show tables;
+----------------+
| Tables in demo |
+----------------+
| disk           |
| host           |
+----------------+
2 rows in set (0.00 sec)

mysql> describe host;
+------------+----------+------+-----+---------+-------+
| Field      | Type     | Null | Key | Default | Extra |
+------------+----------+------+-----+---------+-------+
| host       | char(15) |      | PRI |         |       |
| serial_no  | char(15) | YES  |     | NULL    |       |
| company    | char(15) | YES  |     | NULL    |       |
| model      | char(15) | YES  |     | NULL    |       |
| os         | char(15) | YES  |     | NULL    |       |
| processors | int(11)  | YES  |     | NULL    |       |
| speed_mhz  | int(11)  | YES  |     | NULL    |       |
| memory_mb  | int(11)  | YES  |     | NULL    |       |
| ip_address | char(15) | YES  |     | NULL    |       |
| updated    | int(11)  | YES  |     | NULL    |       |
+------------+----------+------+-----+---------+-------+
10 rows in set (0.03 sec)

mysql> describe disk;
+-----------+----------+------+-----+---------+-------+
| Field     | Type     | Null | Key | Default | Extra |
+-----------+----------+------+-----+---------+-------+
| host      | char(15) |      | PRI |         |       |
| disk$id   | char(15) |      | PRI |         |       |
| disk$size | char(6)  | YES  |     | NULL    |       |
| type      | char(4)  | YES  |     | NULL    |       |
+-----------+----------+------+-----+---------+-------+
4 rows in set (0.00 sec)

mysql> show index from host;
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+
| host  |          0 | host_idx |            1 | host        | A         |     3       |     NULL |
+-------+------------+----------+--------------+-------------+-----------+-------------+----------+
1 row in set (0.00 sec)

mysql> show index from disk;
+-------+------------+-----------+--------------+-------------+-----------+-------------+----------+
| Table | Non_unique | Key_name  | Seq_in_index | Column_name | Collation | Cardinality | Sub_part |
+-------+------------+-----------+--------------+-------------+-----------+-------------+----------+
| disk  |          1 | disk_idx  |            1 | host        | A         |   NULL      |     NULL |
| disk  |          0 | disk_idx2 |            1 | host        | A         |      8      |     NULL |
| disk  |          0 | disk_idx2 |            2 | disk$id     | A         |      8      |     NULL |
+-------+------------+-----------+--------------+-------------+-----------+-------------+----------+
3 rows in set (0.00 sec)

Installing Demo Applications

Source for the demo applications can be downloaded. Each file contains all the necessary config, form, process, report and screen files. A dump of the MySQL demo database is also included in the demo.database file.

NOTE: The database is the same for both applications.

NOTE: Both demo applications can be installed in the same user. Simply change the SATHOME location to select which application to use.


Copyright © 2003 Adrian Davis.