page252
339
Client Object
Objects refer to the physical objects holding data or functionality, which your clients
have either purchased or licensed. Objects hold the superset of data products that you
seek to monetize.
Create a table called
client_object
along with sequence
seq_client_object_id
to
generate surrogate keys.
CREATE OR REPLACE TABLE client_object
(
client_object_id NUMBER,
client_id NUMBER REFERENCES client ( client_id ),
object_name VARCHAR(255)
);
CREATE OR REPLACE SEQUENCE seq_client_object_id START WITH 100000;
Assign a single database object
base_customer_order
to your client.
INSERT INTO client_object
SELECT seq_client_object_id.NEXTVAL,
( SELECT client_id FROM client WHERE name = 'POC' ),
'base_customer_order';
Client Filter
Filters refer to the object physical attributes holding data you want to filter on. Equivalent
to row-level security (RLS), this section enables data subsetting at object generation
time. You prefer to not use RLS when generating client-specific objects in order to do the
following:
•
Reduce replicated data to a minimum
•
Prevent resolving RLS for every SQL call made to the client object
•
Remove the need to create RLS policies “on the fly”
Chapter 9
Client expeCtations