Logical Join

A logical join is a method of retrieving data from a primary database using criteria stored in a set of secondary indexes. A logical join requires that your data be organized as a primary database, which contains the primary key, the primary data field, and a set of secondary indexes. Each of the secondary indexes is indexed by a different secondary key, and there is a set of duplicate data items that matches the primary keys in the primary database for each key in a secondary index.

For example, let’s assume the need for an application that will return the names of stores in which one can buy fruit of a given color. We would first construct a primary database that lists types of fruit as the key item and the store where you can ...

Get Berkeley DB 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.