Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Oracle Schema Components

Oracle Database Tips by Donald Burleson

Question:

This may be a very dummy question, but I'm new to Oracle (I'm used to MySQL / PostgreSQL, an others) but Oracle Users / Tablespaces are just driving me crazy.

I have two WEB applications.  They have some tables with the same names (t_adm_user, t_adm_crashreport, etc). I connect to an Oracle database (only one instance if I'm understanding well the concepts) with two different users.

When I run the first app (connecting as CDI_USER), the framework I use (Hibernate) creates the tables for the first app (Including the tables with common names) and then, when I run the second app (connecting as ONT_USER) the framework creates the tables for the second app but tells me that tables with common names are already created.

I would like to be able to have to two different "schemas or namespaces" (Here is where Oracle terminology gets me confused) for each app, so no matter if they have some tables with common names, they don't get shared. Is there any way?

Answer:

It's fairly easy to remember the relationships between Oracle schema components once you can visualize the architecture.  Here are some simple concepts:
 

  • A "database" component can be thought-of as a set of xxx.dbf files
     

  • An "instance" component is a running set of programs that read the .dbf files (Oracle RAC allows many instances to connect to the database).
     

  • An "object" components is a table, index, cluster table, &c
     

  • The "user" component creates objects as the "schema owner" of those objects.
     

  • The "synonym" component allows you to "alias" an object to make the schema owner hidden:

    create synonym food for cat.food;
     

  • With "public synonym" components, the table owner name ("the user ID") is kept inside the synonym definition and appended to the table name at runtime to remove duplicates:

    create public synonym food for cat.food;
     

  • Here are details on Oracle File & Tablespace Management
     

Within a database we have schemas, each owned by a specific user_id. Hence, we can think of a USER and a OWNER as the same in the sense that a schema owner is a single, distinct user ID:

           schema_owner = user_id

Also, we can refer to tables with their "fully-qualified" names, where we include the schema owner. Here we see two tables named "food", one created by the user "cat" and the other schema owner "dog":
 

   select stuff from cat.food;
  union
 select stuff from dog.food;

 

Finally, Oracle has Optimal Flexible Architecture (OFA) naming conventions for all Oracle schema components including data files, tablespaces, users (schema owners), tables, and so on.

If you like Oracle tuning, you may enjoy my new book "Oracle Tuning: The Definitive Reference", over 900 pages of BC's favorite tuning tips & scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.