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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Tablespaces and multi user environment

Re: Tablespaces and multi user environment

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Wed, 26 May 1999 19:58:39 GMT
Message-ID: <37544f1a.22459099@netnews.worldnet.att.net>


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

Original text of this message

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