Monday, July 15, 2013

Did you know this? Object Names in Oracle

Hard and fast rule in any environment, no two objects can have the same name in the same session or schema. But we also know about procedure overloading where we have same procedure names but different signatures.

The point I wanted to make here was that in Oracle for the below example
employees
emPlOyeeS
Employees
EMPLOYEES
an object with the above name would be treated the same in a particular schema, Oracle reads all objects converted to uppercase and in this example it would be EMPLOYEE. As we know only one object with the name EMPLOYEE can exist in one particular schema. But there is a clause to it, by enclosing object names in double quotation marks we can give the following names to different object names in the same namespace
employees
"emPlOyeeS"
"Employees"
"EMPLOYEES"

You would see the below snippet from Oracle documentation for further knowledge on naming. Source :http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements008.htm
The following schema objects share one namespace:
  • Tables
  • Views
  • Sequences
  • Private synonyms
  • Stand-alone procedures
  • Stand-alone stored functions
  • Packages
  • Materialized views
  • User-defined types
Each of the following schema objects has its own namespace:
  • Indexes
  • Constraints
  • Clusters
  • Database triggers
  • Private database links
  • Dimensions
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.
Each of the following nonschema objects also has its own namespace:
  • User roles
  • Public synonyms
  • Public database links
  • Tablespaces
  • Profiles
  • Parameter files (PFILEs) and server parameter files (SPFILEs)
Because the objects in these namespaces are not contained in schemas, these namespaces span the entire database.

No comments:

Post a Comment

Please add your valuable comments and also questions that would make me write a post for you.

Search This Blog

Labels

oracle oracle applications 11i 12.1 PLSQL SQL database index r12 12 API HRMS PL application r12.1.3 table whitepaper AR DOCUMENT_CATEGORY Database Options Oracle Application Setup Packages Sequences Stand-alone System Profile Options Tables Tuning User-defined types Views autoinvoice compatibility concurrent developer document documents of record download impact import increase issue lookup manager master object names oracle workflow performance receivables script technology windows workflow APP-PAY-06841 ATG BI BLOB DBMS_LOB DFF DIRECTORY Dynamic FND FNDLOAD HR_CHANGE_START_DATE_API IN IN OUT Jdeveloper 11g KFF MIME Materialized views OA Framework OAF ORACLE_LOADER OUT Private synonyms Problem Problem Statement SQL*LOADER SSHR Starters Tutorial WebService XP ad_dd administrator all all workflows amateur architecture assi assignment attachments breadth first search builder category change client column columns compression consideration create create_shared_type custom flexfield cyclic graph data flow data structure data structures depth first search employee external tables field file flex flex field flexfield fnd_irep_classes fnd_irep_function_flavors fnd_lookup_types_pkg fnd_lookup_values_pkg functionality graph image infrastructure insert_row integrated SOA gateway invisible indexes irep jdev jdeveloper key key flexfield keywords latest start date list list of APIs load logging mandatory metalink node noob operating system operational BI package package maximum length parameters patch per_shared_types_api person procedures query queue quick start record registering registration reserved results solution stack standalone start date subcategory technical traverse traversing a graph type update_start_date upload values vertex view vista wf wf_local_roles windows 7

Total Pageviews