The most basic of Oracle database data objects are tables and views, and others are constraints, sequences, functions, stored procedures, packages, triggers, and so on. The operation of the database can be basically attributed to the operation of the data objects, understanding and mastering the Oracle database objects is the shortest way to learn Oracle.
Schema:
- A collection of objects in a database is called the schema, and its name is the same as the user name that owns the objects.
---such as the SYS user and the table below it are collectively referred to as a schema
Table-Segment (segment):
- as long as the object that occupies the actual space is the segment object
- A segment is the name of the storage method, and the table is the logical name, and the segment is the physical property hidden behind the table
- Segment→extend→block→data file
Table-Partition (partition):
- Multiple partitioning of table data does not make database processing faster
- Create a partitioned table
1 Create TableK_part<Idint>2Partition byRange<Id>3 <
Partition P1ValuesLess than<5>,4Partition P2ValuesLess than<Ten>,5Partiton PmaxValuesLess than<MaxValue>6 >
Index
- Purpose----to speed up access to data
- Disadvantage----occupy additional space, affecting DML operational efficiency
- By the way data is organized into
- B-tree B-Tree index (uniqueness, less repetitive data is more efficient)
- Bitmap Bitmap Index
View:
- The view allows DML operations, but requires specific conditions to be met
- Materialized view: Save the result set of the query for subsequent queries, improve the query efficiency, and the normal view is different, materialized view is a segment object, occupies only the physical space
- Improve query efficiency
- Data replication
Package-package:
- managing functions, placing stored procedures
Sequence
- Provide a serial number for your business
- Features: Uniqueness, no guarantee of continuity;
Synonyms:
- Provides an alias for an object
- Makes it easy to make references to objects under different users
Database Link:
- For data access and operations between databases
- Transactional access and operation of databases guaranteed by Oracle
Tablespace-The Logical storage object:
- Logically: You can place an object (table: Index, Partition ...). )
- Physically: Table space-segment--extent--block--data file
Oracle database Objects