Ideas related to database systems can be divided into three broad categories:
1. Design of databases. How does one develop a useful database? What types of information go into the database? How is the information structured? What assumptions are made about types or values of data items? How do data items connect?
2. Database programming. How does one express queries and other operations on the database? How does one use other capabilities of a DBMS, such as transactions or constraints, in an application? How is database programming combined with conventional programming?
3. Database system implementation. How does one make a DBMS, including such matters as query processing, transaction processing and organizing storage for efficient access?
How Indexes Are Implemented
The true cost of disk operations usually is proportional to the number of disk blocks accessed. Thus, searches of a B-tree, which typically examine only a few disk blocks, are much more efficient than would be a binary-tree search, which typically visits nodes found on many different disk blocks. This distinction, between B-trees and binary search trees, is but one of many examples where the most appropriate data structure for data stored on disk is different from the data structures used for algorithms that run in main memory.