aspose file tools*
The moose likes JDBC and the fly likes tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "tables" Watch "tables" New topic
Author

tables

Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
hi,
I am not clear about this concept.
30 students have access to the same database (oracle), with different userid and password. We create our own tables. If two of us create a table using the same name, what happens? it is overlapped? How to differ these tables with the same name in the system?
Thanks
Bjarki Holm
Author
Ranch Hand

Joined: May 25, 2001
Posts: 65
Simon,
if each of the users has its own database schema (with a special username and password), there will be no conflicts in table names. When you create a table logged on as user SOMEUSER in Oracle, the statement
<code>
CREATE TABLE SOMETABLE (
...
);
</code>
will actually be translated as
<code>
CREATE TABLE SOMEUSER.SOMETABLE (
...
);
</code>
but as you are already logged on as SOMEUSER, you may omit the user prefix.
So, as long as everyone is creating tables in his own schema, no conflicts should occur.
Cheers,
------------------
Bjarki Holm
Author of Professional Java Data
[This message has been edited by Bjarki Holm (edited June 12, 2001).]


Bjarki Holm
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: tables