Programing In 24 Horas

Páginas: 2 (319 palabras) Publicado: 18 de junio de 2012
What Is a Schema? 43
There are, in Figure 3.1, two user accounts in the database that own tables: USER1
and USER2. Each user account has its own schema. Some examples for how thetwo
users can access their own tables and tables owned by the other user follow:
USER1 accesses own TABLE1: TABLE1
USER1 accesses own TEST: TEST
USER1 accesses USER2’s TABLE10:USER2.TABLE10
USER1 accesses USER2’s TEST: USER2.TEST
USER1
test
table1
table2
USER2
test
table10
table20
Schema Owners
DATABASE
Schema Objects
(Tables)
FIGURE 3.1
Schemas ina
database.
In this example, both users have a table called TEST. Tables can have the same
names in a database as long as they belong to different schemas. If you look at it
thisway, table names are always unique in a database because the schema owner is
actually part of the table name. For instance, USER1.TEST is a different table than
USER2.TEST. If you donot specify a schema with the table name when accessing
tables in a database, the database server looks for a table that you own by default.
That is, if USER1 tries to access TEST,the database server looks for a USER1-owned
table named TEST before it looks for other objects owned by USER1, such as synonyms
to tables in another schema. Hour 21, “Working withthe System Catalog,”
helps you fully understand how synonyms work. You must be careful to understand
the distinction between objects in your own schema and those objects in anotherschema. If you do not provide a schema when performing operations that alter the
table, such as a DROP command, the database will assume that you mean a table in
your own schema. Thiscould possibly lead to you unintentionally dropping the
wrong object. So you must always pay careful attention as to which user you are
currently logged into the database with.
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Hora 1 Uml 24 Horas
  • 24 horas en la vida de una mujer
  • 24 horas en la vida de un amujer
  • La noche en 24 horas
  • GLUCOSURIA DE 24 HORA
  • 24 Horas en la vida de una mujer
  • agua las 24 horas del dia
  • Empresa 24 Horas

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS