Ch 3 Synonym.

Slides:



Advertisements
Similar presentations
9 Creating and Managing Tables. Objectives After completing this lesson, you should be able to do the following: Describe the main database objects Create.
Advertisements

Data Definition Language (DDL)
Copyright  Oracle Corporation, All rights reserved. 10 Creating and Managing Tables.
11-1 Copyright © Oracle Corporation, All rights reserved. Different type of keys.
10 Copyright © 2004, Oracle. All rights reserved. Creating Other Schema Objects.
Copyright س Oracle Corporation, All rights reserved. 13 Other Database Objects.
Oracle Developer Tools for Visual Studio.NET Curtis Rempe.
Getting Started with Oracle11g Abeer bin humaid. Create database user You should create at least one database user that you will use to create database.
Chapter 6 Additional Database Objects
Copyright س Oracle Corporation, All rights reserved. 14 Controlling User Access.
13 Other Database Objects Important Legal Notice:  Materials on this lecture are from a book titled “Oracle Education” by Kochhar, Gravina, and Nathan.
Objectives After completing this lesson, you should be able to do the following: Categorize the main database objects Review the table structure List.
Copyright © 2004, Oracle. All rights reserved. Lecture 3: Creating Other Schema Objects Lecture 3: Creating Other Schema Objects ORACLE.
12 Copyright © Oracle Corporation, All rights reserved. Other Database Objects.
11 Copyright © 2007, Oracle. All rights reserved. Creating Other Schema Objects.
1 Copyright © 2004, Oracle. All rights reserved. Introduction.
Controlling User Access. Objectives After completing this lesson, you should be able to do the following: Create users Create roles to ease setup and.
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
What is a schema ? Schema is a collection of Database Objects. Schema Objects are logical structures created by users to contain, or reference, their data.
10 Creating and Managing Tables Objectives At the end of this lesson, you will be able to: Describe the main database objects Create tables Describe.
11 Copyright © Oracle Corporation, All rights reserved. Creating Views.
10-1 Copyright  Oracle Corporation, All rights reserved. Database Objects ObjectDescription TableBasic unit of storage; composed of rows and columns.
9 Copyright © Oracle Corporation, All rights reserved. Creating and Managing Tables.
Copyright  Oracle Corporation, All rights reserved. 10 Creating and Managing Tables.
Controlling User Access Fresher Learning Program January, 2012.
Controlling User Access. 2 home back first prev next last What Will I Learn? Compare the difference between object privileges and system privileges Construct.
© 2009 Punjab University College of Information Technology (PUCIT) September 8, 2009 Slide 1 (SQL) Other Database Objects Asif Sohail University of the.
9 Copyright © Oracle Corporation, All rights reserved. Creating and Managing Tables.
SQL CREATING AND MANAGING TABLES lecture4 1. Database Objects ObjectDescription TableBasic unit of storage; composed of rows and columns ViewLogically.
Copyright  Oracle Corporation, All rights reserved. 12 Creating Views.
Chapter 4 Indexes. Indexes Logically represents subsets of data from one or more tables View Generates numeric valuesSequence Basic unit of storage; composed.
Transactions, Roles & Privileges Oracle and ANSI Standard SQL Lecture 11.
Altering Tables and Constraints Database Systems Objectives Add and modify columns. Add, enable, disable, or remove constraints. Drop a table. Remove.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
Creating and Managing Tables 14. ObjectivesObjectives After completing this lesson, you should be able to do the following: After completing this lesson,
13 Copyright © Oracle Corporation, All rights reserved. Controlling User Access.
Database Security. Multi-user database systems like Oracle include security to control how the database is accessed and used for example security Mechanisms:
Copyright س Oracle Corporation, All rights reserved. 12 Creating Views.
1 Copyright © 2009, Oracle. All rights reserved. Controlling User Access.
Understand Data Definition Language (DDL) Database Administration Fundamentals LESSON 1.4.
Copyright  Oracle Corporation, All rights reserved. 14 Controlling User Access.
Controlling User Access
Controlling User Access
Table spaces.
Controlling User Access
Objectives User access Create users Create roles
TABLES AND INDEXES Ashima Wadhwa.
Controlling User Access
Managing Privileges.
IS221: Database Management
SQL Creating and Managing Tables
Database Security.
Creating Other Schema Objects
Database Security.
Other Database Objects
OER- UNIT 3 Authorization
SQL Creating and Managing Tables
Creating Other Schema Objects
SQL Creating and Managing Tables
Chapter 5 Sequences.
Ch 3 Synonym.
Chapter 4 Indexes.
CH 4 Indexes.
Chapter 2 Views.
CH 4 Indexes.
Chapter 2 Views.
Ch 3 Synonym.
IST 318 Database Administration
Chapter 3 Synonym.
Other Database Objects
Presentation transcript:

Ch 3 Synonym

Synonyms Object Description Table Basic unit of storage; composed of rows View Logically represents subsets of data from one or more tables Sequence Generates numeric values Index Improves the performance of some queries Synonym Gives alternative names to objects Oracle Database 11g: SQL Fundamentals I 11 - 2

Creating a Synonym for an Object Simplify access to objects by creating a synonym (another name for an object). With synonyms, you can: Create an easier reference to a table that is owned by another user Shorten lengthy object names PUBLIC Creates a synonym that is accessible to all users synonym Is the name of the synonym to be created object Identifies the object for which the synonym is created CREATE [PUBLIC] SYNONYM synonym FOR object; Oracle Database 11g: SQL Fundamentals I 11 - 3

Creating a Synonym for an Object To refer to a table that is owned by another user, you need to prefix the table name with the name of the user who created it, followed by a period. Creating a synonym eliminates the need to qualify the object name with the schema and provides you with an alternative name for a table, view, sequence, procedure, or other objects. This method can be especially useful with lengthy object names, such as views.

Creating and Removing Synonyms Create a shortened name for the DEPT_SUM_VU view: Drop a synonym: CREATE SYNONYM d_sum FOR dept_sum_vu; DROP SYNONYM d_sum; Oracle Database 11g: SQL Fundamentals I 11 - 5

Creating and Removing Synonyms The database administrator can create a public synonym that is accessible to all users. The following example creates a public synonym named DEPT for Alice’s DEPARTMENTS table: CREATE PUBLIC SYNONYM dept FOR alice.departments;

Removing Synonyms To remove a synonym, use the DROP SYNONYM statement. Only the database administrator can drop a public synonym. DROP PUBLIC SYNONYM dept;

Home work An evaluation about this chapter will be held in the lab next Sunday