Implementation

You will not rely on JDBC, which talks to a database server. Here, you are building the database server. Although some of this is provided in the download, it is important to discuss it anyway. The heart of the database is the RandomAccessFile class, which provides nonsequential access or random input/output to files. That means that you can jump to any location (file pointer) in the file with the seek() method and after you are there, you can read from and write to the file.

You must tackle an important design decision first. Do you write data as simple bytes and manage what those bytes represent and where it is or do you write data in its native data types and manage only where the data is? If you read and write pure byte streams, ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.