EF4 a table is divided into multiple entities

Source: Internet
Author: User

 If we have a table that contains some frequently used fields and some very large but not frequently used fields, we should avoid reading these fields during queries for performance reasons.

In this case, we can split a table into two or more entities.

 In the following example, the person table contains personal and family information. To split personal and family information, follow these steps:

1. Add the person table to EDM.

 

2. Add an object type. The object name is personfamilyinfo. Change the key property name to personid.

 

 3. Cut the family information in the person object to the personfamilyinfo object..

4. ClickPersonfamilyinfoTo view the Mapping Details window, clickAddA table or view, select object person

 

 5. Right-click the person object and add a one-to-one association to personfamilyinfo.

 

6. View Association attributes and add a reference constraint between two entities to ensure that personfamilyinfo does not exist independently of person.

In this way, we split a table into two entities:

 

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.