21

In a Java class I have seen the following:

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

For what purpose it is used?

Lii
  • 11,553
  • 8
  • 64
  • 88

3 Answers3

7

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.

Pang
  • 9,564
  • 146
  • 81
  • 122
Nilesh
  • 4,137
  • 6
  • 39
  • 53
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.

Daniel
  • 27,718
  • 20
  • 89
  • 133
0

That's from the JPA @Table annotation.

Robby Pond
  • 73,164
  • 16
  • 126
  • 119