Re: PO7 question about tables with same name

From: Dan Clamage <clamage_at_mime.dw.lucent.com>
Date: 1997/11/21
Message-ID: <01bcf688$52ba0880$54110b87_at_clamagent>#1/1


> Does the fact that
> these tables are created/imported by different users keep them
> identified as unique? Should separate tablespaces be created?
You've struck upon the right answer regarding different users.

Each user is the owner of whatever database objects they create. Call this the "schema". Given the proper privileges, multiple users could create tables of the same name in the same tablespace because each table is in a separate schema.

All database objects are referenced in the one collective data dictionary. Oracle provides different views into the data dictionary:

user_* : Just those objects you created (own), e.g. user_tables;
all_*  : Objects you own plus any other owners have granted you access to;
dba_*  : All objects in the data dictionary, separated by owner

It is customary to have a set of separate tablespaces for each schema, although certainly not a requirement. This is just so people/applications don't litter up each others space. Separate tablespaces on separate physical disks can provide improved disk performance because reads can be done in parallel. Some folks "stripe" a very large table across multiple disks to boost performance, by creating additional files for the one tablespace on separate disks.

application ---> schema ---> tablespace ---> data file (disk1)

             |
             +-> schema ---> tablespace ---> data file (disk2)
                         |
                         +-> tablespace ---> data file (disk3)
                                         |
                                         +-> data file (disk3)

A single application may make use of multiple schemas; each schema may in turn consist of multiple tablespaces (e.g., one for tables, one for indexes); each
tablespace in turn might consist of multiple files, perhaps on same or different disks.

I hope this becomes very clear to you. Your success as an Oracle developer depends on it!

-djc Received on Fri Nov 21 1997 - 00:00:00 CET

Original text of this message