Cayenne, open source orm Feast of another delicacy, 1th part

Source: Internet
Author: User

What is ORM

Before we get into the formal introduction of Apache Cayenne, let's first look at what ORM is and why we need ORM. As you know, the purpose of persistence (persistence) is to save data or objects in memory to a storage device (such as a disk), where the primary application is to save to a relational database or other type of database. In some large applications, software designers design a persistence layer to specialize in such work, including persistence and anti-persistence (persisting the data on disk or in the database into memory). And ORM, that is, object-relational mapping, is an important technology of data persistence layer. With it, software designers and developers can focus more on the business logic, which helps to separate the business logic from the database operation, and enables the loosely coupled relationships of the system, thus freeing developers from the intricacies of working with database operations. It can be said that a robust, excellent ORM framework can save us time for development, but also to provide efficient, reliable data persistence layer code.

Why Apache Cayenne

First, Cayenne is a fully open source based on the Apache License data Persistence framework. In addition to the features that the general ORM tool has, it also has a number of very good features, such as the use of one or more schema databases and Java objects to bind, you can do the commit and rollback operation of the atomic management, the database tables can be reverse-engineered and generated Java code, support remote object persistence, and so on. Not only that, Cayenne also has good support for the performance issues that DBAs care about, such as Cache and so on. And these features can be configured through a very easy-to-use visualization tool, Cayennemodeler. It can be said that this reduces the learner's learning curve and saves development time. Therefore, we will be very willing to introduce you through this Apache Cayenne basic functionality Introduction and another article Apache Cayenne advanced features to introduce you to Cayenne, how to use Cayenne, and hope that after you have studied these two articles, Cayenne Can be a choice in your development enterprise application database persistence layer framework.

Configuring Environments and Modeling

Tools download

You can download the stable version of the Cayenne2.0 installation package from the Apache Cayenne Web site. Development tool, we chose Eclipse 3.4. Because Cayenne is a data persistence layer framework, we also need a database. Here, we choose the same open source and lightweight Derby database.

Build the Environment

First, create a Java project in Eclipse. Then, put the library files needed to run Cayenne and Derby into build path.

Figure 1. LIB files required to import Cayenne and Derby

Figure 2. Put the Lib file in Build path

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.