Cayenne User Documentation
Overview

## Introduction

Cayenne is a mature, powerful, full-featured open source Object/Relational Mapping (ORM) framework. Cayenne is written in Java and is intended for Java developers working with relational databases. Cayenne has been successfully used in production environment in a wide range of applications.

Cayenne allows to reduce the development time in any database project by creating an object-oriented abstraction of the database schema. Development teams using Cayenne will be able to concentrate on the core business requirements and the data model instead of the SQL details.

Cayenne features include management of persistent Java objects mapped to relational databases, single method call queries and updates (including atomic updates of all modified objects), seamless integration of multiple databases into a single virtual data source, remote object persistence, etc. Cayenne is distributed with CayenneModeler - a complete GUI mapping tool that supports reverse-engineering of RDBMS schema, editing database mappings and generation of Java source code for the persistent objects. Any SQL database which provides JDBC connectivity will work with Cayenne, although for better integration we provide adapters for the following DB's.

Cayenne comes with a comprehensive set of HTML documentation and full source code, including source code for the GUI tools. Free support is provided via user mailing lists. Commercial support and consulting services are also available.

## Flavors of Cayenne

Cayenne framework provides three flavors of object persistence: Cayenne Persistence API, Remote Object Persistence (ROP) and Java Persistence API (JPA). All three are dealing with object persistence, and are based on the same underlying Cayenne stack. If you are in doubt which one to choose, go with "Cayenne Persistence API" - this is a universal choice appropriate for most Java applications. But what are the differences between the three?

- Cayenne Persistence API is a general purpose object-relational API and XML mapping format. CayenneModeler GUI tool is used to create the mapping. When we say "Cayenne" throughout the documentation, we usually mean Cayenne Persistence API flavor, unless JPA or ROP is explicitly mentioned.

- Remote Object Persistence (ROP) is not a standalone persistence API. Rather this is a technology that enables the use of Cayenne Persistence API on remote client applications. This architecture is demonstrated here. Often (but not always) ROP clients are SWT or Swing applications that can not (or should not) access the database directly, and/or benefit from separation of the server and client logic.

- Java Persistence API (JPA) (alpha, new in 3.0) is an emerging Java standard for object relational mapping (it is a part of EJB3). JPA mapping is commonly done via annotations directly on Java classes. The advantage of JPA is standardized mapping and persistence API, that in theory allows to switch provider vendors. The disadvantage is that the underlying provider implementation is completely hidden from the application, making it less flexible. As of the early 3.0 milestones, implementation of the JPA provider in Cayenne is not complete.

### Sections

1. Database support
2. License
3. Guide to 3.0 Features
4. Guide to 1.2 Features
5. Guide to 1.1 Features

.
Copyright ©2001-2008 Apache Software Foundation