new (KirbyBase)

    # File lib/kirbybase.rb, line 403
        def initialize(connect_type=:local, host=nil, port=nil, path='./',
         ext='.tbl', memo_blob_path='./', delay_index_creation=false)
            @connect_type = connect_type
            @host = host
            @port = port
            @path = path
            @ext = ext
            @memo_blob_path = memo_blob_path
            @delay_index_creation = delay_index_creation

            # See if user specified any method arguments via a code block.

            yield self if block_given?

            # After the yield, make sure the user doesn't change any of these

            # instance variables.

            class << self
                private(:connect_type=, :host=, :path=, :ext=, :memo_blob_path=,
                 :delay_index_creation=)
            end

            # Did user supply full and correct arguments to method?

            raise ArgumentError, 'Invalid connection type specified' unless (
             [:local, :client, :server].include?(@connect_type))
            raise "Must specify hostname or IP address!" if \
             @connect_type == :client and @host.nil?
            raise "Must specify port number!" if @connect_type == :client and \
             @port.nil?
            raise "Invalid path!" if @path.nil?
            raise "Invalid extension!" if @ext.nil?
            raise "Invalid memo/blob path!" if @memo_blob_path.nil?

            @table_hash = {}

            # If running as a client, start druby and connect to server.

            if client?
                DRb.start_service()
                @server = DRbObject.new(nil, 'druby://%s:%d' % [@host, @port])
                @engine = @server.engine
                @path = @server.path
                @ext = @server.ext
                @memo_blob_path = @server.memo_blob_path
            else
                @engine = KBEngine.create_called_from_database_instance(self)
            end

            # The reason why I create all the table instances here is two

            # reasons:  (1) I want all of the tables ready to go when a user

            # does a #get_table, so they don't have to wait for the instance

            # to be created, and (2) I want all of the table indexes to get

            # created at the beginning during database initialization so that

            # they are ready for the user to use.  Since index creation

            # happens when the table instance is first created, I go ahead and

            # create table instances right off the bat.

            #

            # You can delay index creation until the first time the index is

            # used.

            if @delay_index_creation
            else
                @engine.tables.each do |tbl|
                    @table_hash[tbl] = \
                     KBTable.create_called_from_database_instance(self, tbl,
                     File.join(@path, tbl.to_s + @ext))
                end
            end
        end