SIMPOL Documentation

Chapter 7. SIMPOL Business

Introduction

All of the chapters up until now have been leading to a more comprehensive, complex, but also more realistic example of the kind of program people need to build in the average organization. This chapter will have much less text and code, but for that it has a very well documented example program that demonstrates many of the features required of a modern database-based application program.

[Tip]Tip

Before reading and getting heavily involved in this chapter, it is a good idea to at least read through Chapter 5, Dialog-Style Programs and Chapter 6, GUI-Style Database Programs. Many of the techniques for working with the Form Designer and for creating database-oriented programs are covered in those chapters.

In this chapter we will discuss the features and special techniques used in the SIMPOL Business example program. This example consists of several database tables, four forms, and both a Quick Report and a Graphic Report. The basic design is a typical order entry system with the usual four tables plus a couple of extras. Here is a list of the database tables that are included:

  • COUNTRY

  • CUSTOMER

  • ORDERDTL

  • ORDERMST

  • PRODUCT

  • SERNO

The main tables are the CUSTOMER, ORDERDTL, ORDRMST, and PRODUCT. The COUNTRY table is a very carefully designed table that contains all of the current world country names, ISO-3166 2-character code, internet domain code, CEPT Code, capital city, currency code (3-letter), and the vehicle license plate international ID code. Only the country code is stored in the records from the CUSTOMER and ORDERMST tables. The SERNO table contains a record for each of the other tables, with the table name as the unique key and the current serial number value as the only other field.

There are also the four forms, one each for the CUSTOMER, PRODUCT, and ORDERMST tables with a detail block on the ORDERMST form containing the order lines from the ORDERDTL table. The fourth form is used for creating and editing entries in the ORDERDTL table and is called from buttons on the ORDERMST form.