Oracle Enterprise 8.0.5 produced by ORACLE won the favor of many users for its superior performance,
It provides developers with a wide range of embedded functions, PL/SQL support, multi-platform, Application Server integration, etc.
Great flexibility.
In ORACLE user permission allocation, only Insert, Update, and,
Select, Delete, Execute, and other operations. Field-level permission settings are not provided.
Although permission setting brings security benefits, it has a certain impact on performance.
MIS system, data sharding is inevitable.
Generally, a typical MIS database platform is designed as follows:
User Permissions are assigned through the temporary ORACLE system table:
1. Create related fields in the table (CUSTOMER) to be sharded, such as SGRANT_NUM number (20) and Department SUNIT_ID varchar (10 ),
2. Create a dynamic view of the table CUSTOMER_PV
Select * from CUSTOMER
Where CD_WAREHOUSE.SUNIT_ID is null
Or exists (
Select * from customer B where A. SUNIT_ID = B. SUNIT_ID
And (B. SGRANT_NUM> = TO_NUMBER (SUBSTR (USERENV ('client _ info'), 1, 10 ))
And (B. SGRANT_NUM <= TO_NUMBER (SUBSTR (USERENV ('client _ info'), 11, 10 ))))
3. Modify the part number in client_info when a user logs on to the system;
4. In this way, there is no sharding problem for the designer. For the end user, you can define the part number of the user's organization to restrict the data that the user can access.
Advantages:
1. automatically completed by the server without any impact on the design;
2. fast speed, with no significant impact on massive data volumes;
Disadvantages:
1. Vertical sharding can only be performed based on the organization or others, which is not flexible enough;
2. complicated technical implementation. Changes to the master table directly affect the view generation );
3. Once the organizational unit changes, you need to reset the parts.