Presentation is loading. Please wait.

Presentation is loading. Please wait.

RDF-3X : RISC-Style RDF Database Engine

Similar presentations


Presentation on theme: "RDF-3X : RISC-Style RDF Database Engine"— Presentation transcript:

1 RDF-3X : RISC-Style RDF Database Engine
Thomas Neumann, Gerhard Weikum PVLDB 2008 09 Jan 2014 SNU IDB Lab. Woo Hyun Lee

2 Introduction IS IS RDF EXPENSIVE SEMANTIC WEB Effective System
Schema-less & Not normalized EXPENSIVE RDF Needs IsFor SEMANTIC WEB Effective System IS Effective & Efficient IS RDF-3X

3 RDF-3X*: Existing RDF Systems
Triples are stored in RDB Type1: Triples Table All in a single table with 3 columns (Subject, Predicate, Object) Type2: Property Table Grouped by predicates Type3: Cluster-Property Table Clustered by correlated predicates, entity class, occurrence RDF Triples Capital Statistics Subject Predicate Object Malaysia Capital K.L Hong Kong Population 7.155 Vietnam Hanoi Singapore Currency Dollar ISO MY Subject Object Malaysia K.L Vietnam Hanoi Subject Predicate Object Malaysia Currency Ringgit GDP 432 GNP 6324 그럼 저희가 분석해보려고 하는 RDF 3X 논문에서 저희가 공부하고 있는 부분을 설명드리자면 지금 이미 존재하고 있는 RDF system들은 triple들을 RDB 테이블에 storing을 합니다. System들이 RDB에 storing하는 방법에는 세가지가 있는데요 모든 triple들을 하나의 테이블에 함께 저장하는 방법, 그리고 property table이라고 해서 같은 predicate을 같은것들끼리 테이블을 나누는 방법, 마지막으로 같은 클래스나 서로 관계가 있는 predicate들을 묶어서 테이블을 만드는 Cluster-property table 방법이 있습니다. * Thomas Neumann, Gerhard Weikum, RDF-3X : a RISC-style Engine for RDF, PVLDB ‘08

4 RDF-3X: RDF Storage Huge Triples Table
All triples stored in a clustered B+ tree in lexicographical order Fast Range scan Mapping Dictionary All literals are mapped to IDs Compressed Simple query processing Subject Predicate Object Malaysia Capital K.L Hong Kong Population 7.155 Vietnam Hanoi Singapore Currency Dollar Subject Predicate Object 1 693 1065 3 594 7.155 5 19875 235 597 3329 방금 세가지 중에서 RDF-3X기법이 사용하고있는 방법은 첫번째 즉 triples table인데요, 모든 테이터를 하나의 큰 테이블에 저장시킵니다. 그리고 트리플들은 clustered B+ tree에 저장이 됩니다. 또 하나 RDF3X가 가지고 있는게 이 mapping dictionar인데요 이것은 트리플을 구성하고있는 모든 litera을 간단한 id를 부여하여 그 아이디로 테이블에 저장을 합니다 이로써 훨씬 압축된 테이블을 만들수 있습니다.

5 RDF-3X: RISC-Style RDF Storage
RISC (Reduced Instruction Set Computing) Proposed by John Cocke (IBM) in 1974 20% of all instructions does 80% of the work Use simple instructions Simplification leads to more intuitive processing and less overhead RISC-Style RDF Storage Reduced Complexity Mapping Dictionary Convert literals to Integer-based IDs Compare IDs Produce streams of ID tuples Compressed triples Query processing 작업이 reduce 됬다는 의미? 자 이제 RDF3X가 가지고 있는 RISC-style에 대한 설명을 드리겠는데요 이것은 리듀스드 인스트럭션 셋 컴퓨팅이라고 하여 명령어의 가짓수가 훨씬 적은 컴퓨팅입니다. 그리고 보시면 전체의 20프로의 명령어가 거의 80프로의 일을 한다고 하고요, 적은 가짓수의 간단한 명령어를 씁니다. 그래서 RDF3X에서 어떻게 RDF storage로 만들었냐 하면 방금 말씀드린대로 mapping dictionary를 이용해서 literal들을 ID로 바꿔서 단순화하고, triple도 compress를 씁니다.

6 RDF-3X: Compressed Index
Six separate indexes (SPO, SOP, OSP, OPS, PSO, POS) Stored in the leaf pages of the clustered B+ tree Triple Index ?var - <P> - <O> SPO SOP PSO SPO SOP PSO <S> - var? - <O> <S> - <P> - var? POS OSP OPS ?var - <P> - var? POS OSP OPS 이제 RDF-3X에서의 indexing 방법을 설명드리겠습니다. 여기서는 우리가 원하는 트리플을 한번에 찾기 위해서 SPO 트리플에 대한 모든 순서에 대해 인덱싱을 해놓습니다. 보시면 저렇게 SPO,SOP,…여섯가지 인덱스를 만드는데요 이 인덱스들을 각각 clustered B+ tree에 저장을 해놓습니다. 트리에 저장을 할때에 트리플들을 어휘순으로 정렬되어있어있음으로 leaf page에 보면 서로 비슷한 인덱스들끼리 이웃하게 저장이 됩니다. 그래서 실제로 storing을 할때에 이웃하는 트리플 인덱스와의 차이만 숫자로 나타내어 저장을 하여 Compressing을 시킵니다. ∙ ∙ ∙

7 RDF-3X : Compressed Index
SPO <Malaysia> <Capital> <Kuala Lumpur> SOP <Malaysia> <Kuala Lumpur> <Capital> PSO <Capital> <Malaysia> <Kuala Lumpur> POS <Capital> <Kuala Lumpur> <Malaysia> OSP <Kuala Lumpur> <Malaysia> <Capital> OPS <Kuala Lumpur> <Capital> <Malaysia> SPARQL ?X- <Capital> - <Kuala Lumpur> <Malaysia> - ?X- <Kuala Lumpur>

8 RDF-3X: Compressed Index
Store collation order Neighboring indexes are very similar Stores the change between triples S P O 1 2 3 5 Compression using LZ77 방금 말한 트리플간의 차이만 저장을 한다는것이 어떤거냐면 이것처럼 세개의 트리플이 있을때에, 보시면 subject랑 predicate은 같고 object만 다르죠, 이럴 경우에 저장을 할때에 subject predicate은 한번만 저장을 하고, 오브젝트부분은 앞의 tripl과의 차이만 계산을 하여 저장합니다. 보시면 첫번째 트리플을 0이라고 하고 그 다음은 1, 그리고 세번째는 2라는 차가 계산되어 들어가는 형식입니다. S P O 1 (2-2) = 0 (3-2) = 1 (5-3) = 2

9 RDF-3X: Compressed Index
Compression Stores only the change (δ) between triples . Malaysia Capital K-L KL Kuala Lumpur Population 7.1M B+ Tree Index 651 954 10 5 21989 710008 . 이 그림을 보시면 이렇게 원래 트리플들이 이 구조로 저장이 된다고 하면은, 이것에 해당하는 compressed index 트리는 이렇게 되겠죠 이 leaf들에 보시면 역시 전 트리플과의 차이, 즉 여기서 0, 10, 5로만 저장이 됩니다. <Malaysia, Capital, K-L> <Malaysia, Capital, KL> <Malaysia, Capital, Kuala Lumpur> <651, 954, 260> <651, 954, 270> <651, 954, 275> Compressed B+ Tree Index

10 RDF-3X: Compressed Indexes
Leaf level Compression Directly read triple (less decompression cost) Easy update Better concurrency control and recovery <Previous Approach> <RISC Style Approach> Chunk Level Compressed B+ Tree Index Leaf Level Compressed B+ Tree Index 651 954 10 5 21989 710008 . 651 954 10 5 21989 710008 . 그리고 이 트리에서 leaf level에서의 압축 방법을 보여드리면은 이렇게 leaf들을 한꺼번에 압축하지 않고, 각각의 leaf page마다 따로따로 압축을 함으로써 트리플을 읽어올때의 decompression cost를 줄이고, 업데이트와 concurrency control에 용이하게 하였습니다.

11 RDF-3X: Aggregated Indexes [1/2]
For many SPARQL patterns Indexing partial triples rather than full triples would be sufficient SELECT ?a ?b WHERE { ?a ?b ?c } Two-value indexes Two of three columns of a triple (value1, value2, count) (SP, PS, SO, OS, PO, OP) One-value indexes One of three columns of a triple (value, count) (S, P, O) Count is needed for duplicates Much smaller than full index 그리고 방금 말한 트리플 인덱스와는 별개로 aggregate index를 추가로 저장을 합니다. 이것은 SPARQL query중에서 세개중에 두개, 혹은 한 개만 인덱싱 하여도 충분한 쿼리들이 있기 때문에 저장해놓습니다. 그래서 세개중에 두개를 묶어서 저장한 인덱스, 아니면 하나씩만 뺴서 저장한 인덱스가 있는데요 보시면 트리플 벨류를 저장하고, 대신 그 벨류들을 갖는 트리플의 카운트를 저장을 합니다.

12 RDF-3X: Aggregated Indexes [2/2]
SELECT ?a ?c WHERE { ?a ?b ?c. } Aggregated Indexes Aggregated Indexes Value 1 Value 2 Value3 Malaysia Capital Kuala Lumpur IDB PartOf SNU Religion Islamic Value 1 Value 2 Count Malaysia Kuala Lumpur 4 IDB SNU 2 Islam 5 이것을 보시면 그 예로, 이 쿼리에서는 b라는 predicate으로 바인딩 되어있는 a 와 c만을 찾기 때문에, b가 어떤 predicate인지는 중요하지 않습니다, 그랬을때에 Aggregated index의 SO index를 사용해서, a와 c를 subject와 object로 같는 트리플만 뼤오면 더 효율적인 쿼리 프로세싱이 가능합니다.

13 Conclusion Redundancy Complex compression algorithm Need for Index
From simple single index to multiple duplicated indices Complex compression algorithm High computation cost Need for Index Cheaper & Faster Hardware Reliability Not verified 그래서 이러한 RDF-3X기법 은 결국 인덱스가 SPO모든 순서에 따라 중복적으로 저장이 되기 떄문에 리던던시가 있다는 점이 있습니다. 그리고 인덱스를 compressin할때의 알고리즘이 복잡합니다. 그래서 컴퓨테이션 코스트가 발생하고, 저희가 빅데이터 이슈로 주목하고 있는것은 이렇게 리던던트 하지 않은 빅 데이터베이스와 ID를 압축하지 않고 컨트롤링 하는 점을 생각하고 있습니다.


Download ppt "RDF-3X : RISC-Style RDF Database Engine"

Similar presentations


Ads by Google