Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Users vs. Schemas

Re: Users vs. Schemas

From: Serge Rielau <srielau_at_ca.ibm.com>
Date: Thu, 28 Jun 2007 10:31:30 -0400
Message-ID: <5ehv1rF38v50aU1@mid.individual.net>


Mark D Powell wrote:
> For explaining the differences between a USER and a SCHEMA to a
> developer looking at the CREATE USER and CREATE SCHEMA command results
> is a good idea.
>
> But is there a consensus of how best to describe PUBLIC?
If one takes a step back, or a couple, things come into focus: Conceptually schemas and users are unrelated beyond the generic concept of object ownership, which is a property to most objects (such as tables).
A schema is best described as a "directory" in a file system A user is, well, a user.
When you log onto a Unix file system your home directory typically has the name as your login name.
That doesn't mean that you can't own other directories. It doesn't mean that all directories must be owned by a regular user. E.g. they could be owned by root/...
You can also "CD" to another directory which is not your own and make that your default directory without changing users.

Thus the relationship between users and schemas in SQL is n-m.

Now you can bring it back to a specific implementation. In this case Oracle where the mapping between user and schema is 1-0..1. Hence the confusion. It's like the relationship between mass (gram) and force (N).

Cheers
Serge

-- 
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Received on Thu Jun 28 2007 - 09:31:30 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US