HP 3000 Manuals

Defining the TurboIMAGE/XL Database [ Getting Started with HP IMAGE/SQL ] MPE/iX 5.0 Documentation


Getting Started with HP IMAGE/SQL

Defining the TurboIMAGE/XL Database 

A TurboIMAGE/XL schema is made up of three parts:

   *   Password
   *   Item
   *   Set

The Password Part was discussed in the previous section.

The Item Part contains the list of attributes, called items, in the
database.  Only a single definition is required, even if the item is used
in the database in more than one set.  Also included in the Item Part is
each item's data type and length.  Data types are discussed in the
section, "Mapping of Data Types," in Chapter 3 and will not be addressed
here.

The Set Part describes the entities, the set type, the security, and the
items that make up the entry.  Size is also defined, with a capacity
value that indicates the maximum number of entries for that entity.

The database schema presented in this section is included with the
IMAGE/SQL product and is found in SAMPLEDB.SYS. Practice with this
database is in Chapter 6, "Practicing with IMAGE/SQL Using MusicDBE."

The schema for the sample database is as follows:

     Begin data base Music;
     Passwords: 10 MGR;
                20 DIR;
                30 ANNCR;
     Items:
       AlbumCode,       I2;
       AlbumCost,       P8;
       AlbumTitle,      X40;
       Announcer,       X40;
       Birth,           X16;
       BirthPlace,      X40;
       Comment,         X80;
       ComposerName,    X16;
       DateRecorded,    X16;
       Death,           X16;
       EndTime,         X16;
       Medium,          X2;
       MfgCode,         X40;
       Performers,      X40;
       RecordingCo,     X10;
       SelectionName,   X40;
       StartTime,       X16;
       Timing,          X16;

     Sets:
     Name:  Albums, Manual(10,20,30/10,20);
     Entry: AlbumCode (2),
            AlbumTitle,
            Medium,
            AlbumCost,
            RecordingCo,
            DateRecorded,
            MfgCode,
            Comment;
     Capacity: 1000;

     Name:  Composers, Manual (10,20,30/10,20);
     Entry: ComposerName (1),
            Birth,
            Death,
            Birthplace,
            Comment;
     Capacity: 1000;

     Name:  Selections-A, Automatic;
     Entry: SelectionName(2);
     Capacity: 1000;

     Name:  Selections, Detail (10,20,30/10,20);
     Entry: AlbumCode (Albums),
            SelectionName (Selections-A),
            ComposerName (Composers),
            Timing,
            Performers,
            Comment;
     Capacity: 1000;

     Name:  Log, Detail (10,20,30/10,30);
     Entry: AlbumCode (Albums),
            SelectionName (Selections-A),
            StartTime,
            EndTime,
            Announcer;
     Capacity: 1000;

     End.

The next step is to create a root file for this database with DBSCHEMA as
follows:
________________________________________________
|                                              |
|         :FILE DBSTEXT = MUSICSCH.SAMPLEDB.SYS|
|         :RUN DBSCHEMA.PUB.SYS;PARM=3         |
________________________________________________

            

The schema is displayed here, followed by this detail:

         DATA SET      TYPE  FLD  PT  ENTR  MED  CAPACITY    BLK  BLK  DISC
           NAME              CNT  CT  LGTH  REC              FAC  LGTH SPACE

         ALBUMS            M  8    2   98    115  1000        4    461  1008
         COMPOSERS         M  5    1   84    95   1000        4    381  752
         SELECTIONS-A      A  1    2   20    37   1000        10   371  304
         SELECTIONS        D  6    3   98    110  1000        4    441  1008
         LOG               D  5    2   58    66   1001        7    463  576
               TOTAL DISC SECTORS INCLUDING ROOT: 3664

         NUMBER OF ERROR MESSAGES: 0
         ITEM NAME COUNT: 18      DATA SET COUNT: 5
         ROOT LENGTH: 916         BUFFER LENGTH: 463     TRAILER LENGTH: 256

         ROOT FILE MUSIC  CREATED.



MPE/iX 5.0 Documentation