Oracle通过namespace来管理schema object的名字,什么是namespace可用通过下面的doc大致来了解:
Schema Object Namespaces
The following have their
own namespace:
• Indexes
• Constraints
• Clusters
• Database triggers
• Private database
links
• Dimensions
--=============================
The following are in the
same namespace:
• Tables
• Views
• Sequences
• Private synonyms
• Stand-alone
procedures
• Stand-alone stored
functions
• Packages
• Materialized views
• User-defined types
--===============================
Schema Object Namespaces
The Oracle database uses namespaces to resolve schema object references. When you refer to an
object in a SQL statement, Oracle considers the context of the SQL statement and locates the
object in the appropriate namespace. After locating the object, Oracle performs the operation
specified by the statement on the object. If the named object cannot be found in the appropriate
namespace, then Oracle returns an error.
Because tables and views are in the same namespace, a table and a view in the same schema
cannot have the same name. However, tables and indexes are in different namespaces. Therefore, a
table and an index in the same schema can have the same name.
Each schema in the database has its own namespaces for the objects it contains. This means, for
example, that two tables in different schemas are in different namespaces and can have the same
name.
--===============================
在11gR1之前我们是无法通过视图dba_objects来确定某一个对象究竟在哪一个namespace里,现在dba_objects中有了namespace可以很容易的知道那类对象和那类对象在同一个命名空间里,在同一个命名空间里的对象不能重名。
当然这个字段namespace最终还是来自基表obj$
浙公网安备 33010602011771号