GENDB ENHANCEMENT PROJECTS TO: 91F523 STUDENTS FROM: Robert Lechner DATE: 25-SEP-1992 Project Ideas from gendb.doc Ref: /usr/proj3/case/gen/gendb/doc/gendb.doc (92/9/25 version) This memo comments on ideas in the last section of gendb.doc called Future Enhancements, as possible 92F523 projects. Students interested in gendb or chgen should review this memo after reading gendb.doc. 1. Table indexing by user- or schema-specified fields: Line 843 suggests indexing tables with specific fields as keys. E.g. 'create index on table students field lastname'. Some code exists and is disabled. It could be made workable. 2. Another enhancement is to analyze table sizes and make arrays appropriately sized, using two passes of the schema, without using inefficient dynamic array classes. I don't recommend this project because I can't easily estimate its size. It is more appropriate AFTER we get an effective versioning capability. 3. Use of parametrized types (templates) from c++ version 2.1. Templates to handle user-defined classes is proposed on line 859. This is a desirable project but requires uptodate C++ knowledge. 4. Use of templates from version 2.1 of C++: Templates might also support direct mapping of gendb's table types and relations into compilable subclasses of gendb's generic table and field classes. Currently c++ knows nothing about network database semantics, and gendb's methods translate table and field NAMEs into addresses dynamically at run time; they cannot be pre-compiled into pointer references. 5. Versioning (a high priority goal): The version numbering and viewdefinition feature of chgen could be improved and brought into gendb. Without it, gendb is impractical for CASE and CAD tools for large team projects. Along with this is the introduction of explicit pkey bounds and counts for each table in the combined database and in FRONT of the specific file to be loaded. This info would eventualy be maintained and supplied by the RDB server (e.g.INGRES) at dbunload time (see case/91f523/xrf/base/doc files mentioning DDA.) The ;GENDB ENHANCEMENTS Page 2 xrf project updated our capability to create/load/unload an INGRES database in 91f523,but DDA has not been worked on in 92S523/XRF. 6. Comparative benchmarks between chgen and gendb are also proposed. These are possible on single-version databases or versions og views by submitting the view.dat file to applications linked to both tools. THis requires schema compability. Schema conversion is easy, but a automating conversions between chgen and gendb formats is a desirable project. 7. Data descriptions in gendb schema: One question to be asked that may require gendb enhancement: How does gendb acquire the descriptive comments that MUST be included in the schema to make it an adequate data repository? Without meaningful semantic definitions, the schema is purely a syntactic data model, not a semantic one. 8. Accessing a shared database: This is a good database course project (FYINfo, kraina and sieg) Since gendb and chgen are single-user database applications, concurrency control is missing. Building this into gendb is suggested in gendb.doc (line 874). I believe this should be done by coupling the persistent file interface with a database server. Chgen applications can already move a versioned view of an object to/from an INGRES database. Dbcreate/load/unload routines for this purpose were developed as part of 91.523 DDA projects, well before chgen was conceived. The most recent DDA work was in path proj3/case/91f523/xrf/base/doc/s91doc, which includes DDA docs and status reports. The .dat file interface avoids opening INGRES while developing gendb or chgen-based projects. I believe that sharing object (view) versions through INGRES solves the concurrency problem if (1) INGRES UPDATE permissions are given only to users who can access the GEN-based application AND (2) version locking can be enforced through this interface AND (3) GEN users never modify the same INGRES records directly. The locking mechanism should be provided by the INGRES server and not by chgen/gendb; I don't know if this is possible. 9. Table display throu a window: (for bde applications of gendb). Line 804 of gendb.doc describes a print method that is directed to the screen or a file. This method ought to be directable to a different window via X11 or Motif, or to a ;GENDB ENHANCEMENTS Page 3 scrollable popup window with selectable entry, like the FILE/open menu option. Generic methods that can be used as callback functions during window-managed editing ought to be developed. For example, this would permit online inspection of tables during interactive editing.