• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Schema and Catalogue - Difference?

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys,

What is the difference between using these two as attributes for the @Table Annotation?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not a DB pro, but I'd say that a catalog represents things (like tables) as a whole, whereas a schema represents things per user. So if you have a table MYTABLE in catalog MYCATALOG, you'll see different things in MYCATALOG whether you are using schema USERONE or schema USERTWO. In SQL, I think that you can explicitly say :
SELECT * FROM USERONE.MYTABLE
SELECT * FROM USERTWO.MYTABLE

SELECT * FROM MYTABLE will return records depending on the schema being used.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic