home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / OOFILE / promo < prev   
Encoding:
Text File  |  1995-12-02  |  6.6 KB  |  196 lines  |  [TEXT/R*ch]

  1. WHAT IS OOFILE? 
  2. OOFILE exists to make life easy for c++ programmers who want to embed a fast
  3. database and particularly those using an application framework, or hooking up to
  4. the World Wide Web.
  5.  
  6. OOFILE is a c++ framework. It features replaceable database engines with the
  7. current release using Faircom's c-tree Plus ISAM engine. This gives us
  8. royalty-free databases portable across Mac, MS Windows and Unix.
  9.  
  10.  
  11. WHO IS OUR MARKET
  12. 1) c++ developers (or wannabees) wanting an embedded database for writing
  13. applications, especially those working in combination with an application
  14. framework such as zApp, OWL or PowerPlant.
  15.  
  16. 2) World Wide Web developers seeking a database and report-writer combination to
  17. create web pages in response to queries, searching hundreds of thousands of
  18. records (at least).
  19.  
  20.  
  21. Design Goals
  22. - everything is native C++ with no (database) preprocessor required
  23.  
  24. - keep syntax very simple, familiar to 4GL users and not needing c++ gurus
  25.  
  26. - safe syntax that makes it hard to do the wrong thing by mistake, making
  27.   maximum use of c++ compiler type-checking, built in debugging modes and 
  28.   third-party tools such as SmartHeap
  29.  
  30. - implement with a choice of database engines for the backend (imagine using 
  31.   ODBC to pull corporate data into your fast c-tree-based OOFILE EIS system)
  32.  
  33. - integrate with a range of common application frameworks
  34.  
  35. - provide additional classes for managing gui interfaces to help construct 
  36.   typical database applications, where features are not commonly part of 
  37.   application frameworks
  38.  
  39. - use a widely available level of c++ (no RTTI, templates or exception handling)
  40.  
  41.  
  42.  
  43. BASIC PHILOSOPHY
  44. Object-oriented design is mainly about classes, not individual objects.
  45.  
  46. OOFILE is similar. Most of the time you model your data in terms of classes. You
  47. do NOT declare individual objects (unlike the ODMG model).
  48.  
  49. Consider a database from the user's view. They generally see collections of data
  50. and edit or interact with individual records from the collection. The user
  51. doesn't care about individual object identity, they don't create symbolic names
  52. for particular objects. These things may be important inside the database, but
  53. do not need to be exposed.
  54.  
  55.  
  56. SOME SIMPLE EXAMPLES
  57. Note: for more examples, look on
  58. http://www.highway1.com.au/adsoftware/oofile.html
  59. or
  60. ftp://ftp.highway1.com.au/pub/adsoftware/oofile/
  61.  
  62.  
  63. Before venturing into database definitions, let's consider some
  64. operations on a database containing People, Job Histories and Companies.
  65.  
  66. // print my address
  67. cout << People["Andy Dent"].Address;
  68.  
  69. // get a separate list (iterator) of people who worked for software companies
  70. dbPeople softP( People.PrevJobs->Company->MainBusiness()=="Software" );
  71.  
  72. // for the first person in the softP collection, print the number of companies
  73. // where they've worked, and the current company size
  74. softP.start();
  75. cout << softP.Name() 
  76.      << "\t"  
  77.      << softP.PrevJobs->Company->count()
  78.      << "\t" 
  79.      << softP.CurrentJob->Company->NumEmployees() << endl;
  80.  
  81.  
  82. NOTE:
  83. The () at the end of fields, as shown above, are optional for all cases except 
  84. fields in relational expressions, eg: People.CurrentJob->StartDate().
  85.  
  86.  
  87. DECLARING SIMPLE TABLES
  88. To define a table with a few fields, the simplest declaration would be:
  89. CLASS_TABLE(dbPeople)
  90.    dbChar    Name, Address;
  91.    dbInt     Salary;
  92. };
  93.  
  94. This defaults the size of the dbChar fields to 80 chars. To specify the
  95. size of the fields, and/or control indexing options, you need to add a
  96. constructor:
  97. CLASS_TABLE(dbPeople)
  98.    dbChar    Name, Address;
  99.    dbInt     Salary;
  100.  
  101.    dbPeople : Name(40, "Name", kIndexNoDups), 
  102.               Address(255, "Address"), 
  103.               Salary("Salary", kIndexed)
  104.    {};
  105. };
  106.  
  107. Note that the constructors also specify the field name strings. These
  108. are optional, but are of great benefit when writing query and
  109. report-writer logic or when constructing a database schema that should
  110. be readable by others.
  111.  
  112. SOME OTHER FEATURES
  113. - Derived fields, either specified as a combination of existing fields or   
  114.   user-calculated
  115.  
  116. - User-defined relations
  117.  
  118. - keyword indexing
  119.  
  120. - phonetic indexing
  121.  
  122. - inbuilt report-writer
  123.  
  124.  
  125. RELATIONSHIPS
  126. One of the big features of an ODBMS is modelling the relationships between
  127. objects. OOFILE allows you to model relationships in a pure ODBMS sense, using
  128. object identifiers, or explicitly perform runtime joins over database fields.
  129. There are a number of syntaxes available to establish relationships, eg:
  130.  
  131.    dbConnect_ctree theDB;    // the physical database
  132.    dbAcademics Academics;    // a couple of tables
  133.    dbStudents  Students;
  134.  
  135.    dbRelation Supervision("Supervision");  // a concrete relation
  136.  
  137.    Supervision.Names("Supervises",        "is Supervised by")
  138.               .Tables(Academics,           Students)
  139.               .Links(Academics.Supervises, Students.Boss)
  140.               .JoinField(Academics.StaffNo, Students.SupervisorNo);
  141.  
  142.  
  143. APPLICATION FRAMEWORKS AND OOFILE
  144. GUI Integration classes are under development for zApp & PowerPlant with more
  145. frameworks to follow. A "non-intrusive" approach has been taken of providing
  146. helper classes and instructions that let you incorporate OOFILE use into an
  147. existing program.
  148.  
  149. These helper classes include subclasses of the native edit fields, that
  150. store data directly into the database. Depending on your framework,
  151. other classes are added for displaying lists of records, managing
  152. multiple page input forms and similar business application functions.
  153.  
  154. For Macintosh users, the popular AppMaker code generator has been enhanced to
  155. generate OOFILE applications. You can go from drawing your interface
  156. to a complete working database application, without writing code. 
  157.  
  158. (NEWSFLASH CodeWarrior CW7 shipped to 27,500 registered users with 
  159. an OOFILE demo included. We also have a demo on the AppMaker 2.0b3 CD.)
  160.  
  161.  
  162. STATUS
  163. The current c-tree implementation is solid and the inbuilt test data generator
  164. has been used to create databases of up to 200Mb in various configurations. 
  165.  
  166. The largest beta tester was operating a 460Mb+ database on a Sparc Classic.
  167. (670,000+ IP-flow objects as of mid July, but built in a beta before index
  168. compression was introduced - stay tuned!)
  169.  
  170. Product release, has been delayed until early December in order to confirm compatability with the latest release of c-tree Plus.
  171.  
  172.  
  173. TEST PLATFORMS in-house
  174. c-tree+ v6.4B
  175.  
  176. Mac 
  177. - CodeWarrior 1.3.1 (CW7)
  178.  
  179. MS Windows
  180. - Borland c++ v4.5p3
  181.  
  182. SunOS 4.3
  183. - g++ v2.6.3
  184.  
  185.  
  186. CONTACT
  187. Andy Dent
  188. A.D. Software
  189. 94 Bermuda Drive
  190. Ballajura, Western Australia  6066
  191. Phone/Fax +61-9-249-2719
  192. eWorld:      DentA
  193. CompuServe:  100033,3241
  194. Internet:    dent@highway1.com.au
  195.              ftp://ftp.highway1.com.au/pub/adsoftware/
  196.              http://www.highway1.com.au/adsoftware/