(SAT) Demo Application

NOTE: This site is still "Under Construction". However, I would welcome your comments and suggestions.

Introduction

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

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

Demo Application Layout and Files

Selecting an item from the Directory column will display the appropriate section of the reference page. Selecting an item from the File column will display the source code and explanation of the demo application file.

HomeDirectoryFile
$SATHOME
config
config
profiles
users
form
host
log
gui.out
process
deletedisk
deletehost
displayhost
insertdisk
inserthost
main
printhost
printhosts
updatehost
report
hosts
screen
addhost
displayhost
main

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)


Copyright © 2000
Adrian Davis.