Btree library

Eli Marmor marmor at bimacs.BITNET
Wed May 31 21:51:04 AEST 1989


I wrote:

>Hi Btree experts in the net. I need your collective expertise on the
>following problem:
>We have a complicated program (for PC) which uses Btrieve. We are porting it
>to other OS's and machines, so we have to emulate Btrieve by
>another database library source (in C), because the original one was written
>in Assembly (8086).
>
>I've heard about the following:
>       D-isam  -  C-isam compatible source.
>       C-tree  -  Another Btree source.
>       db_vista -   "       "     ".
>       B-Plus  -  A Public-Domain source.
>
>Currently, I have only the 4th, so I can't check which of them is the most
>appropriate for emulating Btrieve. I can't test performance, too.
>
>
>I would like to get the net impression, on my problem.
>If there are any benchmarks, I will be glad to hear about them.
>The important criterions are:
>       applicability
>       which is optimised for this purpose
>       performance
>       portability (Dos, Unix)
>If there is another software, I'll be happy to hear about it.


                PART 1: B-Plus
                ==============

First of all, I want to refer to B-Plus, because I recieved many questions
about it. It isn't public domain, and I meant to say it was shareware.
I want to quote a part from its documentation:

>              B-PLUS is a versatile, carefully designed module for C
>         programmers who need a fast, efficient program for indexing
>         data files.  B-PLUS allows data records to be retrieved based
>         on a key value without regard to their position in the data
>         file.  The data records can also be accessed in sequential
>         order in either a forward and reverse direction.
>
>              The B-PLUS Program Module is based on the famous and
>         widely used b-tree algorithm and has a number of useful
>         extensions which are not found in many programs of this type.
>         Some of its features are the following:
>
>              - Variable length keys are allowed
>              - File size limited only by DOS or by disk space
>              - All functions are non-recursive so very little stackO
>                space is required
>              - The most recently used key values are stored in a
>                cache buffer in main memory for fast access
>              - Duplicate keys are allowed
>
>              The B-PLUS program has been tested using the Microsoft C
>         Compiler, Versions 4.0 and 5.0 (Beta), and the Borland Turbo
>         C Compiler Version 1.0.  The compiled object file is less
>         than 9.4K bytes in length for these compilers.
>
>
>         LICENSE AND REGISTRATION
>
>              B-PLUS is distributed as a "shareware" program.  Please
>         help us get it known by giving unmodified copies of the
>         program and documentation to other programmers who may find
>         B-PLUS useful.
>
>              B-PLUS is copyright (C) 1987 by Hunter and Associates.
>         It is not public domain or free software.  Non-registered
>         users are granted a limited license to use B-PLUS on a trial
>         basis for determining whether or not it is suitable for their
>         needs.  Registration permits the use of B-PLUS on one CPU and
>         allows the use of the compiled B-PLUS modules in programs for
>         general sale and/or distribution.
>
>              The registration fee is $25 or $35.  Users who pay the
>         $35 fee will be sent a disk containing a fully commented
>         listing of the latest source code, the user documentation,
>         and a number of useful sample programs.  Users who pay the
>         $25 fee are not sent a new disk but are included in the
>         mailing list for announcements about both current and future
>         products.  Your prompt registration of your copy of the B-
>         PLUS program is appreciated.
>
>              A trial disk with supporting documentation is available
>         directly from Hunter and Associates for $10.
>
>              Register your usage of B-PLUS by sending the registra-
>         tion fee to:
>
>                        Hunter and Associates
>                        7050 NW Zinfandel Lane
>                        Corvallis, OR  97330
>                        Telephone: (503) 745-7186
>
>         Your comments regarding the B-PLUS program or any suggestions
>         you have for extensions or for other programs that would be
>         useful to you are welcomed.
>
>              Hunter and Associates makes no warranties whatsoever
>         regarding the B-PLUS computer programs or the supporting
>         documentation.

As shareware, it's very useful, but I think it can't compete with
the others I mentioned: C-ISAM, c-tree, Btrieve.


                PART 2: Btrieve
                ===============

I meant to Novell Btrieve. It's a resident library for PC's, and
because it was written in Assembly, it can't be ported to other machines,
so I have to use an another file-handler (with source) to emulate it.
It's too good, so it won't be so easy to emulate.


                PART 3: D-ISAM & c-tree
                =======================

D-ISAM is a C-ISAM compatible, that is sold with source code.
It's sold by a Canadian software house, called BYTE Designs
(authors of 'w' - windows for C).
C-ISAM is the Informix file's format, and the standard of X/OPEN for
UNIX DBMSs.
c-tree is the most popular file handler for UNIX, and is sold
(with its source code) by FairCom (4006 West Broadway, Columbia,
MO 65203).
I have a DEPENDENT benchmark from FairCom. They claim:

>                       Btrieve V4.00   C-ISAM V2.11    c-tree V4.1
>                       =============   ============    ===========
>Add Record (seconds):   0.54           0.45            0.35
>Delete "  :             0.86           1.07            0.41
>Update " with key cha': 0.91           0.87            0.46
>Random search:          0.17           0.14            0.11
>File Size (in MB):      2.00           1.77            1.71
>
>Variable Length Record: V              X               V
>  "        "    Keys:   V              V
>  "  Key Segment offs': X              X               V
>Key Compression:        X              V               V
>Virtual File Opens:     V              X               V
>Partial Key Search:     X              V               V
>Maximum Indices:        24             Unlimited       Unlimited
>Max' Segments per Key:  24             8               Unlimited
>Integer Key Type:       V              V               V
>Floating Point Key T':  X              V               V
>Decimal Key Type:       X              V               X
>Maximum Key Length:     255            120             255
>Alt' Collating Sequence:V              V               V
>Change File Buf' Conf': V              X               V
>Transaction Processing: V              X               X
>Multi-User/Netw' Supp': Optional       Optional        V
>Source Code:            X              $10,000~        V
>No Royalties:           V              X               V
>Distribute Utilities:   X              X               V
>Free Updates:           X              X               V
>Free Mfctrer's Support: X              V               V

I'm very doubtful regarding the performance, because it's a dependent
benchmark, and everybody claims he's faster, wiser, etc.
With regard to the other capabilities, I know that the new versions
of them filled in what was missing, but D-ISAM is compatible with the
old version mentioned here.
Of course, as opposed to C-ISAM, D-ISAM has no royalties and its
source-code is included in based price, like c-tree.

This benchmark, except for dependence, doesn't help me know
which of them is the easier to be changed or to emulate Btrieve.
Thus, I need your help in these problems.

Please E-mail replies. I will summerize if interest arises. Thanks in
advance.  Eli.

    Eli Marmor.
    El-Mar.
    7 Lassale st., Kfar-Saba, Israel 44417
    Tel: (972-52) 929556

    BITNET: marmor at bimacs
    ARPA:   marmor%bimacs.bitnet at cunyvm.cuny.edu
    CSNET:  marmor%bimacs.bitnet%cunyvm.cuny.edu at csnet-relay
    UUCP:   uunet!mcvax!humus!bimacs!marmor



More information about the Comp.lang.c mailing list