开发者

What is "catalog" used in a hibernate annotated class? [duplicate]

This question already has an answer here: What are the JPA @Table annotation "catalog" and "schema" variables used for? (1 answer) Closed 4 years ago.

In开发者_C百科 a Java class I have seen the following:

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

For what purpose it is used?


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.


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.


That's from the JPA @Table annotation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜