CBCPP.zip

  • PUDN用户
    了解作者
  • C/C++
    开发工具
  • 557KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 11
    下载次数
  • 2005-01-10 21:54
    上传日期
CBASE v1.01 采用Borland公司TC++编写的数据库管理源程序库
CBCPP.zip
  • CBCPP
  • CBCLOSE.CPP
    1.8KB
  • CBKEYNEX.CPP
    3KB
  • LSLAST.CPP
    1.8KB
  • KRTMP.C
    1.5KB
  • CBGETKCU.CPP
    2.1KB
  • BTSYNC.CPP
    1.4KB
  • CBRECFIR.CPP
    1.6KB
  • CCC.BAT
    452B
  • LSCURSOR.CPP
    875B
  • LSEQ.RSP
    381B
  • CBDELCUR.CPP
    2.5KB
  • LSCREATE.CPP
    2.6KB
  • LSEQ_.H
    2.3KB
  • CBRECNEX.CPP
    1.5KB
  • BTSETBUF.CPP
    2.3KB
  • AR.EXE
    14KB
  • LSRECCNT.CPP
    630B
  • ORDER.TXT
    4.8KB
  • CBEXPORT.CPP
    4KB
  • BPUTHF.CPP
    3.1KB
  • BTCREATE.CPP
    4.7KB
  • ROLODECK.RME
    2.2KB
  • LSSETCUR.CPP
    2.1KB
  • CBRECSIZ.CPP
    638B
  • CBOPEN.CPP
    4.7KB
  • BTFIRST.CPP
    1.9KB
  • CC.H
    8.7KB
  • C.TXT
    3.3KB
  • LSGETLCK.CPP
    1KB
  • BFLUSH.CPP
    2KB
  • BOPEN.CPP
    4.4KB
  • TOOLS.TXT
    3KB
  • CBKEYSRC.CPP
    3.9KB
  • BTKEYCMP.CPP
    1.6KB
  • MAKEFILE
    741B
  • CC4.C
    23.8KB
  • BTDEMO.CPP
    14.5KB
  • ROLODECK.H
    1.1KB
  • CLIB.ARC
    51.7KB
  • HISTORY
    7.5KB
  • BOPS.CPP
    13.6KB
  • CBEXP.CPP
    8.7KB
  • CLIB.LIB
    36.2KB
  • CBINSERT.CPP
    3.7KB
  • LSEQCPP.ZIP
    39KB
  • ASM.EXE
    56.8KB
  • BEXIT.CPP
    990B
  • CC2.C
    10.3KB
  • BTCURSOR.CPP
    879B
  • DISTRIB.TXT
    2.5KB
  • LSPUTRF.CPP
    2.4KB
  • CBLOCK.CPP
    4.5KB
  • BTOPEN.CPP
    4.3KB
  • CLIBARC.LST
    659B
  • BTKEYSIZ.CPP
    628B
  • CBPUTR.CPP
    2.5KB
  • BTLAST.CPP
    1.9KB
  • LSNEXT.CPP
    1.9KB
  • BCLOSE.CPP
    1.6KB
  • READ.ME
    22.8KB
  • BOOL.H
    322B
  • ROLODECK.PRJ
    7.1KB
  • CBSETKCU.CPP
    3.1KB
  • BTSETCUR.CPP
    2.5KB
  • CBGETRF.CPP
    2.1KB
  • BGETHF.CPP
    2.6KB
  • GUIDE.TXT
    56.1KB
  • BGETBF.CPP
    3.2KB
  • CBSETRCU.CPP
    1.8KB
  • BTDELCUR.CPP
    2.2KB
  • CBKEYPRE.CPP
    3KB
  • NDOPS.CPP
    28.6KB
  • BTSEARCH.CPP
    1.9KB
  • LSGETRF.CPP
    2.3KB
  • CC1.C
    21.8KB
  • BPUTH.CPP
    1.2KB
  • CBRECLAS.CPP
    1.6KB
  • BLKIO.H
    6.1KB
  • BGETH.CPP
    1.3KB
  • BTNEXT.CPP
    2.3KB
  • LSINSERT.CPP
    3.4KB
  • BGETB.CPP
    1.4KB
  • BSYNC.CPP
    2KB
  • BLKIOCPP.ZIP
    34.9KB
  • LSEQ.H
    4.6KB
  • LSSEARCH.CPP
    3.4KB
  • DGOPS.CPP
    8.2KB
  • CBSYNC.CPP
    1.7KB
  • BFLPUSH.CPP
    3.3KB
  • CBIMP.CPP
    10KB
  • ROLODECK.CPP
    22.5KB
  • BTLOCK.CPP
    4.7KB
  • CBASE_.H
    2.8KB
  • BFLPOP.CPP
    3.1KB
  • BTGETK.CPP
    1.8KB
  • BUOPS.CPP
    14.5KB
  • CC3.C
    21KB
  • CBRECCNT.CPP
    639B
  • LSLOCK.CPP
    4.2KB
内容介绍
cbaseTM The C Database Library Citadel Brookville, Indiana Copyright  1989 by Citadel. All rights reserved. Citadel 241 East Eleventh Street Brookville, IN 47012 317-647-4720 BBS 317-647-2403 Version 1.0.1 This manual is protected by United States copyright law. No part of it may be reproduced without the express written permission of Citadel. Technical Support The Citadel BBS is available 24 hours a day. Voice support is available between 10 a.m. and 4 p.m. EST. When calling for technical support, please have ready the following information: - product name and version number - operating system and version number - C compiler and version number - computer brand and model UNIX is a trademark of AT&T. MS-DOS is a trademark of Microsoft Corporation. Turbo C is a trademark of Borland International, Inc. Contents Chapter 1. Introduction 1 Chapter 2. Database Basics 3 2.1 Sequential File Structures 2.2 Inverted Files 2.3 B-trees Chapter 3. cbase Library Functions 7 3.1 Access Control Functions 3.2 Lock Functions 3.3 Record Cursor Position Functions 3.4 Key Cursor Position Functions 3.5 Input/Output Functions 3.6 Data Import/Export Functions Chapter 4. An Example Program 15 4.1 Data Definition 4.2 Opening a cbase 4.3 Locking a cbase 4.4 Accessing a cbase 4.5 Closing a cbase 4.6 Manipulating Exported Data Appendix A. Installation Instructions 27 A1 The blkio Library A2 The btree Library A3 The lseq Library A4 The cbase library Appendix B. Defining New Data Types 33 B1 The Type Name B2 The Comparison Function B3 The Export and Import Functions B4 The Type Count Appendix C. Porting to a New Operating System 37 C1 The HOST macro C2 The File Descriptor Type C3 File Access System Calls C4 File Locking System Calls References 41 Chapter 1: Introduction cbase is a C database file management library. Records may be accessed both randomly and sequentially through indexes stored in B+-trees. Records may also be accessed sequentially in the order in which they are stored. Multiuser access is supported under any operating system with file locking capabilities. cbase is designed for portability. It is written in strict adherence to the ANSI C standard while retaining compatibility with with K&R C compilers. All system dependent code is isolated in order to make porting easy. Many of the operations performed by cbase internally represent independently useful tools, and the software has been designed with this in mind. cbase actually comprises four individual libraries, each complete and independently accessible. Figure 1.1 shows these libraries and their relationships. 旼컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� � cbase � 읕컴컴컴쩡컴컴컴컴컴컴컴컴쩡컴컴컴� 旼컴컴컴좔컴컴컴� 旼컴컴컴좔컴컴컴� � lseq � � btree � 읕컴컴컴쩡컴컴컴� 읕컴컴컴쩡컴컴컴� 旼컴컴컴좔컴컴컴컴컴컴컴컴좔컴컴컴� � blkio � 읕컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴� Figure 1.1. cbase and Underlying Libraries At the foundation of cbase is the blkio (block buffered I/O) library. blkio is a buffered I/O library similar to stdio, but based on a file model more appropriate for structured files such as used in database software. While stdio models a file as an unstructured stream of characters, blkio models a file as a collection of blocks made up of fields (see FROS89 for a complete description of blkio). The lseq (linked sequential file) library provides all the facilities necessary for the creation and manipulation of doubly linked sequential files. The btree (B-tree) library provides the same for B+-tree files. The cbase library uses lseq and btree to perform all structured file management operations. The lseq library is used for record storage and the btree library for inverted file key storage. When using a particular library, all operations are performed with functions provided by that library. No references need be made to underlying libraries. When using the cbase library, it is therefore not necessary to know the functions included in the other libraries. Chapter 2: Database Basics This chapter describes some of the basic database concepts relevant to cbase. It is intended to be a brief and readily accessible introduction, and can be easily skipped by one already familiar with database fundamentals. References are given where in-depth discussions may be found. 2.1 Sequential File Structures One of the simplest file organizations is the physical sequential file. In this organization, records are simply written one after the other and sequential access is done in the order in which the records are physically stored. The physical sequential file works very well in cases where the data is static, but it is extremely inefficient when the data is dynamic. Consider a file containing 100,000 records stored in a sorted order. The insertion of a single record at the beginning of this file would result in 100,000 records being moved to make room at the beginning of the file for the new record. This identical problem also occurs when large ordered lists are stored in memory, and the same solution, the linked list, can be used for files (see pp. 106-12 of HORO76 for an explanation of linked lists in memory). In a linked list, the record order is determined by pointers stored with each record, not by the physical record locations; a record logically located at the beginning of a file can be physically located anywhere within the file. In a singly linked list each record has only a pointer to the next record and so the file can be traversed in just one direction. In a doubly linked list, each record has both a next and a previous pointer, allowing bidirectional access. 2.2 Inverted Files Assume a data file containing member records for an organization, and that the record format for this file is typedef struct { long number; char name[24]; char address[81]; char city[24]; char state[3]; char zip[11]; } member_t; Assume further that the data file has a physical sequential file structure, and that the records are sorted by the number field, therefore a binary search may be performed to quickly find a record with a given number field. The field that the records are sorted on is called the primary index. The problem arises when a query is made on another field besides the primary index, in which case a search of the entire data file is required. The problem of being able to perform queries efficiently on more than one field can be resolved through the use of inverted files. For each secondary index exists an inverted file containing an entry for each record in the data file. The inverted file for the name field, for example, would have entries containing the name field and record position, and these would be sorted by the name field. To find a record with a given value in the name field, the inverted
评论
    相关推荐
    • 数据库课程设计
      一个数据库课程设计,access管理工具实现,用的是窗体!
    • 数据库课程设计
      数据库课程设计十分完整有需要的请下载啊谢谢
    • 数据库课程设计
      广东工业大学数据库课程设计,可视化界面连接数据库,delphi7
    • 数据库课程设计
      数据库课程设计实验及其描述 数据库课程设计实验及其描述 数据库课程设计实验及其描述 数据库课程设计实验及其描述 数据库课程设计实验及其描述 数据库课程设计实验及其描述
    • 数据库课程设计
      数据库课程设计》由周爱武、汪海威、肖云编著,遵循数据库课程设计的具体要求,独立于具体的数据库教材,从实际应用系统的需求着手,引导读者逐步完成数据库设计全过程,重点讲解数据库系统的需求分析、概念设计、...
    • 数据库课程设计
      数据库课程设计人事管理系统 数据库课程设计人事管理系统数据库课程设计人事管理系统数据库课程设计人事管理系统数据库课程设计人事管理系统数据库课程设计人事管理系统数据库课程设计人事管理系统数据库课程设计...
    • 数据库课程设计
      数据库课程设计,基于visual basic自助银行管理系统,界面很清爽,实用。同学都说好,所以就上传了!!!
    • 数据库课程设计
      数据库课程设计 里面有详细的文档资料 包含数据库一切的图 以及生成的数据库表文件 期末得分为优秀
    • 数据库课程设计
      可以作为数据库课程设计,也可以作为Java的课程设计,内容全面。本资源转载的,非本人原创。用于交流学习,特此申明!
    • 数据库课程设计
      数据库课程设计蓝天大学学生管理系统 2.商店信息管理系统 3.实验室机房收费管理系统 4.图书馆资料检索系统 5.企业库存管理系统 6.仓库管理系统 7.工程项目管理系统 8.教材管理系统 9.企业人事管理系统 10.企业财务...