views:

79

answers:

1

Hi,

I need some help with vocabulary, I don't use Oracle that often but I am familiar with MySQL and SQL Server.

I have an application I need to upgrade and migrate, and part of the procedure to do that involves exporting to an XML file, allowing the installer to create new database tables, then import to the new database tables from the XML file.

In Oracle, my database connection specifies a username, password, and an SID.

Let's call the SID, "COMPANY-APPS". This SID contains tables belonging to several applications, each of which connects with a different user ( "WIKIUSER", "BUGUSER", "TIMETRACKERUSER" ).

My question is: Can I re-use the same user to create the new tables ( with the same names ).

In MySQL or SQL Server, I would create a new database and grant my user privileges to create tables in it.

OR, do I need to create a new database user for my upgraded tables?

+2  A: 

The word you are looking for is Schema in Oracle. When you create a user they have a schema associated with them, so if I created the user 'Tim' and a table called 'data' then it can be found globally (in that database) as Tim.data

Gandalf
A quick follow-up question, am I able to specify schema in my connection ( Resource ) settings? It sounds like I need new users created.
jeph perro
Your default schema for your connection will be the one associated with the username you specify in the connection string. But if that user has access rights to another schema then you can do actions on it by prefixing the schema name (like Tim.data even if your user is Bob)
Gandalf
To add to Gandalf's comment, you can do an ALTER SESSION SET CURRENT_SCHEMA=.... to use that as the default schema. However you generally don't have permission to create a table (or other object) in a schema other than the one you log on to. SCHEMA and USER have a lot of overlap in Oracle.
Gary