File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Regading terminology Schema & User Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Regading terminology Schema & User" Watch "Regading terminology Schema & User" New topic

Regading terminology Schema & User

Vivek Alampally
Ranch Hand

Joined: Jul 10, 2008
Posts: 67

I wish to know the difference between schema & user. What I know is, if a user is created, the schema -where in all the database objects are stored - is automatically created. My actual question is can a user be able to create multiple schemas? I know he can be given respective privileges to access other user' s schemas.
I feel answer for this question varies with different DBMS's. So please mention the DBMS which you are referring to, along with SQL statements

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33106

In Oracle, you need a user for each schema.

Since you asking about other databases, I'm going to move this from Oracle to JDBC. That way other databases can be discussed too.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
sowmy raj

Joined: Jan 30, 2009
Posts: 4
Barring the case of enterprise users, where users are defined outside the database and then multiple users can be assigned to a particular schema, the relationship between users and schemas is 1:1. A schema is the set of objects owned by a database user. A single database user, by definition, cannot own objects in different schemas.
I agree. Here's the link:
subject: Regading terminology Schema & User
It's not a secret anymore!