1

Hi!

I'm just starting to learn about databases, oracle in general. I messed around in the Oracle SQL Developer and a very very basic question arose in my mind :)

In Oracle SQL Developer, you have to establish a connection (make a user) to connect to the database. The user then can hold tables, functions etc. Then, i can make more connections (users) to hold some other tables, functions etc.

So, here's my question: is the term 'user' the same as 'database'? Is each established connection (a user) a different database? Therefore, when it is said: "create a database connection", it means the same as "create a database"?

Thank you very much!

stensootla
  • 13,945
  • 9
  • 45
  • 68
  • Connections in SQL Developer are distinct from Users. That is, we can create several Connections for the same User; this is helpful as a way of having several different sessions for the same User. Likewise we can create Users that cannot connect because they lack the CREATE SESSION privilege. – APC Jul 13 '13 at 08:56

1 Answers1

-1

No, a user is a user and a database is also referred to as a schema. many different users can connect to the same schema (or to a different schema).

A schema contains tables, triggers, functions, procedures etc.

Nir Alfasi
  • 53,191
  • 11
  • 86
  • 129
  • In Oracle, a database can contain many users, and the term schema refers to the objects owned by a user; thus, a single database can contain many schemas. I recommend reading through the [Oracle Database Concepts](http://docs.oracle.com/cd/B28359_01/server.111/b28318/toc.htm) manual. Share and enjoy. – Bob Jarvis - Слава Україні Jul 12 '13 at 23:11
  • @BobJarvis I should rephrase: when (many) people say "database" they actually refer to a schema. That's what I meant. BTW, a schema is owned by a user but can be accessed and modified by many users. Just like files in a file-system. – Nir Alfasi Jul 12 '13 at 23:22
  • When people people say "database" meaning "schema" we know that they are familiar with MySQL or SQL Server, rather than Oracle. Users do *not* connect to a schema. Only the owner of a schema may modify its objects, unless they grant privileges on their objects to other users. Your analogy with files in a filesystem is at best misleading. – APC Jul 13 '13 at 08:52
  • @APC "Only the owner of a schema may modify its objects, unless they grant privileges on their objects to other users" - that's exactly the same with files. – Nir Alfasi Jul 13 '13 at 16:58