B-Trees for Basic
by Ray Robertson

Summary Information
ISBN 10: 0-89496-008-3 (Paper)
ISBN 13: 978-0-89496-008-6 (Paper)

TITLE: B-Trees for Basic

AUTHOR: Ray Robertson

PRICE: $14.95

BINDING: Paper

PAGES: 248

SIZE: 7.25" x 9.25"

COVER ILLUSTRATOR: DesignOne

STATUS: Available Now

  Table of Contents
Illustrations
Author Biography
Publisher Comments
Back Cover Copy


Click Here to Order


Table of Contents
Section I - Introduction

Chapter 1 - Introduction
* Overview
* Vocabulary
* Organization of Book
* About Appendix A
* The Big Picture
* Keywords & Outside Files
* Other B-trees
* Other Methods


Section II - Defining & constructing A B-tree

Chapter 2 - Defining & Constructing A B-Tree
* B-tree Vocabulary
* Simplest B-tree
* Short Review of Terms
* Using the B-tree

Chapter 3 - Searching A B-Tree
* Searching a B-tree
* Inspecting a B-tree after Entries are made
* Short Summary
* Search Example

Chapter 4 - Listing Elements On A B-Tree
* Listing the B-Tree
* B-trees with Many Levels
* Marking Position on Branch Pages
* The Listing Variables (Tv, No And Nr Arrays)
* Using the Stacking Variable
* Using the Variables in the Ascending * Procedure

Chapter 5 - Adding Elements To A B-Tree
* Adding Elements to a B-tree
* Generating a B-tree of Order 2

Chapter 6 - Deleting Elements From A B-Tree
* The Deletion Process
* Deleting Leaf Elements
* Deleting Non-leaf Elements
* Balancing-and-absorption
* Leaf-element Deletion
* Deleting from a B-tree Of Order 2
* Summary of B-tree Deletion * Algorithm


Section III - Using The TeachBase B-tree System

Chapter 7 - The TeachBase B-Tree System
* The Storage File
* The Deletion Problem
* Utility Programs
* To Move From Program To Program
* Duplicate Entries
* Fielding of B-tree & Storage Records
* The Allocationl-Deallocation * Procedure
* Order

Chapter 8 - The Teachbase B-Tree System Line-By-Line
* Overview
* Global Variables
* Organization Of Chapter Eight
* Input Routine
* Listing the B-tree in Ascending * Order
* Listing the B-tree in Descending Order
* Searching the B-tree
* B-tree Examination Utility
* Adding to the B-tree
* Deleting from the B-tree

Section IV - Changing the B-tree System

Chapter 9 - Optimizing The B-Tree Performance
* Chapter Summary
* Speed, Size of B-tree File, * Enhancements
* Analysis
* The Sector
* In Favor of Multiple Sectors Per Page
* Against Having Multiple Sectors per Page
* Calculations and Performance Results
* Maximum and Minimum B-trees
* Formula for a Minimally -loaded Tree of OrderN
* Formula for a Maxirnally-loaded Tree of Order N
* Order 9 Example
* Worst-case Growth
* Page Lengths Greater than One Sector
* Calculating the Seeks
* Calculating the B-tree Page Size
* Continuous Records on the Hard Disk
* Retrieving Time
* Processing Time
* Summary of Results
* Algorithm for Finding Optimal Page Size with Contiguous Sections

Chapter 10 - Changing The TeachBase B-Tree System
* Change Storage File Use
* Change Keyword Use
* Change Output
* Change Inputting Procedure
* Refuse Duplicate Entries
* Code Available From Publisher


Section V - Appendices

* Review Of Standard File Procedures
Overview
* Data
* File
* Sequential and Direct Files
* Sequential Files
* How to Open, Write To, and Read from a Sequential File.
* The Access Codes
* The Open Statement
* Direct Files
* Creating and Using a Direct File
* Writing to and Reading a Direct File
* Lset and Rset
* Put and Get
* Reading with the Get Statement
* Using Functions
* Storing Many Numbers in One Record
* The Mailing List Problem

Methods That Compete With A B-Tree
* The Mailing List Problem
* The Performance of B-trees vs. Hashing

The TeachBase B-tree System
* The TeachBase B-Tree System
* Generating A Table Of B-Tree Page Lengths
* To Control Waste
* License & Disclaimer
* Glossary
* index

Back to Summary Information (top of page)


Author Biography
Ray Robertson has a Masters in Mathematics from University of California and has been writing code for 15 years.

Back to Summary Information (top of page)


Illustrations
The number of illustrations in this book are too numerous to list. Diagrams are given showing every major step taken in writing a B-Tree. The diagrams also show exactly how searches are done.

Flow charts are also presented showing how the B-Tree algorithm works.

Tables are presented showing the performance of the B-Tree.

Code is listed for an entire B-Tree program and it is inspected and laboriously explained line-by-line.

Here are an example from the first chapter:

Another example from the chapter on deletion:

Back to Summary Information (top of page)


Publisher Comments
The beauty of this book is that it describes in great detail with lots of diagrams and charts exactly how a B-Tree works. It is one of the clearest explanations on the subject existing and is extremely useful for any person or classroom that is investigating databases.

The code was written in 1992 in MSDOS so that all the character based machines could use it. The code works very well for the systems it was written on but has not yet been upgraded to Visual Basic and object oriented systems. This does not dimish, however, its usefulness as a great instructional tool for anyone investigating the basics of database programming. At some point in your database education you will have to understand what is presented here with extreme clarity.

 

Back to Summary Information (top of page)


Back Cover Copy


B-Trees for BASIC

Create your own lightning-fast database!

What is a B-tree?
A Bayer tree, commonly referred to as a B-tree, is the program that is the heart and soul of almost every major database on the market. It is the "engine" that runs your database.

W
hat does it do? Suppose you are using a B-tree program and you type one million (1,000,000) names and addresses into your computer, in totally random order. You then ask the computer for a specific name. Almost as soon as you hit the "enter" key, the name and address is on the screen.

Looking through your file one name at a time, you would have to inspect an average of 500,000 names before you found your desired name. With a B-tree you need only inspect five or six names, so the one you want is on the screen within a second or two! It is no wonder that the B-tree is considered the only way to handle a large database of random information.

B-Tree Program Code Included!!

The beauty of this book is that we not only explain in great detail with lots of diagrams how a B-tree works; we also give you all the code for an actual B-tree system and analyze the code for you. Our code is written in Microsoft BASIC and it will run without any changes on at all on MAC, MSDOS or UNIX (SCO Xenix) operating systems. The B-Tree system included allows you to:

* Add items to a B-tree
* Delete items from a B-tree
* Search for an item on a B-tree
* List the contents of the B-tree both forward and backward.
* Utilities allow you to inspect how the B-tree is developed.

Back to Summary Information (top of page)


Order Information


Go To Home Page