what is “catalog” used in hibernate annotated class [duplicate]

北战南征 提交于 2019-12-12 08:21:49

问题


in java class i have seen

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

for what purpose it is used


回答1:


From Wikipedia:

The database catalog of 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.

Hope that helps.




回答2:


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.




回答3:


That's from the JPA @Table annotation.



来源:https://stackoverflow.com/questions/5246949/what-is-catalog-used-in-hibernate-annotated-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!