Synonym is an alias for Schema - Oracle Views, Sequences, and Synonyms

Q.  A synonym is an alias for which object?
- Published on 19 Oct 15

a. Schema
b. Segment
c. Extents
d. Rollback Segments

ANSWER: Schema
 

    Discussion

  • Nirja Shah   -Posted on 30 Sep 15
    Extents
    - An extent is a logical unit of database storage space allocation made up of a number of contiguous data blocks.
    - One or more extents in turn make up a segment.
    - When the existing space in a segment is completely used, Oracle allocates a new extent for the segment.

    Segments
    - A segment is a set of extents that contains all the data for a specific logical storage structure within a tablespace.
    - For example, for each table, Oracle allocates one or more extents to form that table's data segment, and for each index, Oracle allocates one or more extents to form its index segment.

    Rollback Segment
    - It is a database object containing before-images of data written to the database.
    - Rollback segments are used to: Undo changes when a transaction is rolled back.
    - Ensure other transactions do not see uncommitted changes made to the database.
    - Recover the database to a consistent state in case of failures

    Schema
    - A synonym is an alias for a schema object.
    - Synonyms can provide a level of security by masking the name and owner of an object and by providing location transparency for remote objects of a distributed database.
    - Also, they are convenient to use and reduce the complexity of SQL statements for database users.
    - Synonyms allow underlying objects to be renamed or moved, where only the synonym needs to be redefined and applications based on the synonym continue to function without modification.
    - You can create both public and private synonyms.
    - A public synonym is owned by the special user group named PUBLIC and is accessible to every user in a database.
    - A private synonym is contained in the schema of a specific user and available only to the user and to grantees for the underlying object.
    - Synonyms themselves are not securable.
    - When you grant object privileges on a synonym, you are really granting privileges on the underlying object, and the synonym is acting only as an alias for the object in the GRANT statement.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)