Skip Headers

# Data-Level and Object-Level Queries

Previous

Next

In TopLink, queries can be defined for objects or data.

- Object-level queries (see "Object-Level Read Query" and "Object-Level Modify Query") are object-specific and return data as objects in your domain model. They are the preferred type of query for mapped data. By far, object-level `DatabaseQuery` queries are the most common query used in TopLink.

- Data-level queries (see "Data-Level Read Query" and "Data-Level Modify Query") are used to query database tables directly, and are an appropriate way to work with unmapped data, such as foreign keys and object version fields.