"SSH"--orm Basics

Source: Internet
Author: User
Tags ssh
The origin of ORM:

currently popular programming languages, such as Java, C #, and so on, they are object-oriented programming language, and the current mainstream database products, such as ORACLE,DB2, is still a relational database. The development and coordination of programming languages and underlying databases has spawned an ORM framework. ORM Framework can be used as a bridge between object-oriented programming language and database. ORM Framework is an intermediate solution to the development of object-oriented programming language and relational database in different stages.


Why use ORM?

the advantages of object-oriented programming language representation:

1. Object-oriented modeling and Operation

2, polymorphism, inheritance

3. Abandon the difficult process of understanding

4, easy to use, easy to understand
However, the development of the database is not synchronized with the programming language, so some advantages of the relational database system are also the object-oriented language can not be compared at present, this time the ORM framework is out. Only the object-oriented programming language is still used, the underlying database is still used, and the ORM tool is indispensable in the middle. With the ORM framework, the program is no longer directly accessing the database, but the object-oriented operation of persistent objects (such as additions and deletions), and the ORM framework is to translate these object-oriented operations into the underlying SQL operations.


the ORM definition:

ORM: Object-Relational Mapping (English: Relational Mapping) is a program technology that enables the conversion of data between different types of systems in an object-oriented programming language. In effect, it actually creates a "virtual object database" that can be used in a programming language.


the basic mapping method of ORM:

1. Data type mapping mode
2. Class Mapping model
3. Correlation mapping mode
4. Reference mapping mode

The main use of the SSH Online mall is the association mapping mode: one to the correlation mode, a one-to-many correlation pattern, many-to-many correlation pattern, in the next article will introduce the ORM basic mapping way.


Summary:

The ORM methodology is based on three core principles: simple: Modeling data in the most basic form. Communication: The database structure is documented in a language that anyone can understand. Accuracy: Create a properly standardized structure based on the data model.

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.