Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Tablespaces and multi user environment
On Tue, 25 May 1999 13:20:46 -0700, "Filip Hanik"
<fhanik_at_digitalworkforce.net> wrote:
>I'm pretty new to Oracle and I'm trying to figure out the concept
>tablespaces and users' default tablespace.
>If two users have two different tablespaces in the same database, are they
>not sharing the same database schema?
With Oracle, each user gets their own default schema. The schema name matches the user name. Users are allowed to access objects in other schemas, but the respective schema owners need to grant permission first. Thus, I can't see Fred's address table until Fred issues a GRANT SELECT ON address TO jonathan.
Tablespaces control where on disk an object is stored. When you create a table, you tell oracle to store it in a "tablespace". Each tablespace will have one or more datafiles associated with it. All objects stored in the tabelspace go into those datafiles. You can have a many-to-many between objects and datafiles. Tablespaces allow that to happen.
Default tablespaces simply control where a user's objects go if one is created with out specifying a tablespace. If my default tablespace is user_data, then the following table will go there:
create table x (y number);
I can make it go somewhere else by writing the command like this:
create table x (y number) tablespace x;
Hope this helps.
Jonathan Gennick Received on Wed May 26 1999 - 14:58:39 CDT
![]() |
![]() |