java 什么是休眠注释类中使用的“目录”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5246949/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 10:12:50  来源:igfitidea点击:

what is "catalog" used in hibernate annotated class

javadatabasehibernatecatalog

提问by

in java class i have seen

在我见过的java类中

@Table(name="user" , catalog="users"

for what purpose it is used

用于什么目的

采纳答案by Nilesh

From Wikipedia:

来自维基百科

The database catalogof a database instance consists of metadata in which definitions of database objects such as base tables, views (virtual tables), synonyms, value ranges, indexes, users, and user groups are stored.

数据库实例的数据库目录由元数据组成,其中存储了诸如基表、视图(虚拟表)、同义词、值范围、索引、用户和用户组等数据库对象的定义。

Also, if your DB is MySQL, check this.

另外,如果您的数据库是 MySQL,请检查此内容。

Hope that helps.

希望有帮助。

回答by Daniel

Databases have different methods (or names for the same methods :) to organize its tables.

数据库有不同的方法(或相同方法的名称:) 来组织其表。

Some database place all tables in a different "schema", some in different "catalogs". In the attribute you can specify this.

一些数据库将所有表放在不同的“模式”中,有些放在不同的“目录”中。在属性中,您可以指定此项。

回答by Robby Pond

That's from the JPA @Tableannotation.

这是来自 JPA @Table注释。