Notes:
oracle-synonyms
--By User name (schema name). Table Name
--Authorization: Grant create synonym to Test1 (authorized under System user))
-Private
Create or replace synonym sy_test1 for gcs95.test1;
-A total
Create public synonym public_sy_test1 for gcs95.test1;
/* Private: Other users cannot access */
SELECT * from Sy_test1;
/* Total: Accessible to all authorized users */
SELECT * from Public_sy_test1; --Features: block the owner of the object
Index:
Defined:
Improve query efficiency
ROWID: The physical address of the row in the database table
1> B-Tree:
It can be said that the final query is ROWID
CREATE index Stu_index on table name (column name);
2> Reverse Key index:
It is suitable for the operation of inserting data with more frequent operation, and can disperse the operations of memory.
Query when used can also improve query efficiency!
form of existence:
Assigned to the final access
102-201
123-321
Grammar:
CREATE index index_revers_empno on table name (column name) revers;
3> Bitmap Index:
cannot be created on XE version of Oracle ! Instead of storing rowid, store ROWID mappings! means no storage space !
This column can be used to create a bitmap index for a column where the data value is limited (meaning a recurring value).
Table partitioning:
Code:
1 Practical Practice:2 3 --synonyms synonym4 5 --by user name (schema name). Table name6 7 --Authorization: Grant create synonym to Test18 9 /*Private: No other user can access*/ Ten One Select * fromSy_test1; A - /*Total: Accessible to all authorized users*/ - the Select * fromPublic_sy_test1; - - --Features: The owner of the object is shielded, and the table can be accessed directly - + - + --testing: Creating Tables CREATE TABLE Depostitor ( A atActid Number not NULL, - -Cardid Number not NULL, - -LastNamevarchar2(Ten) not NULL, - inFirstNamevarchar2(Ten) not NULL, - toAddress1varchar2( $) not NULL, + -Address2varchar2( $), the *Address3varchar2( $), $ Panax NotoginsengBlance Number(Ten,2), - the constraintPk_depostorPrimary Key(Actid) + A ); the + --Add a B-Tree index - $ Create IndexCd_index onDepostitor (Cardid);Drop IndexCd_index $ - --To add a reverse key index - the Create IndexIndex_revers_empno onDepostitor (Cardid) revers;--Add test data Insert depostitor values (); - Wuyi --Select select * from Depostitor; the - --cardid Query Select * from Depostitor where cardid between 1 and 100000;
synonym Practice
Synonym and Index in Oracle