O'Reilly logo

Berkeley DB by Sleepycat™ Software, Inc.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required