search
HomeDatabaseOracleWhat are the oracle objects?

What are the oracle objects?

Feb 24, 2022 pm 06:36 PM
oracleobject

Oracle objects include: 1. Table; 2. Index; 3. Cluster; 4. View; 5. Synonym; 6. Sequence; 7. Process ( Procedure) and function; 8. Triggers; 9. Constraints, etc.

What are the oracle objects?

The operating environment of this tutorial: Windows 7 system, Oracle 11g version, Dell G3 computer.

What are Oracle’s database objects:

The function of the database is to organize, manage and store various database objects. The objects in the database are the basis for our data management. This article will review some basic knowledge of database objects to give us a clearer understanding of these Oracle database objects.

1. Table:

When we operate the database, most of it is done by operating tables. Table is a logical concept and the basic unit for database organization and management of data.

Tables can be divided into relational tables and object tables. Relational tables include heap tables, index-organized tables, and external tables. What we commonly use is a heap table.

The segments corresponding to the heap table are stored in the form of a heap structure, and the stored data is logically out of order.

The corresponding relationship between tables and segments is as follows

For non-partitioned tables, one table corresponds to one segment;

For partitioned tables, one partition corresponds to one segment;

For tables with sub-partitions, one sub-partition corresponds to one segment;

Other database objects are similar to this

1.1 Table partition
Table partition (Partition), According to the user's data situation and business needs, the data in the table is stored in multiple segments from one segment to facilitate the management and maintenance of user data and improve the performance of query operations. Of course, there are also some shortcomings. If used improperly, some performance problems will occur; applying partition tables requires more experience and more comprehensive considerations, which also puts forward higher requirements for developers.

When to apply partitioning:

The first thing to consider is the amount of data. Partitioning is necessary only if the amount of data is large enough. Partitioning is not necessary for a small amount of data. Oracle officially recommends that when the storage space occupied by the table exceeds 2GB, you can consider partitioning the table. Generally speaking, try to avoid partitioning, and there must be a good reason for partitioning.
If the current non-partitioned table has affected the user's management and maintenance of data, partitioning can be considered.
Whether the user's query and operation performance can be improved after partitioning.
Regarding how to partition, we will continue to analyze it in the following articles.

2. Index:

The index is a logical object built on the table. Indexes can improve the efficiency of table data access and query, and play a great role in performance optimization. The index is also associated with one or more segments, and the final storage location of the index is also a segment. Different types of indexes have different storage logical structures, such as B-tree, Bitmap, etc.

Indexes are optional for tables, and creating appropriate indexes is the top priority of database optimization. However, indexes can improve query efficiency, but also reduce the efficiency of DML operations. Only when the two are taken into consideration will better performance be achieved.

Regarding index database optimization solutions, most of them are to avoid index failure, optimize the order of index use, etc. Indexes such as B* tree index and bitmap index will be discussed in detail in subsequent articles.

3. Cluster:

A cluster is a database object that contains data from one or more tables. The included tables All have one or more columns in common, these columns are called cluster key columns.

Creating a cluster requires corresponding permissions and is rarely used in development. Clusters can be divided into index clusters and hash clusters. The difference is that when searching for data, the former uses the index on the cluster key column, while the latter uses the hash value of the cluster key column. Which type to use depends on the usage scenario.

4. View (View) & Materialized View (Materialized View):

View is a virtual defined logical object, mainly used To simplify business logic and facilitate development and maintenance, the view does not contain any data, and its data is based on other objects corresponding to the view.

The view can provide some operations of adding, deleting, modifying and checking, and at the same time it has a certain degree of security. It can block some columns and is more flexible to use. But there will be some impact on performance.

Materialized views, compared to views, materialized views can actually store data and correspond to related segments like tables.

Materialized views can be used for summary, calculation and other services. At the same time, additions, deletions, modifications, and searches can also be performed under certain conditions, and indexes can also be established.

5. Synonym:

The synonym is also a virtual logical object and does not store any data. Essentially it is an alias for other data objects. At the same time, the permissions of synonyms can be assigned to different users as a way of security management.

6. Sequence:

The sequence does not store any data, and the user can obtain a series of ordered values ​​through the sequence.

When defining a sequence, you can define the sequence name, ascending and descending order, step size, etc. If the load concurrency is high, the growth of the sequence will affect the overall performance.

7. Procedure & Function:

Procedures and functions are virtual logical objects and do not store data. The main function is to use database-encoded calls to perform a series of tasks.

Processes and functions are objects in the database, consisting of a set of SQL or some other PL statements. A unit written to solve a specific problem.

The difference is that the function has a return value. Except for this, the procedure and the function are the same in other aspects.

8. Trigger:

The trigger is also a logical object of the database and does not store data. Mainly through database coding, a set of commands are executed when the event is automatically triggered.

The execution process is automatic. When an event triggers relevant conditions, it will be executed.

9. Constraint:

Constraints are logical objects in the database, and their functions are determined through some internal or automatic logic. Implement inspection and restriction of data to make it comply with certain rules or standards. This enables the regularization and standardization of data.

Common constraints include

  • Primary key constraint

  • Unique constraint

  • ## Non-null constraints

  • Foreign key constraints

  • Custom constraints (check constraints)

Recommended Tutorial: "

Oracle Tutorial"

The above is the detailed content of What are the oracle objects?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Oracle Software: From Databases to the CloudOracle Software: From Databases to the CloudApr 15, 2025 am 12:09 AM

The development history of Oracle software from database to cloud computing includes: 1. Originated in 1977, it initially focused on relational database management system (RDBMS), and quickly became the first choice for enterprise-level applications; 2. Expand to middleware, development tools and ERP systems to form a complete set of enterprise solutions; 3. Oracle database supports SQL, providing high performance and scalability, suitable for small to large enterprise systems; 4. The rise of cloud computing services further expands Oracle's product line to meet all aspects of enterprise IT needs.

MySQL vs. Oracle: The Pros and ConsMySQL vs. Oracle: The Pros and ConsApr 14, 2025 am 12:01 AM

MySQL and Oracle selection should be based on cost, performance, complexity and functional requirements: 1. MySQL is suitable for projects with limited budgets, is simple to install, and is suitable for small to medium-sized applications. 2. Oracle is suitable for large enterprises and performs excellently in handling large-scale data and high concurrent requests, but is costly and complex in configuration.

Oracle's Purpose: Business Solutions and Data ManagementOracle's Purpose: Business Solutions and Data ManagementApr 13, 2025 am 12:02 AM

Oracle helps businesses achieve digital transformation and data management through its products and services. 1) Oracle provides a comprehensive product portfolio, including database management systems, ERP and CRM systems, helping enterprises automate and optimize business processes. 2) Oracle's ERP systems such as E-BusinessSuite and FusionApplications realize end-to-end business process automation, improve efficiency and reduce costs, but have high implementation and maintenance costs. 3) OracleDatabase provides high concurrency and high availability data processing, but has high licensing costs. 4) Performance optimization and best practices include the rational use of indexing and partitioning technology, regular database maintenance and compliance with coding specifications.

How to delete oracle library failureHow to delete oracle library failureApr 12, 2025 am 06:21 AM

Steps to delete the failed database after Oracle failed to build a library: Use sys username to connect to the target instance. Use DROP DATABASE to delete the database. Query v$database to confirm that the database has been deleted.

How to create cursors in oracle loopHow to create cursors in oracle loopApr 12, 2025 am 06:18 AM

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

How to export oracle viewHow to export oracle viewApr 12, 2025 am 06:15 AM

Oracle views can be exported through the EXP utility: Log in to the Oracle database. Start the EXP utility, specifying the view name and export directory. Enter export parameters, including target mode, file format, and tablespace. Start exporting. Verify the export using the impdp utility.

How to stop oracle databaseHow to stop oracle databaseApr 12, 2025 am 06:12 AM

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

What to do if the oracle log is fullWhat to do if the oracle log is fullApr 12, 2025 am 06:09 AM

When Oracle log files are full, the following solutions can be adopted: 1) Clean old log files; 2) Increase the log file size; 3) Increase the log file group; 4) Set up automatic log management; 5) Reinitialize the database. Before implementing any solution, it is recommended to back up the database to prevent data loss.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.