Link ing outline

Source: Internet
Author: User

Link ing outline

Link ing
Relationship between objects
1. the ing here refers to the relationship between objects, not the relationship between databases. The problem solved in this chapter is how to map database tables when the current object is in the following relationship, how to handle programming (Red focuses)
2. Simplify the problem:
A) How to Write Annotation
B) add, delete, modify, query, and write CRUD
3. One-to-one
A) unidirectional (primary key and foreign key)
B) bidirectional (primary key and foreign key)
C) Intermediate table (rarely used)
4. one-to-many
A) unidirectional
B) bidirectional

5. Many-to-one
A) unidirectional
B) bidirectional (one-to-multiple bidirectional is one thing)
6. many-to-many
A) unidirectional
B) bidirectional
7. Set ing
A) List
B) Set
C) Map
8. inheritance relationship (not important)
A) Single Table
B) Multiple tables
C) one master table and multiple sub-tables
9. Component ing
A) @ Embeddable
B) @ Embedded
A) unidirectional
B) bidirectional

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.