What is "catalog" used in a hibernate annotated class? [duplicate]
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.
精彩评论