User Tools

Site Tools


sql-derivative-sensitivity-analyser_demo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sql-derivative-sensitivity-analyser_demo [2019/01/09 14:41]
alisa [Running sensitivity analysis]
sql-derivative-sensitivity-analyser_demo [2019/06/01 15:47] (current)
alisa [Running guessing advantage analysis]
Line 56: Line 56:
  
 <​code>​ <​code>​
-// a longer description of the norm 
 u1 = lp 2.0 latitude longitude; u1 = lp 2.0 latitude longitude;
 u2 = scaleNorm 0.2 u1; u2 = scaleNorm 0.2 u1;
Line 67: Line 66:
  
 ==== Setting up tasks ==== ==== Setting up tasks ====
-Click on the task ''​Estimate the first arrival''​. We need to insert here a query. Let the query return the earliest time when some ship arrives at the port located at the point (0,0). We assume that each ship starts moving at its maximum speed.+Click on the task ''​Estimate the first arrival''​. We need to insert here a query, and a schema of the table that results from executing that query. Let the query return the earliest time when some ship arrives at the port located at the point (0,0). We assume that each ship starts moving at its maximum speed
 + 
 +The output table schema defines a table that contains just a single column.
 <​code>​ <​code>​
-create ​or replace function ​min_time() returns TABLE ( +create ​table min_time(cnt INT8); 
-  ​cnt INT8 +</​code> ​
-) as $$ +
  
 +The output table query describes how the arrival time is computed from ship location and its speed.
 +
 +<​code>​
 SELECT SELECT
-    MIN ((ship.latitude ^ 2 + ship.longitude ^ 2) ^ 0.5 / ship.max_speed)+    MIN ((ship.latitude ^ 2 + ship.longitude ^ 2) ^ 0.5 / ship.max_speed) ​AS cnt
 FROM FROM
     ship     ship
-$$ language SQL;+;
 </​code>​ </​code>​
  
Line 109: Line 112:
 If the attacker guesses the location precisely, this is bad. However, it can be bad even if he guesses the location precisely enough. Let us assume that we want to avoid guessing within 5 units of precision. We insert the following code into the window that opens after clicking //Sensitive attributes//​ button. If the attacker guesses the location precisely, this is bad. However, it can be bad even if he guesses the location precisely enough. Let us assume that we want to avoid guessing within 5 units of precision. We insert the following code into the window that opens after clicking //Sensitive attributes//​ button.
 <​code>​ <​code>​
-leak +ship.latitude approx 5 AND
-ship.latitude approx 5;+
 ship.longitude approx 5; ship.longitude approx 5;
-cost +cost 100
-100+
 </​code>​ </​code>​
  
sql-derivative-sensitivity-analyser_demo.1547037674.txt.gz · Last modified: 2019/01/09 14:41 by alisa