E-R diagram conversion database of computer room reconfiguration

Source: Internet
Author: User
Preface

As has been heard, EA can not only draw various diagrams (UML, E-R diagram ...). , you can also turn diagrams into SQL scripts, software documents, and code for various languages. So, curious, I hope to take this opportunity to try this refactoring. A variety of documents are written almost, followed by modeling, building a database. So, I drew the E-R diagram and successfully converted it into a database with EA. Here is a detailed introduction to you:


content How to draw e-R diagram

To sum up the E-R model is to find the entity, find the connection, assign the attribute, and eliminate the redundancy from the local model all the global model. Here need to draw E-R diagram after a few points can be noted:

1. You can draw the entity to find contact, and finally the entire system after the completion of the distribution of attributes, so that the local model to the global model is too messy.

2. Contact to find the order, we must find good, otherwise the conversion is unsuccessful.

3. When assigning attributes, you can pay attention to the order, or to the database to be replaced.


Specific Procedures

1, click Add Chart, select Entity Relationship Diagram Entity Relationship


2. Draw e-R diagram, the whole paste up a little messy, on the part of the paste:


3. Select all, right click, click Convert, select ERD to Data modeling, select Display conversion results, select folder, click Start Conversion


4. The relational schema conversion succeeds, and then the primary key, the type and value of the attribute, and the foreign key are set. Specific actions: Select a relational mode, right click, click on the properties, click on the table detail, click Columns/attributes, to set this.





5. Select all relational models, right-click, click "Code Generation"--"Generate Selected Elements", as shown in the following figure


6. OK, the SQL script conversion is successful, then the data table is OK. Below is a screenshot of the datasheet I generated:



Summary

In fact, seemingly difficult things, to understand the principle of what is simple. Next I will try to turn the class diagram directly into the code, the next blog will be introduced to you.


Related Article

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.