Improve database Schema

Source: Internet
Author: User
Tags dba

This address: http://blog.csdn.net/sushengmiyan/article/details/50422102

This paper mattered meters along

Hibernate reads The mapping metadata for your Java model class. and generates SCHEMADDL statements. You can export them to a text file, or execute them directly in the database when you inherit the test execution. Because most database schema languages have product features. What you need to keep in mind is every option you add to the mapping metadata has the potential to bind to a specific database.

hibernate  give your tables and constraints yourself to create the main schema hibernate don't create it yourself. schema features.

This includes features of all advanced database product features and other physical storage data, such as tablespace. in addition. Your DBA will often add additional schema statements to improve your schema. DBAs should be involved early and determine hibernate 's own active schema. never agree to build yourself without checking. Schema deploy to the product.

Assume that your product development steps agree. DBA The changes you make can be fed back to the JAVA system, add mapping metadata. In many projects, mapping metadata can contain The necessary schema changes for all DBA changes .

Hibernate will then be able to proactively generate the last schema for all products , including gaze, constraint, index, and so on.

In the next section, we show you how to define the generated schema and how to add a free database schema component, and we discuss our own defined data types. Additional consistency rules. Index, and how to replace hibernate 's own schemathat was actively generated.

Export the schema base file to a file

Hibernate binds the org.hibernate.tool.hbm2ddl,schemaexport class to the Main method main (), You can execute from the command line. This helper is capable of directly working with your database session and creating schema or writing a text file so that your DBA can perform its own definition optimization improvements.

Improve database Schema

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.