CREATE TABLE VGObject_version 
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     formatLvl                 Int   ,
     constraint v302PKVGObjct_vrsn Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGApplication_vrsn   -- VGApplication_version
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     memberData                Blob(1G) COMPACT    ,
     constraint v30PVApcnvs Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGDataItem_version 
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     pDEAliasAsVGName          DBOID   ,
     constraint v302PKVGDtItm_vrsn Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGGUI_version 
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     memberData                Blob(1G) COMPACT    ,
     constraint v302PKVGGUI_versin Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGProcess_version 
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     memberData                Blob(1G) COMPACT    ,
     constraint v302PKVGPrcss_vrsn Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGPSB_version 
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     memberData                Blob(1G) COMPACT    ,
     constraint v302PKVGPSB_versin Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGRecord_version 
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     memberData                Blob(1G) COMPACT    ,
     constraint v302PKVGRecrd_vrsn Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGStmtGroup_versin   -- VGStmtGroup_version
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     memberData                Blob(1G) COMPACT    ,
     constraint v30PVSmGpvs Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGTable_version 
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     memberData                Blob(1G) COMPACT    ,
     constraint v302PKVGTable_vrsn Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGMap_version 
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     memberData                Blob(1G) COMPACT    ,
     constraint v302PKVGMap_versin Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGMapGroup_version 
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     memberData                Blob(1G) COMPACT    ,
     constraint v302PKVGMpGrp_vrsn Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE TABLE VGDataDef 
   ( OID                       DBOID NOT NULL  ,
     OVer                      DBOVER NOT NULL  ,
     pSimpleTypeDef            DBOID   ,
     genInvalidMsg             Int   ,
     genMinInputMsg            Int   ,
     genReqMsg                 Int   ,
     genEditMsg                Int   ,
     genMinInput               Int   ,
     genFill                   Int   ,
     genJustify                Int   ,
     genRoutine                VarChar(254)   ,
     genDateEdit               VarChar(254)   ,
     genInputReq               Int   ,
     genHexEdit                Int   ,
     genFold                   Int   ,
     genSoSiSpace              Int   ,
     numRecFieldLen            Int   ,
     numRangeMsg               Int   ,
     numSign                   Int   ,
     numMin                    VarChar(254)   ,
     numMax                    VarChar(254)   ,
     numCurrSym                Int   ,
     numNumSep                 Int   ,
     numZeroEdit               Int   ,
     constraint v302PKVGDataDef Primary Key( OID, OVer ) )
     IN TOOLS ;

CREATE VIEW Pl_VGDataDef AS --Plasma for VGDataDef
  SELECT
    a.*,
    m.sourceOID,
    m.sourceOVer
  FROM
    VGDataDef a, ManyPtrTable m
  WHERE
    m.targetOID=a.OID AND m.targetOVer=a.OVer AND
      m.classAttrib='ADViewRoot.plasma';

