Database Objects


You can create, edit, and delete (drop) most types of objects in an Oracle database by using the right-click menu in the Connections navigator or by clicking the Actions button in the detail pane display. For some objects, you can do other operations, as appropriate for the object type.


Note:

The actions available from right-click menus and Actions buttons depend on the Oracle Database release number for the specified database connection. If an action mentioned in the help is not available with a connection, it may be that the feature was not available in that release of Oracle Database.

Related Topics

SQL Developer Concepts and Usage

Tutorial: Creating Objects for a Small Database

Supplementary Oracle Database Information

Database Links

A database link is a database object in one database that enables you to access objects on another database. The other database need not be an Oracle Database system; however, to access non-Oracle systems you must use Oracle Heterogeneous Services. After you have created a database link, you can use it to refer to tables and views in the other database. For help with specific options in creating a database link, see Create/Edit Database Link.

You can perform the following operations on a database link by right-clicking the database link name in the Connections navigator and selecting an item from the menu:

Directories

A directory object specifies an alias for a directory (called a folder on Windows systems) on the server file system where external binary file LOBs (BFILEs) and external table data are located. To create a directory (that is, a directory object), you can use SQL Developer or the SQL statement CREATE DIRECTORY.

You can use directory names when referring to BFILEs in your PL/SQL code and OCI calls, rather than hard coding the operating system path name, for management flexibility. All directories are created in a single namespace and are not owned by an individual schema. You can secure access to the BFILEs stored within the directory structure by granting object privileges on the directories to specific users.

Functions

A function is a type of PL/SQL subprogram, which is a programming object that can be stored and executed in the database server, and called from other programming objects or applications. (Functions return a value; procedures do not return a value.) For help with specific options in creating a PL/SQL subprogram, see Create PL/SQL Function, Procedure, or Package.

You can perform the following operations on a function by right-clicking the function name in the Connections navigator and selecting an item from the menu:

Indexes

An index is a database object that contains an entry for each value that appears in the indexed column(s) of the table or cluster and provides direct, fast access to rows. Indexes are automatically created on primary key columns; however, you must create indexes on other columns to gain the benefits of indexing. For help with specific options in creating an index, see Create Index.

You can perform the following operations on an index by right-clicking the index name in the Connections navigator and selecting an item from the menu:

Materialized Views

A materialized view is a database object that contains the results of a query. The FROM clause of the query can name tables, views, and other materialized views. Collectively these objects are called master tables (a replication term) or detail tables (a data warehousing term). This reference uses "master tables" for consistency. The databases containing the master tables are called the master databases. For help with specific options in creating a materialized view, see Create/Edit View, especially the View Information or Materialized View Information tab.

Materialized View Logs

A materialized view log is a table associated with the master table of a materialized view. When DML changes are made to master table data, Oracle Database stores rows describing those changes in the materialized view log and then uses the materialized view log to refresh materialized views based on the master table. This process is called incremental or fast refresh. Without a materialized view log, Oracle Database must re-execute the materialized view query to refresh the materialized view. This process is called a complete refresh. Usually, a fast refresh takes less time than a complete refresh.

Packages

A package is an object that contains subprograms, which are programming objects that can be stored and executed in the database server, and called from other programming objects or applications. A package can contain functions or procedures, or both. For help with specific options in creating a package, see Create PL/SQL Function, Procedure, or Package.

You can perform the following operations on a package by right-clicking the package name in the Connections navigator and selecting an item from the menu:

Procedures

A procedure is a type of PL/SQL subprogram, which is a programming object that can be stored and executed in the database server, and called from other programming objects or applications. (Procedures do not return a value; functions return a value.) For help with specific options in creating a PL/SQL subprogram, see Create PL/SQL Function, Procedure, or Package.

You can perform the following operations on a procedure by right-clicking the procedure name in the Connections navigator and selecting an item from the menu:

Recycle Bin

The Recycle bin (applicable only to Oracle Database Release 10g) holds objects that have been dropped (deleted). The objects are not actually deleted until a commit operation is performed. Before the objects are actually deleted, you can "undelete" them by selecting them in the Recycle bin and selecting Undrop from the right-click menu.

You can perform the following operations on an object in the Recycle bin by right-clicking the object name in the Recycle bin in the Connections navigator and selecting an item from the menu:

Sequences

Sequences are used to generate unique integers. You can use sequences to automatically generate primary key values. For conceptual and usage information about sequences, see Managing Sequences. For help with specific options in creating and editing a sequence, see Create/Edit Sequence.

Synonyms (Public and Private)

Synonyms provide alternative names for tables, views, sequences, procedures, stored functions, packages, materialized views, Java class database objects, user-defined object types, or other synonyms. The Connections navigator has a Synonyms node for all synonyms (public and private) owned by the user associated with the specified connection, and a Public Synonyms node for all public synonyms on the database associated with the connection. For conceptual and usage information about sequences, see Managing Synonyms. For help with specific options in creating and editing a synonym, see Create/Edit Synonym.

Tables

Tables are used to hold data. Each table typically has multiple columns that describe attributes of the database entity associated with the table, and each column has an associated data type. You can choose from many table creation options and table organizations (such as partitioned tables, index-organized tables, and external tables), to meet a variety of enterprise needs. To create a table, you can do either of the following:

You can perform the following operations on a table by right-clicking the table name in the Connections navigator and selecting an item from the menu:

You can perform the following operations on a column in a table by right-clicking the column name in the Connections navigator and selecting an item from the menu:

For conceptual and usage information about tables, see Managing Tables.

Triggers

Triggers are stored PL/SQL blocks associated with a table, a schema, or the database, or anonymous PL/SQL blocks or calls to a procedure implemented in PL/SQL or Java. Oracle Database automatically executes a trigger when specified conditions occur. For conceptual and usage information about sequences, see Triggers: Usage Information. For help with specific options in creating a trigger, see Create Trigger.

Types

A data type associates a fixed set of properties with the values that can be used in a column of a table or in an argument of a procedure or function. These properties cause Oracle Database to treat values of one data type differently from values of another data type. Most data types are supplied by Oracle, although users can create data types.

For conceptual and usage information about data types, see Data Types: Usage Information. For help with specific options in creating a user-defined type, see Create Type (User-Defined).

Users (Other Users)

Database users are accounts through which you can log in to the database. In the Connections navigator, you can see the Other Users in the database associated with a connection, but the database objects that you are allowed to see for each user are determined by the privileges of the database user associated with the current database connection.

Views

Views are virtual tables (analogous to queries in some database products) that select data from one or more underlying tables. Oracle Database provides many view creation options and specialized types of views (such as materialized views, described in Materialized Views), to meet a variety of enterprise needs. For conceptual and usage information about views, see Managing Views. For help with specific options in creating and editing a view, see Create/Edit View.

You can perform the following operations on a view by right-clicking the view name in the Connections navigator and selecting an item from the menu: