Hibernate中的SchemaUpdate和SchemaExport之间的区别 [英] Difference between SchemaUpdate and SchemaExport in Hibernate

查看:59
本文介绍了Hibernate中的SchemaUpdate和SchemaExport之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hibernate中的SchemaUpdate和SchemaExport有什么区别.

What is the difference between SchemaUpdate and SchemaExport in Hibernate.

SchemaUpdate

SchemaExport

推荐答案

SchemaExport (又名hbm2ddl)是一种从Hibernate映射生成数据库架构(全部而非部分)的工具.SchemaExport需要知道方言,但不会查询现有数据库.然后可以执行生成的DDL语句和/或将其保存到文件和/或打印机中,以进行标准输出.

SchemaExport (aka hbm2ddl) is tool that generates database schema (whole, not partial) from Hibernate mappings. SchemaExport needs to aware of dialect, but it does not consult existing database. Generated DDL statements can then be executed and/or saved to file and/or printer to standard out.

SchemaUpdate 更新现有架构.在某种程度上,它弄清楚了应该执行哪个DDL语句以使现有数据库与修改后的Hibernate映射相匹配.

SchemaUpdate updates existing schema. To some extent it figures out which DDL statement should be executed to make existing database match to modified Hibernate mappings.

更多详细信息的好来源是休眠核心参考手册-第22章.工具集指南.

Good source for more detailed information is Hibernate Core Reference Manual - Chapter 22. Toolset Guide.

这篇关于Hibernate中的SchemaUpdate和SchemaExport之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆