File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Murach's Java Servlets and JSP this week in the Servlets 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
 
jQuery in Action, 2nd edition
 
subject: tables
 
Similar Threads
How to not reinialize tables created with JPA?
Single Sign on
How to map one class to multiple similar tables with Hibernate?
mysql: how to add tables to existed db
Need help in creating a trigger