home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-02 | 6.6 KB | 196 lines | [TEXT/R*ch] |
- WHAT IS OOFILE?
- OOFILE exists to make life easy for c++ programmers who want to embed a fast
- database and particularly those using an application framework, or hooking up to
- the World Wide Web.
-
- OOFILE is a c++ framework. It features replaceable database engines with the
- current release using Faircom's c-tree Plus ISAM engine. This gives us
- royalty-free databases portable across Mac, MS Windows and Unix.
-
-
- WHO IS OUR MARKET
- 1) c++ developers (or wannabees) wanting an embedded database for writing
- applications, especially those working in combination with an application
- framework such as zApp, OWL or PowerPlant.
-
- 2) World Wide Web developers seeking a database and report-writer combination to
- create web pages in response to queries, searching hundreds of thousands of
- records (at least).
-
-
- Design Goals
- - everything is native C++ with no (database) preprocessor required
-
- - keep syntax very simple, familiar to 4GL users and not needing c++ gurus
-
- - safe syntax that makes it hard to do the wrong thing by mistake, making
- maximum use of c++ compiler type-checking, built in debugging modes and
- third-party tools such as SmartHeap
-
- - implement with a choice of database engines for the backend (imagine using
- ODBC to pull corporate data into your fast c-tree-based OOFILE EIS system)
-
- - integrate with a range of common application frameworks
-
- - provide additional classes for managing gui interfaces to help construct
- typical database applications, where features are not commonly part of
- application frameworks
-
- - use a widely available level of c++ (no RTTI, templates or exception handling)
-
-
-
- BASIC PHILOSOPHY
- Object-oriented design is mainly about classes, not individual objects.
-
- OOFILE is similar. Most of the time you model your data in terms of classes. You
- do NOT declare individual objects (unlike the ODMG model).
-
- Consider a database from the user's view. They generally see collections of data
- and edit or interact with individual records from the collection. The user
- doesn't care about individual object identity, they don't create symbolic names
- for particular objects. These things may be important inside the database, but
- do not need to be exposed.
-
-
- SOME SIMPLE EXAMPLES
- Note: for more examples, look on
- http://www.highway1.com.au/adsoftware/oofile.html
- or
- ftp://ftp.highway1.com.au/pub/adsoftware/oofile/
-
-
- Before venturing into database definitions, let's consider some
- operations on a database containing People, Job Histories and Companies.
-
- // print my address
- cout << People["Andy Dent"].Address;
-
- // get a separate list (iterator) of people who worked for software companies
- dbPeople softP( People.PrevJobs->Company->MainBusiness()=="Software" );
-
- // for the first person in the softP collection, print the number of companies
- // where they've worked, and the current company size
- softP.start();
- cout << softP.Name()
- << "\t"
- << softP.PrevJobs->Company->count()
- << "\t"
- << softP.CurrentJob->Company->NumEmployees() << endl;
-
-
- NOTE:
- The () at the end of fields, as shown above, are optional for all cases except
- fields in relational expressions, eg: People.CurrentJob->StartDate().
-
-
- DECLARING SIMPLE TABLES
- To define a table with a few fields, the simplest declaration would be:
- CLASS_TABLE(dbPeople)
- dbChar Name, Address;
- dbInt Salary;
- };
-
- This defaults the size of the dbChar fields to 80 chars. To specify the
- size of the fields, and/or control indexing options, you need to add a
- constructor:
- CLASS_TABLE(dbPeople)
- dbChar Name, Address;
- dbInt Salary;
-
- dbPeople : Name(40, "Name", kIndexNoDups),
- Address(255, "Address"),
- Salary("Salary", kIndexed)
- {};
- };
-
- Note that the constructors also specify the field name strings. These
- are optional, but are of great benefit when writing query and
- report-writer logic or when constructing a database schema that should
- be readable by others.
-
- SOME OTHER FEATURES
- - Derived fields, either specified as a combination of existing fields or
- user-calculated
-
- - User-defined relations
-
- - keyword indexing
-
- - phonetic indexing
-
- - inbuilt report-writer
-
-
- RELATIONSHIPS
- One of the big features of an ODBMS is modelling the relationships between
- objects. OOFILE allows you to model relationships in a pure ODBMS sense, using
- object identifiers, or explicitly perform runtime joins over database fields.
- There are a number of syntaxes available to establish relationships, eg:
-
- dbConnect_ctree theDB; // the physical database
- dbAcademics Academics; // a couple of tables
- dbStudents Students;
-
- dbRelation Supervision("Supervision"); // a concrete relation
-
- Supervision.Names("Supervises", "is Supervised by")
- .Tables(Academics, Students)
- .Links(Academics.Supervises, Students.Boss)
- .JoinField(Academics.StaffNo, Students.SupervisorNo);
-
-
- APPLICATION FRAMEWORKS AND OOFILE
- GUI Integration classes are under development for zApp & PowerPlant with more
- frameworks to follow. A "non-intrusive" approach has been taken of providing
- helper classes and instructions that let you incorporate OOFILE use into an
- existing program.
-
- These helper classes include subclasses of the native edit fields, that
- store data directly into the database. Depending on your framework,
- other classes are added for displaying lists of records, managing
- multiple page input forms and similar business application functions.
-
- For Macintosh users, the popular AppMaker code generator has been enhanced to
- generate OOFILE applications. You can go from drawing your interface
- to a complete working database application, without writing code.
-
- (NEWSFLASH CodeWarrior CW7 shipped to 27,500 registered users with
- an OOFILE demo included. We also have a demo on the AppMaker 2.0b3 CD.)
-
-
- STATUS
- The current c-tree implementation is solid and the inbuilt test data generator
- has been used to create databases of up to 200Mb in various configurations.
-
- The largest beta tester was operating a 460Mb+ database on a Sparc Classic.
- (670,000+ IP-flow objects as of mid July, but built in a beta before index
- compression was introduced - stay tuned!)
-
- Product release, has been delayed until early December in order to confirm compatability with the latest release of c-tree Plus.
-
-
- TEST PLATFORMS in-house
- c-tree+ v6.4B
-
- Mac
- - CodeWarrior 1.3.1 (CW7)
-
- MS Windows
- - Borland c++ v4.5p3
-
- SunOS 4.3
- - g++ v2.6.3
-
-
- CONTACT
- Andy Dent
- A.D. Software
- 94 Bermuda Drive
- Ballajura, Western Australia 6066
- Phone/Fax +61-9-249-2719
- eWorld: DentA
- CompuServe: 100033,3241
- Internet: dent@highway1.com.au
- ftp://ftp.highway1.com.au/pub/adsoftware/
- http://www.highway1.com.au/adsoftware/