Example4
From WatermillWiki
In this example, we compute 5 fingerprinted database for 5 different client Prepare the watermarking environment
reset;
Create 5 clients
create client "client1" "client1" "2342342332324"; create client "client2" "client1" "2342234324234"; create client "client3" "client1" "2342556464566"; create client "client4" "client1" "2342324324444"; create client "client5" "client1" "2342434565666";
Create a synthesis database
bench "" 100 3 5;
We would like to watermark the product table for a customer "julie", so that :
- costs do not vary more that 1 unit (local constraint).
- the sum of *all* costs does not vary more than 2 units (global constraint).
- the price of each sales, bought by each customer, is not changed by more than 1 unit
create "akp" pool "pool" on "dbname" with
local 1 on ("product","idp","cost"),
global 2 on query { select idp,cost from product where "true" },
forall $ID in "select distinct idc from sales"
global 1 on query {
select idp,cost from product where
"idp in (select distinct idp from sales where idc='$ID')"
};
get instance "instance1" for "client1" from "pool"; get instance "instance2" for "client2" from "pool"; get instance "instance3" for "client3" from "pool"; get instance "instance4" for "client4" from "pool"; get instance "instance5" for "client5" from "pool";
identify "instance2";
