SQL on Structurally-Encrypted Databases

Size: px
Start display at page:

Download "SQL on Structurally-Encrypted Databases"

Transcription

1 SQL on Structurally-Encrypted Databases Seny Kamara Tarik Moataz

2 Q: What is a relational database? 2

3 Relational DB Table or relation Column or attribute Att 1 Att 2 Att 3 Att 4 Att5 Att 6 Att 7 DB = Row or record T 2 T 1 3

4 Structured Query Language SQL is a language for querying relational DBs Example: Select (name, gender, height) From (T 2, T 8 ) Where (age = 36 AND zip = AND gender = F) SQL is the standard way to query a relational DB Standard ANSI/ISO since 1986/1987 4

5 Q: What is Structured Encryption (STE)? 5

6 Structured Encryption (STE) [CK10] DS EDS tk ct Setup(1 k, DS) (K, EDS) Query(EDS, tk) ct Token(K, q) tk 6

7 Structured Encryption (STE) [CK10] DS Setup Leakage L s (DS) EDS Query Leakage L q (DS, q) tk ans Setup(1 k, DS) (K, EDS) Query(EDS, tk) ans Token(K, q) tk 7

8 Structured Encryption (STE) [CK10] We say that an STE is (L S,L Q )-secure if It reveals no information about the structure beyond L S It reveals no information about the structure and queries beyond L Q 8

9 Encrypted Multi-Maps [CK10] Encrypted Multi-Map Encrypted Inverted Index Single Keyword SSE [SWP00], [Goh03], [CGKO06], [CK10], [KPR12], [KP13], [CJJKRS13], [CJJJKRS14], [Bost16], [BMO17], [AKM19] 9

10 Q: How can we encrypt a relational DB? 10

11 Efficiency Functionality Leakage 11

12 Tradeoffs: Efficiency vs. Security Efficiency STE/SSE-based PPE-based skfe-based pkfe-based ORAM-based FHE-based Leakage 12

13 Tradeoffs: Functionality vs. Efficiency Functionality SQL FHE-based ORAM-based PPE-based NoSQL SK-FE-based PK-FE-based STE/SSE-based Efficiency 13

14 Q: Can we design an STE-based Relational EDB? 14

15 Challenges No PPE so no plug-and-play solutions SQL is a declarative language Where do we even start? SQL is complex Combination of many basic query types Most STE schemes handle a single type queries SQL is constructive STE has been optimized for lookup-type queries 15

16 Ch. #1: Declarative => Procedural Relational algebra [Codd70] Set of operations on relations/tables Union Difference Selection Projection Cross product Join (many kinds) RA SQL 16

17 Ch. #2: Complex => Simple SPC algebra [Chandra-Merlin77] Selection, Projection, Cross product Equivalent to Conjunctive SQL queries Any SPC query can be written in a Normal Form: SPC RA SQL 17

18 Select, Project, Cross Product Att 1 Att 2 Att 3 Att 1 Att 2 Att 3 σ " Att 1 Att 2 Att 3 π $,& Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 Att 2 Att 3 Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 18

19 Our Goal Att 1 Att 2 Att 1 Att 3 STE K tk SQL => SPC => NF Att 2 Att 3 Enc K 19

20 Our Results SPX: Encrypted Relational Database First STE scheme for relational DBs Handles non-trivial subset of SQL Sub-linear search and storage complexity (optimal under certain conditions) from any single-keyword SSE SPX + : dynamic SPX Only row addition and deletion from any dynamic single-keyword SSE Sub-linear search and storage complexity (optimal under certain conditions) FP-SPX + : forward-private dynamic SPX poly-logarithmic overhead for updates 20

21 A: Naïve STE-based Relational EDB 21

22 Naïve SPC Algorithm Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 Att 2 Att 6 22

23 Sub-Linear SPC Algorithm Ideally linear in output size: Att 2 Att 6 Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 Less than cross product size: 23

24 Q: Can we achieve sub-linear STE-based EDB? 24

25 SPX Overview Step 1. Heuristic normal form (HNF) instead of the standard normal form Avoid naïve Cartesian product by a push select through product method Step 2. New (plaintext) data structure that supports HNF Different representations of the database to handle different SPC operators Step 3. Encrypted structure that supports HNF queries Chaining technique with a better control of leakage From any single-keyword SSE schemes 25

26 Step 1: Heuristic Normal Form (1) σ " Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 More complicated Correlated/non-correlated Different types of select Push Select through Product Ψ = Ψ 1 Ψ 2 Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 σ "' σ "( 26

27 Step 1: Heuristic Normal Form (2) Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 σ "' σ "( Size Overhead Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 Att 1 Att 2 Att 3 Att 4 Att 5 Att 6 27

28 Step 2: Database representations Att 1 Att 2 Att 3 Att 4 Att 5 DB = T 1 T 2 Row representation Column representation Value representation Cross-value representation 28

29 Step 2: Row / Column representation Row Multi-map MM R (T 1, 1) (T 1, 2) (T 2, 1) Att 1 Att 2 Att 3 Att 4 Att 5 (T 2, 2) (T 2, 3) Column Multi-map MM C (T 1, Att 1 ) (T 1, Att 2 ) (T 2, Att 3 ) (T 2, Att 4 ) (T 2, Att 5 ) 29

30 Step 2: Value representation (1, T 1, Att 1 ) Value Multi-map MM v (T 1, 1) (2, T 1, Att 1 ) (T 1, 2) (CS, T 1, Att 2 ) (T 1, 1) (Math, T 1, Att 2 ) (T 1, 2) Att 1 Att 2 1 CS 2 Math Att 3 Att 4 Att CS 2 45 Math 2 60 CS (1, T 2, Att 3 ) (2, T 2, Att 3 ) (45, T 2, Att 4 ) (T 2, 1) (T 2, 2) (T 2, 3) (T 2, 1) (T 2, 2) (60, T 2, Att 4 ) (T 2, 1) (CS, T 2, Att 5 ) (T 2, 1) (T 2, 3) (Math, T 2, Att 5 ) (T 2, 2) 30

31 Step 2: Cross-Value representation Att 1 Att 2 1 CS 2 Math Att 3 Att 4 Att CS 2 45 Math 2 60 CS ((T 1,Att 1 ), (T 2, Att 3 )) ((T 1,Att 2 ), (T 2, Att 5 )) Cross-Value Multi-map MM Att1 Cross-Value Multi-map MM Att2 (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 2) (T 1, 2), (T 2, 3) (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 3) (T 1, 2), (T 2, 2) 31

32 Step 3: SPX Setup Att 1 Att 2 Setup SPX 1 k, Att 3 Att 4 Att 5 32

33 Step 3: SPX Setup Encrypted Row Multi-map EMM R (T 1, 1) (T 1, 2) (T 2, 1) Encrypted Column Multi-map EMM C (T 1, 1) (T 1, 2) (T 2, 1) Encrypted Value Multi-map EMM v (1, T 1, Att 1 ) (2, T 1, Att 1 ) (CS, T 1, Att 2 ) (T 1, 1) (T 1, 2) (T 1, 1) (T 2, 2) (T 2, 2) (Math, T 1, Att 2 ) (T 1, 2) (T 2, 3) (T 2, 3) (1, T 2, Att 3 ) (T 2, 1), Att 1 Encrypted dictionary EDX Encrypted Cross-Values Multi-map EMM Att1 ((T 1,Att 1 ), (T 2, Att 3 )) (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 2) (T 1, 2), (T 2, 3) (2, T 2, Att 3 ) (45, T 2, Att 4 ) (60, T 2, Att 4 ) (CS, T 2, Att 5 ) (T 2, 2) (T 2, 3) (T 2, 1) (T 2, 2) (T 2, 1) (T 2, 1) (T 2, 3) Att 2 ((T 1,Att 2 ), (T 2, Att 5 )) Encrypted Cross-Values Multi-map EMM Att2 (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 3) (T 1, 2), (T 2, 2) (Math, T 2, Att 5 ) (T 2, 2) 33

34 Step 3: SPX Token (1) Token SPX, Select Att 3 From (T 1, T 2 ) Where T 1.Att 2 = T 2.Att 5 34

35 Step 3: SPX Token (2) 1. Rewrite SQL query to Normal Form att3 att 2 =att 5 T 1 T 2 2. Rewrite Normal Form to Heuristic Normal Form 3. Generate the token Att 2 3 ((T 1, Att 2 ), (T 2, Att 5 )) Dictionary sub-token Projection Sub-token Select Sub-token 35

36 Step 3: SPX Query (1) Encrypted Value Multi-map EMM v Query SPX Att 2 3 ((T 1, Att 2 ), (T 2, Att 5 )), Encrypted Encrypted Row Multi-map EMM R Column Multi-map EMM C Encrypted dictionary EDX 36

37 Step 3: SPX Query (2) Get, Att 2 Att 1 Att 2 Encrypted dictionary EDX Encrypted Cross-Values Multi-map EMM Att1 ((T 1,Att 1 ), (T 2, Att 3 )) ((T 1,Att 2 ), (T 2, Att 5 )) (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 2) (T 1, 2), (T 2, 3) Encrypted Cross-Values Multi-map EMM Att2 (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 3) (T 1, 2), (T 2, 2) ((T 1,Att 2 ), (T 2, Att 5 )) Encrypted Cross-Values Multi-map EMM Att2 (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 3) (T 1, 2), (T 2, 2) 37

38 Step 3: SPX Query (3) Get, Encrypted Cross-Values Multi-map EMM Att2 ((T 1, Att 2 ), (T 2, Att 5 )) ((T 1,Att 2 ), (T 2, Att 5 )) (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 3) (T 1, 2), (T 2, 2) (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 3) (T 1, 2), (T 2, 2) 38

39 Step 3: SPX Query (4) (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 3) Get, (T 1, 1) Encrypted Row Multi-map EMM R (T 1, 1) (T 1, 2) (T 2, 1) (T 2, 2) (T 2, 3) (T 1, 2), (T 2, 2) Temporary Result Table Get (T 2, 1), Encrypted Row Multi-map EMM R 39

40 Step 3: SPX Query (5) (T 1, 1), (T 2, 1) (T 1, 2), (T 2, 3) (T 1, 2), (T 2, 2) Get (T 1, 2), Encrypted Row Multi-map EMM R Temporary Result Table Get (T 2, 3), Encrypted Row Multi-map EMM R Get (T 1, 2), Encrypted Row Multi-map EMM R Get (T 2, 2), Encrypted Row Multi-map EMM R 40

41 Step 3: SPX Query (6) Temporary Result Table Final Result π 3 41

42 Leakage: SPX-OPT vs. PPE-based Query leakage of SPX Cross product pattern Projection pattern Selection pattern Query leakage of PPE-based schemes Cross product pattern Projection pattern Selection pattern Frequency pattern Persistent Existing very strong attacks 42

43 Modularity: SPX-Obliv vs. SPX-OPT Query leakage of SPX-Obliv When the EMMs are oblivious [GO96,SvDS+13,GMP16,KMO18] But comes with extra overhead Query leakage of SPX-OPT 43

44 SPX-OPT Asymptotics Worst-case query complexity with Assuming optimal MM and DX encryption schemes [CK10,CJJ+14] h projected attributes t tables with size each is the size of the result on a plaintext database Mild condition tx If h 1 is constant in, then query time is optimal i=1 s i 44

45 SPX-OPT Asymptotics Communication complexity is optimal Storage depends on the data distribution O(#DB + X #MM att ) att2s Concretely, the big-o hides a multiplicative factor of 3 45

46 Takeaways and Future Work First STE-based encrypted relational database Sub-linear query time (optimal under certain conditions) First (forward-private) dynamic STE-based encrypted relational database Better leakage profile than PPE-based Future research questions: Extend SPX to handle relational algebra Remove interaction in SPX + Extend SPX to handle range sub-predicates Design of new encrypted range solutions is required [KKNO16, LMP17] 46

47 Thank you! 47

SQL on Structurally-Encrypted Databases

SQL on Structurally-Encrypted Databases SQL on Structurally-Encrypted Databases Seny Kamara Brown University Tarik Moataz Brown University Abstract We show how to encrypt a relational database in such a way that it can efficiently support a

More information

FORWARD PRIVATE SEARCHABLE ENCRYPTION

FORWARD PRIVATE SEARCHABLE ENCRYPTION FORWARD PRIVATE SEARCHABLE ENCRYPTION DATE 13/07/2016 MSR CAMBRIDGE - RAPHAEL BOST Searchable Encryption Outsource data securely keep search functionalities Generic Solutions We can use generic tools

More information

VERIFIABLE SYMMETRIC SEARCHABLE ENCRYPTION

VERIFIABLE SYMMETRIC SEARCHABLE ENCRYPTION VERIFIABLE SYMMETRIC SEARCHABLE ENCRYPTION DATE 09/03/2016 SÉMINAIRE EMSEC - RAPHAEL BOST Searchable Encryption Outsource data securely keep search functionalities Generic Solutions We can use generic

More information

Order-Revealing Encryption:

Order-Revealing Encryption: Order-Revealing Encryption: New Constructions, Applications and Lower Bounds Kevin Lewi and David J. Wu Stanford University Searching on Encrypted Data Searching on Encrypted Data Searching on Encrypted

More information

Lectures 4+5: The (In)Security of Encrypted Search

Lectures 4+5: The (In)Security of Encrypted Search Lectures 4+5: The (In)Security of Encrypted Search Contents 1 Overview 1 2 Data Structures 2 3 Syntax 3 4 Security 4 4.1 Formalizing Leaky Primitives.......................... 5 1 Overview In the first

More information

Structured Encryption

Structured Encryption Contents Structured Encryption 1 Motivation 1 2 The Solution Space 3 3 Structured Encryption 5 4 Data Structures 6 5 Syntax 7 6 Security 8 6.1 Formalizing Leaky Primitives.......................... 9 1

More information

Structured Encryption and Controlled Disclosure

Structured Encryption and Controlled Disclosure Structured Encryption and Controlled Disclosure Melissa Chase Seny Kamara Microsoft Research Cloud Storage Security for Cloud Storage o Main concern: will my data be safe? o it will be encrypted o it will

More information

Structured Encryption and Leakage Suppression

Structured Encryption and Leakage Suppression Structured Encryption and Leakage Suppression Seny Kamara 1, Tarik Moataz 1, and Olya Ohrimenko 2 1 Brown University, Providence, USA seny@brown.edu, tarik moataz@brown.edu 2 Microsoft Research, Cambridge,

More information

Searchable Encryption Using ORAM. Benny Pinkas

Searchable Encryption Using ORAM. Benny Pinkas Searchable Encryption Using ORAM Benny Pinkas 1 Desiderata for Searchable Encryption Security No leakage about the query or the results Functionality Variety of queries that are supported Performance 2

More information

Searchable Symmetric Encryption: Optimal Locality in Linear Space via Two-Dimensional Balanced Allocations

Searchable Symmetric Encryption: Optimal Locality in Linear Space via Two-Dimensional Balanced Allocations Searchable Symmetric Encryption: Optimal Locality in Linear Space via Two-Dimensional Balanced Allocations Gilad Asharov Cornell-Tech Moni Naor Gil Segev Ido Shahaf (Hebrew University) Weizmann Hebrew

More information

!Oxymoron: Encrypted (Database) Search

!Oxymoron: Encrypted (Database) Search !Oxymoron: Encrypted (Database) Search Srinivasan Narayanamurthy (Srini) NetApp 1 Agenda Survey Homomorphic Encryption 101 Encrypted Search Tradeoffs Leakage Functionality Encrypted Databases 2 Survey

More information

Lectures 6+7: Zero-Leakage Solutions

Lectures 6+7: Zero-Leakage Solutions Lectures 6+7: Zero-Leakage Solutions Contents 1 Overview 1 2 Oblivious RAM 1 3 Oblivious RAM via FHE 2 4 Oblivious RAM via Symmetric Encryption 4 4.1 Setup........................................ 5 4.2

More information

Cryptographically Protected Database Search

Cryptographically Protected Database Search Cryptographically Protected Database Search Benjamin Fuller, Mayank Varia, Arkady Yerukhimovich, Emily Shen, Ariel Hamlin, Vijay Gadepally, Richard Shay, Darby Mitchell, Robert Cunningham benjamin.fuller@uconn.edu

More information

Improving Query Plans. CS157B Chris Pollett Mar. 21, 2005.

Improving Query Plans. CS157B Chris Pollett Mar. 21, 2005. Improving Query Plans CS157B Chris Pollett Mar. 21, 2005. Outline Parse Trees and Grammars Algebraic Laws for Improving Query Plans From Parse Trees To Logical Query Plans Syntax Analysis and Parse Trees

More information

GRECS: GRaph Encryption for Approx.

GRECS: GRaph Encryption for Approx. ACM CCS 2015 GRECS: GRaph Encryption for Approx. Shortest Distance Queries Xianrui Meng (Boston University) Seny Kamara (Microsoft Research) Kobbi Nissim (Ben-Gurion U. & CRCS Harvard U.) George Kollios

More information

Database Technology Introduction. Heiko Paulheim

Database Technology Introduction. Heiko Paulheim Database Technology Introduction Outline The Need for Databases Data Models Relational Databases Database Design Storage Manager Query Processing Transaction Manager Introduction to the Relational Model

More information

CMP-3440 Database Systems

CMP-3440 Database Systems CMP-3440 Database Systems Relational DB Languages Relational Algebra, Calculus, SQL Lecture 05 zain 1 Introduction Relational algebra & relational calculus are formal languages associated with the relational

More information

Order-Revealing Encryption:

Order-Revealing Encryption: Order-Revealing Encryption: How to Search on Encrypted Data Kevin Lewi and David J. Wu Stanford University Searching on Encrypted Data Searching on Encrypted Data Searching on Encrypted Data Searching

More information

Highly-Functional Highly-Scalable Search on Encrypted Data

Highly-Functional Highly-Scalable Search on Encrypted Data Highly-Functional Highly-Scalable Search on Encrypted Data Hugo Krawczyk, IBM Joint work with IBM-UCI teams: David Cash, Sky Faber, Joseph Jaeger, Stas Jarecki, Charanjit Jutla, Quan Nguyen, Marcel Rosu,

More information

Overview of Query Processing and Optimization

Overview of Query Processing and Optimization Overview of Query Processing and Optimization Source: Database System Concepts Korth and Silberschatz Lisa Ball, 2010 (spelling error corrections Dec 07, 2011) Purpose of DBMS Optimization Each relational

More information

Chapter 2: Intro to Relational Model

Chapter 2: Intro to Relational Model Non è possibile visualizzare l'immagine. Chapter 2: Intro to Relational Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Example of a Relation attributes (or columns)

More information

Chapter 2: Intro to Relational Model

Chapter 2: Intro to Relational Model Chapter 2: Intro to Relational Model Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Example of a Relation attributes (or columns) tuples (or rows) 2.2 Attribute Types The

More information

Optimization Overview

Optimization Overview Lecture 17 Optimization Overview Lecture 17 Lecture 17 Today s Lecture 1. Logical Optimization 2. Physical Optimization 3. Course Summary 2 Lecture 17 Logical vs. Physical Optimization Logical optimization:

More information

Introduction to Data Management CSE 344. Lectures 8: Relational Algebra

Introduction to Data Management CSE 344. Lectures 8: Relational Algebra Introduction to Data Management CSE 344 Lectures 8: Relational Algebra CSE 344 - Winter 2016 1 Announcements Homework 3 is posted Microsoft Azure Cloud services! Use the promotion code you received Due

More information

Crypto for PRAM from io (via Succinct Garbled PRAM)

Crypto for PRAM from io (via Succinct Garbled PRAM) Crypto for PRAM from io (via Succinct Garbled PRAM) Kai-Min Chung Academia Sinica, Taiwan Joint work with: Yu-Chi Chen, Sherman S.M. Chow, Russell W.F. Lai, Wei-Kai Lin, Hong-Sheng Zhou Computation in

More information

Searchable Symmetric Encryption: Optimal Locality in Linear Space via Two-Dimensional Balanced Allocations

Searchable Symmetric Encryption: Optimal Locality in Linear Space via Two-Dimensional Balanced Allocations Searchable Symmetric Encryption: Optimal Locality in Linear Space via Two-Dimensional Balanced Allocations Gilad Asharov Moni Naor Gil Segev Ido Shahaf IBM Research Weizmann Hebrew University Hebrew University

More information

Forward and Backward Private Searchable Encryption from Constrained Cryptographic Primitives

Forward and Backward Private Searchable Encryption from Constrained Cryptographic Primitives Forward and Backward Private Searchable Encryption from Constrained Cryptographic Primitives Raphael Bost Brice Minaud Olga Ohrimenko Abstract Using dynamic Searchable Symmetric Encryption, a user with

More information

Forward Private Searchable Symmetric Encryption with Optimized I/O Efficiency

Forward Private Searchable Symmetric Encryption with Optimized I/O Efficiency 1 Forward Private Searchable Symmetric Encryption with Optimized I/O Efficiency Xiangfu Song, Changyu Dong, Dandan Yuan, Qiuliang Xu and Minghao Zhao arxiv:171.183v1 [cs.cr] 3 Sep 217 Abstract Recently,

More information

CS317 File and Database Systems

CS317 File and Database Systems CS317 File and Database Systems Lecture 3 Relational Model & Languages Part-1 September 7, 2018 Sam Siewert More Embedded Systems Summer - Analog, Digital, Firmware, Software Reasons to Consider Catch

More information

Relational Model, Relational Algebra, and SQL

Relational Model, Relational Algebra, and SQL Relational Model, Relational Algebra, and SQL August 29, 2007 1 Relational Model Data model. constraints. Set of conceptual tools for describing of data, data semantics, data relationships, and data integrity

More information

Order-Revealing Encryption:

Order-Revealing Encryption: Order-Revealing Encryption: How to Search on Encrypted Data Kevin Lewi and David J. Wu Stanford University Searching on Encrypted Data The information accessed from potentially exposed accounts "may have

More information

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity

Relational model continued. Understanding how to use the relational model. Summary of board example: with Copies as weak entity COS 597A: Principles of Database and Information Systems Relational model continued Understanding how to use the relational model 1 with as weak entity folded into folded into branches: (br_, librarian,

More information

Relational Algebra. Relational Query Languages

Relational Algebra. Relational Query Languages Relational Algebra π CS 186 Fall 2002, Lecture 7 R & G, Chapter 4 By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and, in effect,

More information

Forward and Backward Private Searchable Encryption from Constrained Cryptographic Primitives

Forward and Backward Private Searchable Encryption from Constrained Cryptographic Primitives Forward and Backward Private Searchable Encryption from Constrained Cryptographic Primitives Raphaël Bost Direction Générale de l Armement & Université de Rennes 1, France raphael_bost@alumni.brown.edu

More information

What happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques

What happens. 376a. Database Design. Execution strategy. Query conversion. Next. Two types of techniques 376a. Database Design Dept. of Computer Science Vassar College http://www.cs.vassar.edu/~cs376 Class 16 Query optimization What happens Database is given a query Query is scanned - scanner creates a list

More information

Relational Algebra. [R&G] Chapter 4, Part A CS4320 1

Relational Algebra. [R&G] Chapter 4, Part A CS4320 1 Relational Algebra [R&G] Chapter 4, Part A CS4320 1 Relational Query Languages Query languages: Allow manipulation and retrieval of data from a database. Relational model supports simple, powerful QLs:

More information

Relational Model and Relational Algebra

Relational Model and Relational Algebra Relational Model and Relational Algebra CMPSCI 445 Database Systems Fall 2008 Some slide content courtesy of Zack Ives, Ramakrishnan & Gehrke, Dan Suciu, Ullman & Widom Next lectures: Querying relational

More information

Keyword Search on Form Results

Keyword Search on Form Results Keyword Search on Form Results Aditya Ramesh (Stanford) * S Sudarshan (IIT Bombay) Purva Joshi (IIT Bombay) * Work done at IIT Bombay Keyword Search on Structured Data Allows queries to be specified without

More information

Relational Query Languages. Preliminaries. Formal Relational Query Languages. Example Schema, with table contents. Relational Algebra

Relational Query Languages. Preliminaries. Formal Relational Query Languages. Example Schema, with table contents. Relational Algebra Note: Slides are posted on the class website, protected by a password written on the board Reading: see class home page www.cs.umb.edu/cs630. Relational Algebra CS430/630 Lecture 2 Relational Query Languages

More information

Hiding in the Cloud: The Perils and Promise of Searchable Encryption

Hiding in the Cloud: The Perils and Promise of Searchable Encryption Hiding in the Cloud: The Perils and Promise of Searchable Encryption Jason Perry Lewis University In collaboration with: David Cash Rutgers University Paul Grubbs Cornell University Tom Ristenpart Cornell

More information

5.3 Parser and Translator. 5.3 Parser and Translator. 5.3 Parser and Translator. 5.3 Parser and Translator. 5.3 Parser and Translator

5.3 Parser and Translator. 5.3 Parser and Translator. 5.3 Parser and Translator. 5.3 Parser and Translator. 5.3 Parser and Translator 5 Query Processing Relational Database Systems 2 5. Query Processing Silke Eckstein Andreas Kupfer Institut für Informationssysteme Technische Universität Braunschweig http://www.ifis.cs.tu-bs.de 5.1 Introduction:

More information

Relational Database Systems 2 5. Query Processing

Relational Database Systems 2 5. Query Processing Relational Database Systems 2 5. Query Processing Silke Eckstein Andreas Kupfer Institut für Informationssysteme Technische Universität Braunschweig http://www.ifis.cs.tu-bs.de 5 Query Processing 5.1 Introduction:

More information

SEARCHABLE encryption is perhaps one of the most intensively

SEARCHABLE encryption is perhaps one of the most intensively 1 Forward Private Searchable Symmetric Encryption with Optimized I/O Efficiency Xiangfu Song, Changyu Dong, Dandan Yuan, Qiuliang Xu and Minghao Zhao Abstract Recently, several practical attacks raised

More information

CS122 Lecture 4 Winter Term,

CS122 Lecture 4 Winter Term, CS122 Lecture 4 Winter Term, 2014-2015 2 SQL Query Transla.on Last time, introduced query evaluation pipeline SQL query SQL parser abstract syntax tree SQL translator relational algebra plan query plan

More information

Parallel and Dynamic Searchable Symmetric Encryption

Parallel and Dynamic Searchable Symmetric Encryption Parallel and Dynamic Searchable Symmetric Encryption Seny Kamara 1 and Charalampos Papamanthou 2 1 Microsoft Research, senyk@microsoft.com 2 UC Berkeley, cpap@cs.berkeley.edu Abstract. Searchable symmetric

More information

CMPUT 391 Database Management Systems. An Overview of Query Processing. Textbook: Chapter 11 (first edition: Chapter 14)

CMPUT 391 Database Management Systems. An Overview of Query Processing. Textbook: Chapter 11 (first edition: Chapter 14) CMPUT 391 Database Management Systems Winter Semester 2006, Section B1, Dr. Jörg Sander An Overview of Query Processing Textbook: Chapter 11 (first edition: Chapter 14) Based on slides by Lewis, Bernstein

More information

RELATIONAL ALGEBRA. CS121: Relational Databases Fall 2017 Lecture 2

RELATIONAL ALGEBRA. CS121: Relational Databases Fall 2017 Lecture 2 RELATIONAL ALGEBRA CS121: Relational Databases Fall 2017 Lecture 2 Administrivia 2 First assignment will be available today Due next Thursday, October 5, 2:00 AM TAs will be decided soon Should start having

More information

Leakage-Resilient Chosen-Ciphertext Secure Public-Key Encryption from Hash Proof System and One-Time Lossy Filter

Leakage-Resilient Chosen-Ciphertext Secure Public-Key Encryption from Hash Proof System and One-Time Lossy Filter Leakage-Resilient Chosen-Ciphertext Secure Public-Key Encryption from Hash Proof System and One-Time Lossy Filter Baodong Qin and Shengli Liu Shanghai Jiao Tong University ASIACRYPT 2013 Dec 5, Bangalore,

More information

Incomplete Information: Null Values

Incomplete Information: Null Values Incomplete Information: Null Values Often ruled out: not null in SQL. Essential when one integrates/exchanges data. Perhaps the most poorly designed and the most often criticized part of SQL:... [this]

More information

CAS CS 460/660 Introduction to Database Systems. Relational Algebra 1.1

CAS CS 460/660 Introduction to Database Systems. Relational Algebra 1.1 CAS CS 460/660 Introduction to Database Systems Relational Algebra 1.1 Relational Query Languages Query languages: Allow manipulation and retrieval of data from a database. Relational model supports simple,

More information

Relational Algebra. Note: Slides are posted on the class website, protected by a password written on the board

Relational Algebra. Note: Slides are posted on the class website, protected by a password written on the board Note: Slides are posted on the class website, protected by a password written on the board Reading: see class home page www.cs.umb.edu/cs630. Relational Algebra CS430/630 Lecture 2 Slides based on Database

More information

Final Review. Zaki Malik November 20, 2008

Final Review. Zaki Malik November 20, 2008 Final Review Zaki Malik November 20, 2008 Basic Operators Covered Renaming If two relations have the same attribute, disambiguate the attributes by prefixing the attribute with the name of the relation

More information

Databases - 3. Null, Cartesian Product and Join. Null Null is a value that we use when. Something will never have a value

Databases - 3. Null, Cartesian Product and Join. Null Null is a value that we use when. Something will never have a value Databases - 3 Null, Cartesian Product and Join Null Null is a value that we use when Something will never have a value Something will have a value in the future Something had a value but doesn t at the

More information

Introduction to Data Management CSE 344. Lectures 8: Relational Algebra

Introduction to Data Management CSE 344. Lectures 8: Relational Algebra Introduction to Data Management CSE 344 Lectures 8: Relational Algebra CSE 344 - Winter 2017 1 Announcements Homework 3 is posted Microsoft Azure Cloud services! Use the promotion code you received Due

More information

Somewhat Homomorphic Encryption

Somewhat Homomorphic Encryption Somewhat Homomorphic Encryption Craig Gentry and Shai Halevi June 3, 2014 China Summer School on Lattices and Cryptography Part 1: Homomorphic Encryption: Background, Applications, Limitations Computing

More information

CSE 344 Final Review. August 16 th

CSE 344 Final Review. August 16 th CSE 344 Final Review August 16 th Final In class on Friday One sheet of notes, front and back cost formulas also provided Practice exam on web site Good luck! Primary Topics Parallel DBs parallel join

More information

Relational Query Optimization. Overview of Query Evaluation. SQL Refresher. Yanlei Diao UMass Amherst October 23 & 25, 2007

Relational Query Optimization. Overview of Query Evaluation. SQL Refresher. Yanlei Diao UMass Amherst October 23 & 25, 2007 Relational Query Optimization Yanlei Diao UMass Amherst October 23 & 25, 2007 Slide Content Courtesy of R. Ramakrishnan, J. Gehrke, and J. Hellerstein 1 Overview of Query Evaluation Query Evaluation Plan:

More information

CS698F Advanced Data Management. Instructor: Medha Atre. Aug 11, 2017 CS698F Adv Data Mgmt 1

CS698F Advanced Data Management. Instructor: Medha Atre. Aug 11, 2017 CS698F Adv Data Mgmt 1 CS698F Advanced Data Management Instructor: Medha Atre Aug 11, 2017 CS698F Adv Data Mgmt 1 Recap Query optimization components. Relational algebra rules. How to rewrite queries with relational algebra

More information

Databases - 3. Null, Cartesian Product and Join. Null Null is a value that we use when. Something will never have a value

Databases - 3. Null, Cartesian Product and Join. Null Null is a value that we use when. Something will never have a value Databases - 3, Cartesian Product and Join is a value that we use when Something will never have a value Something will have a value in the future Something had a value but doesn t at the moment is a reserved

More information

Relational Query Optimization. Highlights of System R Optimizer

Relational Query Optimization. Highlights of System R Optimizer Relational Query Optimization Chapter 15 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Highlights of System R Optimizer v Impact: Most widely used currently; works well for < 10 joins.

More information

Relational Algebra and SQL

Relational Algebra and SQL Relational Algebra and SQL Relational Algebra. This algebra is an important form of query language for the relational model. The operators of the relational algebra: divided into the following classes:

More information

Overview of DB & IR. ICS 624 Spring Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa

Overview of DB & IR. ICS 624 Spring Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa ICS 624 Spring 2011 Overview of DB & IR Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1/12/2011 Lipyeow Lim -- University of Hawaii at Manoa 1 Example

More information

Chapter 3B Objectives. Relational Set Operators. Relational Set Operators. Relational Algebra Operations

Chapter 3B Objectives. Relational Set Operators. Relational Set Operators. Relational Algebra Operations Chapter 3B Objectives Relational Set Operators Learn About relational database operators SELECT & DIFFERENCE PROJECT & JOIN UNION PRODUCT INTERSECT DIVIDE The Database Meta Objects the data dictionary

More information

Relational Query Languages. Relational Algebra. Preliminaries. Formal Relational Query Languages. Relational Algebra: 5 Basic Operations

Relational Query Languages. Relational Algebra. Preliminaries. Formal Relational Query Languages. Relational Algebra: 5 Basic Operations Relational Algebra R & G, Chapter 4 By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and, in effect, increases the mental power of

More information

Database Management Systems. Chapter 4. Relational Algebra. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1

Database Management Systems. Chapter 4. Relational Algebra. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Database Management Systems Chapter 4 Relational Algebra Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Formal Relational Query Languages Two mathematical Query Languages form the basis

More information

Chapter 13: Query Optimization. Chapter 13: Query Optimization

Chapter 13: Query Optimization. Chapter 13: Query Optimization Chapter 13: Query Optimization Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 13: Query Optimization Introduction Equivalent Relational Algebra Expressions Statistical

More information

Multi-Key Searchable Encryption, Revisited

Multi-Key Searchable Encryption, Revisited Multi-Key Searchable Encryption, Revisited Ariel Hamlin abhi shelat Mor Weiss Daniel Wichs March 19, 2018 Abstract We consider a setting where users store their encrypted documents on a remote server and

More information

GRECS: Graph Encryption for Approximate Shortest Distance Queries

GRECS: Graph Encryption for Approximate Shortest Distance Queries GRECS: Graph Encryption for Approximate Shortest Distance Queries Xianrui Meng xmeng@cs.bu.edu Seny Kamara senyk@microsoft.com George Kollios gkollios@cs.bu.edu Kobbi Nissim kobbi@cs.bgu.ac.il Abstract

More information

Lecture Query evaluation. Combining operators. Logical query optimization. By Marina Barsky Winter 2016, University of Toronto

Lecture Query evaluation. Combining operators. Logical query optimization. By Marina Barsky Winter 2016, University of Toronto Lecture 02.03. Query evaluation Combining operators. Logical query optimization By Marina Barsky Winter 2016, University of Toronto Quick recap: Relational Algebra Operators Core operators: Selection σ

More information

Announcement. Reading Material. Overview of Query Evaluation. Overview of Query Evaluation. Overview of Query Evaluation 9/26/17

Announcement. Reading Material. Overview of Query Evaluation. Overview of Query Evaluation. Overview of Query Evaluation 9/26/17 Announcement CompSci 516 Database Systems Lecture 10 Query Evaluation and Join Algorithms Project proposal pdf due on sakai by 5 pm, tomorrow, Thursday 09/27 One per group by any member Instructor: Sudeepa

More information

The Locality of Searchable Symmetric Encryption

The Locality of Searchable Symmetric Encryption The Locality of Searchable Symmetric Encryption David Cash Rutgers U Stefano Tessaro UC Santa Barbara 1 Outsourced storage and searching Broser only donloads documents matching query. Avoids donloading

More information

CMPE 131 Software Engineering. Database Introduction

CMPE 131 Software Engineering. Database Introduction Presented By Melvin Ch ng CMPE 131 Software Engineering September 14, 2017 Database Introduction Ruby on Rails ORM Agenda Database Management System (DBMS) SQL vs NoSQL Relational Database Introduction

More information

TWORAM: Efficient Oblivious RAM in Two Rounds with Applications to Searchable Encryption

TWORAM: Efficient Oblivious RAM in Two Rounds with Applications to Searchable Encryption TWORAM: Efficient Oblivious RAM in Two Rounds with Applications to Searchable Encryption Sanjam Garg 1, Payman Mohassel 2, and Charalampos Papamanthou 3 1 University of California, Berkeley 2 Yahoo! Labs

More information

Application to More Efficient Obfuscation

Application to More Efficient Obfuscation Lattice-Based SNARGs and Their Application to More Efficient Obfuscation Dan Boneh, Yuval Ishai, Amit Sahai, and David J. Wu Program Obfuscation [BGIRSVY01, GGHRSW13] Indistinguishability obfuscation (io)

More information

Relational Database Systems 2 5. Query Processing

Relational Database Systems 2 5. Query Processing Relational Database Systems 2 5. Query Processing Silke Eckstein Benjamin Köhncke Institut für Informationssysteme Technische Universität Braunschweig http://www.ifis.cs.tu-bs.de 4 Trees & Advanced Indexes

More information

DATABASE DESIGN I - 1DL300

DATABASE DESIGN I - 1DL300 DATABASE DESIGN I - 1DL300 Spring 2013 An Introductory Course on Database Systems http://www.it.uu.se/edu/course/homepage/dbastekn/vt13/ Uppsala Database Laboratory Department of Information Technology,

More information

2.2.2.Relational Database concept

2.2.2.Relational Database concept Foreign key:- is a field (or collection of fields) in one table that uniquely identifies a row of another table. In simpler words, the foreign key is defined in a second table, but it refers to the primary

More information

Substring-Searchable Symmetric Encryption

Substring-Searchable Symmetric Encryption Proceedings on Privacy Enhancing Technologies 2015; 2015 (2):263 281 Melissa Chase and Emily Shen Substring-Searchable Symmetric Encryption Abstract: In this paper, we consider a setting where a client

More information

Forward & Backward Private Searchable Encryption from Constrained Cryptographic Primitives

Forward & Backward Private Searchable Encryption from Constrained Cryptographic Primitives Forward & Backward Private Searchable Encryption from Constrained Cryptographic Primitives Raphael Bost, Brice Minaud, Olga Ohrimenko ACM CCS 17 - Dallas, TX - 11/01/2017 Great Co-Authors Brice Minaud

More information

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #10: Query Processing

CS 4604: Introduction to Database Management Systems. B. Aditya Prakash Lecture #10: Query Processing CS 4604: Introduction to Database Management Systems B. Aditya Prakash Lecture #10: Query Processing Outline introduction selection projection join set & aggregate operations Prakash 2018 VT CS 4604 2

More information

Usable PIR. Network Security and Applied. Cryptography Laboratory.

Usable PIR. Network Security and Applied. Cryptography Laboratory. Network Security and Applied Cryptography Laboratory http://crypto.cs.stonybrook.edu Usable PIR NDSS '08, San Diego, CA Peter Williams petertw@cs.stonybrook.edu Radu Sion sion@cs.stonybrook.edu ver. 2.1

More information

What s a database system? Review of Basic Database Concepts. Entity-relationship (E/R) diagram. Two important questions. Physical data independence

What s a database system? Review of Basic Database Concepts. Entity-relationship (E/R) diagram. Two important questions. Physical data independence What s a database system? Review of Basic Database Concepts CPS 296.1 Topics in Database Systems According to Oxford Dictionary Database: an organized body of related information Database system, DataBase

More information

Mahathma Gandhi University

Mahathma Gandhi University Mahathma Gandhi University BSc Computer science III Semester BCS 303 OBJECTIVE TYPE QUESTIONS Choose the correct or best alternative in the following: Q.1 In the relational modes, cardinality is termed

More information

Making Searchable Encryption Scale to the Cloud. Ian Miers and Payman Mohassel

Making Searchable Encryption Scale to the Cloud. Ian Miers and Payman Mohassel Making Searchable Encryption Scale to the Cloud Ian Miers and Payman Mohassel End to end Encryption No encryption Transport encryption End2End Encryption Service provider Service provider Service provider

More information

Web Science & Technologies University of Koblenz Landau, Germany. Relational Data Model

Web Science & Technologies University of Koblenz Landau, Germany. Relational Data Model Web Science & Technologies University of Koblenz Landau, Germany Relational Data Model Overview Relational data model; Tuples and relations; Schemas and instances; Named vs. unnamed perspective; Relational

More information

Relational Databases. Relational Databases. Extended Functional view of Information Manager. e.g. Schema & Example instance of student Relation

Relational Databases. Relational Databases. Extended Functional view of Information Manager. e.g. Schema & Example instance of student Relation Relational Databases Relational Databases 1 Relational Model of Data 2 Relational Algebra (and connection to Datalog) Relational database: a set of relations/tables Relation schema : specifies name of

More information

Database Tuning and Physical Design: Basics of Query Execution

Database Tuning and Physical Design: Basics of Query Execution Database Tuning and Physical Design: Basics of Query Execution Spring 2018 School of Computer Science University of Waterloo Databases CS348 (University of Waterloo) Query Execution 1 / 43 The Client/Server

More information

Basant Group of Institution

Basant Group of Institution Basant Group of Institution Visual Basic 6.0 Objective Question Q.1 In the relational modes, cardinality is termed as: (A) Number of tuples. (B) Number of attributes. (C) Number of tables. (D) Number of

More information

CMPS 277 Principles of Database Systems. https://courses.soe.ucsc.edu/courses/cmps277/fall11/01. Lecture #11

CMPS 277 Principles of Database Systems. https://courses.soe.ucsc.edu/courses/cmps277/fall11/01. Lecture #11 CMPS 277 Principles of Database Systems https://courses.soe.ucsc.edu/courses/cmps277/fall11/01 Lecture #11 1 Limitations of Relational Algebra & Relational Calculus Outline: Relational Algebra and Relational

More information

Advanced Database Systems

Advanced Database Systems Lecture IV Query Processing Kyumars Sheykh Esmaili Basic Steps in Query Processing 2 Query Optimization Many equivalent execution plans Choosing the best one Based on Heuristics, Cost Will be discussed

More information

Relational Algebra. Study Chapter Comp 521 Files and Databases Fall

Relational Algebra. Study Chapter Comp 521 Files and Databases Fall Relational Algebra Study Chapter 4.1-4.2 Comp 521 Files and Databases Fall 2010 1 Relational Query Languages Query languages: Allow manipulation and retrieval of data from a database. Relational model

More information

Informationslogistik Unit 4: The Relational Algebra

Informationslogistik Unit 4: The Relational Algebra Informationslogistik Unit 4: The Relational Algebra 26. III. 2012 Outline 1 SQL 2 Summary What happened so far? 3 The Relational Algebra Summary 4 The Relational Calculus Outline 1 SQL 2 Summary What happened

More information

CSE 562 Final Exam Solutions

CSE 562 Final Exam Solutions CSE 562 Final Exam Solutions May 12, 2014 Question Points Possible Points Earned A.1 7 A.2 7 A.3 6 B.1 10 B.2 10 C.1 10 C.2 10 D.1 10 D.2 10 E 20 Bonus 5 Total 105 CSE 562 Final Exam 2014 Relational Algebra

More information

Databases - 4. Other relational operations and DDL. How to write RA expressions for dummies

Databases - 4. Other relational operations and DDL. How to write RA expressions for dummies Databases - 4 Other relational operations and DDL How to write RA expressions for dummies Step 1: Identify the relations required and CP them together Step 2: Add required selections to make the CP Step

More information

Relational Model: History

Relational Model: History Relational Model: History Objectives of Relational Model: 1. Promote high degree of data independence 2. Eliminate redundancy, consistency, etc. problems 3. Enable proliferation of non-procedural DML s

More information

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7

Public-Key Cryptography. Professor Yanmin Gong Week 3: Sep. 7 Public-Key Cryptography Professor Yanmin Gong Week 3: Sep. 7 Outline Key exchange and Diffie-Hellman protocol Mathematical backgrounds for modular arithmetic RSA Digital Signatures Key management Problem:

More information

Dynamic Searchable Symmetric Encryption with Physical Deletion and Small Leakage

Dynamic Searchable Symmetric Encryption with Physical Deletion and Small Leakage University of Wollongong Research Online Faculty of Engineering and Information Sciences - Papers: Part B Faculty of Engineering and Information Sciences 07 Dynamic Searchable Symmetric Encryption with

More information

Relational Model and Relational Algebra A Short Review Class Notes - CS582-01

Relational Model and Relational Algebra A Short Review Class Notes - CS582-01 Relational Model and Relational Algebra A Short Review Class Notes - CS582-01 Tran Cao Son January 12, 2002 0.1 Basics The following definitions are from the book [1] Relational Model. Relations are tables

More information

Chapter 18 Strategies for Query Processing. We focus this discussion w.r.t RDBMS, however, they are applicable to OODBS.

Chapter 18 Strategies for Query Processing. We focus this discussion w.r.t RDBMS, however, they are applicable to OODBS. Chapter 18 Strategies for Query Processing We focus this discussion w.r.t RDBMS, however, they are applicable to OODBS. 1 1. Translating SQL Queries into Relational Algebra and Other Operators - SQL is

More information

Faloutsos 1. Carnegie Mellon Univ. Dept. of Computer Science Database Applications. Outline

Faloutsos 1. Carnegie Mellon Univ. Dept. of Computer Science Database Applications. Outline Carnegie Mellon Univ. Dept. of Computer Science 15-415 - Database Applications Lecture #14: Implementation of Relational Operations (R&G ch. 12 and 14) 15-415 Faloutsos 1 introduction selection projection

More information