Submit Search
Upload
[개념정리] DB: Indexing과 Hashing
•
0 likes
•
3,576 views
Kwangsik Lee
Follow
데이터베이스의 Indexing과 Hashing에 대한 개념 정리
Read less
Read more
Technology
Report
Share
Report
Share
1 of 49
Download now
Download to read offline
Recommended
Indexing and hashing
Indexing and hashing
Abdul mannan Karim
Lec 1 indexing and hashing
Lec 1 indexing and hashing
Md. Mashiur Rahman
Overview of Storage and Indexing ...
Overview of Storage and Indexing ...
Javed Khan
DMBS Indexes.pptx
DMBS Indexes.pptx
husainsadikarvy
indexing and hashing
indexing and hashing
University of Potsdam
MNGT- 21022_Office Management-Lecture 7_Indexing_and_methods_of_indexing_intr...
MNGT- 21022_Office Management-Lecture 7_Indexing_and_methods_of_indexing_intr...
Rajarata University of Sri Lanka
Database management system chapter12
Database management system chapter12
Md. Mahedi Mahfuj
Cs437 lecture 14_15
Cs437 lecture 14_15
Aneeb_Khawar
Recommended
Indexing and hashing
Indexing and hashing
Abdul mannan Karim
Lec 1 indexing and hashing
Lec 1 indexing and hashing
Md. Mashiur Rahman
Overview of Storage and Indexing ...
Overview of Storage and Indexing ...
Javed Khan
DMBS Indexes.pptx
DMBS Indexes.pptx
husainsadikarvy
indexing and hashing
indexing and hashing
University of Potsdam
MNGT- 21022_Office Management-Lecture 7_Indexing_and_methods_of_indexing_intr...
MNGT- 21022_Office Management-Lecture 7_Indexing_and_methods_of_indexing_intr...
Rajarata University of Sri Lanka
Database management system chapter12
Database management system chapter12
Md. Mahedi Mahfuj
Cs437 lecture 14_15
Cs437 lecture 14_15
Aneeb_Khawar
MLAAS(Machine Learning As A Service) 기술관점 분석
MLAAS(Machine Learning As A Service) 기술관점 분석
Kwangsik Lee
Azure ML Studio를 분석해보자.
Azure ML Studio를 분석해보자.
Kwangsik Lee
Amazon Personalize를 분석해보자.
Amazon Personalize를 분석해보자.
Kwangsik Lee
Supervisord 사용법을 간단히 알아보자!
Supervisord 사용법을 간단히 알아보자!
Kwangsik Lee
[개념정리] DB: Recovery
[개념정리] DB: Recovery
Kwangsik Lee
[개념정리] DB: Concurrency Control
[개념정리] DB: Concurrency Control
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 5 : Backpropagation
Visual AI(시각 인공지능) Lecture 5 : Backpropagation
Kwangsik Lee
Week4Visual AI(시각 인공지능) Lecture 4 : Multiple Layer Perceptron (MLP)
Week4Visual AI(시각 인공지능) Lecture 4 : Multiple Layer Perceptron (MLP)
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 3 : Optimization by Gradient Descent
Visual AI(시각 인공지능) Lecture 3 : Optimization by Gradient Descent
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 2 : Neural Networks and Preceptron
Visual AI(시각 인공지능) Lecture 2 : Neural Networks and Preceptron
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 1 : 최신 Trend 소개
Visual AI(시각 인공지능) Lecture 1 : 최신 Trend 소개
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week5
Coursera Machine Learning으로 기계학습 배우기 : week5
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week4
Coursera Machine Learning으로 기계학습 배우기 : week4
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week3
Coursera Machine Learning으로 기계학습 배우기 : week3
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week2
Coursera Machine Learning으로 기계학습 배우기 : week2
Kwangsik Lee
[논문분석] Segmentation based lyrics-audio alignment using dynamic programming
[논문분석] Segmentation based lyrics-audio alignment using dynamic programming
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week1
Coursera Machine Learning으로 기계학습 배우기 : week1
Kwangsik Lee
CycleGAN이 무엇인지 알아보자
CycleGAN이 무엇인지 알아보자
Kwangsik Lee
알아두면 쓸데있는 신비한 딥러닝 이야기
알아두면 쓸데있는 신비한 딥러닝 이야기
Kwangsik Lee
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
carlostorres15106
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
More Related Content
More from Kwangsik Lee
MLAAS(Machine Learning As A Service) 기술관점 분석
MLAAS(Machine Learning As A Service) 기술관점 분석
Kwangsik Lee
Azure ML Studio를 분석해보자.
Azure ML Studio를 분석해보자.
Kwangsik Lee
Amazon Personalize를 분석해보자.
Amazon Personalize를 분석해보자.
Kwangsik Lee
Supervisord 사용법을 간단히 알아보자!
Supervisord 사용법을 간단히 알아보자!
Kwangsik Lee
[개념정리] DB: Recovery
[개념정리] DB: Recovery
Kwangsik Lee
[개념정리] DB: Concurrency Control
[개념정리] DB: Concurrency Control
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 5 : Backpropagation
Visual AI(시각 인공지능) Lecture 5 : Backpropagation
Kwangsik Lee
Week4Visual AI(시각 인공지능) Lecture 4 : Multiple Layer Perceptron (MLP)
Week4Visual AI(시각 인공지능) Lecture 4 : Multiple Layer Perceptron (MLP)
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 3 : Optimization by Gradient Descent
Visual AI(시각 인공지능) Lecture 3 : Optimization by Gradient Descent
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 2 : Neural Networks and Preceptron
Visual AI(시각 인공지능) Lecture 2 : Neural Networks and Preceptron
Kwangsik Lee
Visual AI(시각 인공지능) Lecture 1 : 최신 Trend 소개
Visual AI(시각 인공지능) Lecture 1 : 최신 Trend 소개
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week5
Coursera Machine Learning으로 기계학습 배우기 : week5
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week4
Coursera Machine Learning으로 기계학습 배우기 : week4
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week3
Coursera Machine Learning으로 기계학습 배우기 : week3
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week2
Coursera Machine Learning으로 기계학습 배우기 : week2
Kwangsik Lee
[논문분석] Segmentation based lyrics-audio alignment using dynamic programming
[논문분석] Segmentation based lyrics-audio alignment using dynamic programming
Kwangsik Lee
Coursera Machine Learning으로 기계학습 배우기 : week1
Coursera Machine Learning으로 기계학습 배우기 : week1
Kwangsik Lee
CycleGAN이 무엇인지 알아보자
CycleGAN이 무엇인지 알아보자
Kwangsik Lee
알아두면 쓸데있는 신비한 딥러닝 이야기
알아두면 쓸데있는 신비한 딥러닝 이야기
Kwangsik Lee
More from Kwangsik Lee
(19)
MLAAS(Machine Learning As A Service) 기술관점 분석
MLAAS(Machine Learning As A Service) 기술관점 분석
Azure ML Studio를 분석해보자.
Azure ML Studio를 분석해보자.
Amazon Personalize를 분석해보자.
Amazon Personalize를 분석해보자.
Supervisord 사용법을 간단히 알아보자!
Supervisord 사용법을 간단히 알아보자!
[개념정리] DB: Recovery
[개념정리] DB: Recovery
[개념정리] DB: Concurrency Control
[개념정리] DB: Concurrency Control
Visual AI(시각 인공지능) Lecture 5 : Backpropagation
Visual AI(시각 인공지능) Lecture 5 : Backpropagation
Week4Visual AI(시각 인공지능) Lecture 4 : Multiple Layer Perceptron (MLP)
Week4Visual AI(시각 인공지능) Lecture 4 : Multiple Layer Perceptron (MLP)
Visual AI(시각 인공지능) Lecture 3 : Optimization by Gradient Descent
Visual AI(시각 인공지능) Lecture 3 : Optimization by Gradient Descent
Visual AI(시각 인공지능) Lecture 2 : Neural Networks and Preceptron
Visual AI(시각 인공지능) Lecture 2 : Neural Networks and Preceptron
Visual AI(시각 인공지능) Lecture 1 : 최신 Trend 소개
Visual AI(시각 인공지능) Lecture 1 : 최신 Trend 소개
Coursera Machine Learning으로 기계학습 배우기 : week5
Coursera Machine Learning으로 기계학습 배우기 : week5
Coursera Machine Learning으로 기계학습 배우기 : week4
Coursera Machine Learning으로 기계학습 배우기 : week4
Coursera Machine Learning으로 기계학습 배우기 : week3
Coursera Machine Learning으로 기계학습 배우기 : week3
Coursera Machine Learning으로 기계학습 배우기 : week2
Coursera Machine Learning으로 기계학습 배우기 : week2
[논문분석] Segmentation based lyrics-audio alignment using dynamic programming
[논문분석] Segmentation based lyrics-audio alignment using dynamic programming
Coursera Machine Learning으로 기계학습 배우기 : week1
Coursera Machine Learning으로 기계학습 배우기 : week1
CycleGAN이 무엇인지 알아보자
CycleGAN이 무엇인지 알아보자
알아두면 쓸데있는 신비한 딥러닝 이야기
알아두면 쓸데있는 신비한 딥러닝 이야기
Recently uploaded
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
carlostorres15106
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Pooja Nehwal
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Patryk Bandurski
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Memoori
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
Neo4j
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
soniya singh
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
Recently uploaded
(20)
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Slack Application Development 101 Slides
Slack Application Development 101 Slides
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
[개념정리] DB: Indexing과 Hashing
1.
DB:Indexing과Hashing개념정리 1
2.
Outline BasicConcepts OrderedIndices B+TreeIndexFiles B‑TreeIndexFiles StaticHashing DynamicHashing ComparisonofOrderedIndexingandHashing Multiple‑keyAccess BitmapIndex 2
3.
BasicConcepts 인덱싱메카니즘은찾는데이터Access부스트 SearchKey는파일에서레코드를찾는attribute 인덱스파일의레코드는아래와같이구성됨 인덱스파일은원본파일에비해훨씬작음 인덱스는2가지종류가있음 Ordered인덱스 searchkey가순서대로저장 Hash인덱스 searchkey가Bucket들에해시함수를이용해분산되어저장 3
4.
OrderedIndices 인덱스entry는순차적으로저장됨 만약파일의레코드가순차적으로정렬되어있다면primaryindex는 searchkey가순차적으로저장된파일임;다른말로clusteringindex라 고부름 실제원본파일의순서와다르게searchkey가독자적인순서를가지는것 을secondaryindex라고부럼;다른말로non‑clusteringindex라고 부름 4
5.
PrimaryIndex:DenseIndexFiles 5
6.
PrimaryIndex:SparseIndexFiles 6
7.
PrimaryIndex:MultilevelIndex 7
8.
SecondaryIndex 8
9.
B+TreeIndexFiles(1/2) indexedsequentialfile은파일이커짐에따라성능이저하됨(블럭오버 플로우,주기적재구성) b+트리의장점:자동으로insert/delete시reorganize함 b+트리의단점:추가적인insert/delete공간오버헤드 b+트리의장점이단점을압도함 9
10.
B+TreeIndexFiles(2/2) 모든leaf는같은길이를가짐 루트나리프가아닌노드는n/2~n사이자식을가짐 리프노드는(n‑1)/2~n‑1개의값을가짐 루트는반드시2개이상의자식을가져야함 10
11.
B+TreeNodeStructure K는SearchKeyValue P는포인터 SearchKey는순차적임 11
12.
LeafNodesinB+Trees 리프노드구성 이름순서에따라Searchkey정렬된예제 12
13.
Non‑LeafNodesinB+Trees 13
14.
ExampleofaB+Tree(1/2) 아래와같이이름순으로정렬되어있음 14
15.
ExampleofaB+Tree(2/2) 아래는n=6인b+트리(Pn이최대6이라생각하면됨) 리프노드는n‑1/2~n‑1이니까3~5의값을지님 non리프노드는n/2~n이니까3~6의자식을지님 15
16.
QueriesOnB+‑Trees searchkey값이k인모든레코드를찾아라 1.루트노드에서시작 2.만약위의포인터가자식노드가아니라면위의절차를반복한다. 3.자식노드에도달하면Ki=k라면Pi를따라서레코드를찾는다.Ki!=k라면 조건에맞는레코드가없다는뜻이다. 16
17.
BTreeIndexFiles(1/3) B+트리와유사하지만B트리는searchkey값이딱1번만등장해야함; 중복된key값은삭제 17
18.
BTreeIndexFiles(2/3) 18
19.
BTreeIndexFiles(3/3) B트리의장점 b+보다더적은tree노드를가질수있음 searchkey값을leaf노드까지가지않더라도얻을수있는확률 B트리의단점 일찍발견되는SearchKey양이적음 non리프노드가커지고fan‑out이감소됨,따라서B+트리보다 depth가깊어짐 Insert/Delete가B+트리보다더복잡함 B구현이더어려움 일반적으로B트리의장점이단점을이기지못함 19
20.
StaticHashing 버킷은하나이상의레코드의단위 해시함수에의해버킷이구해짐 서로다른searchkey가같은버킷에기록될수있음;따라서버킷안에서 순차적으로검색해야함 20
21.
HashOrganizationofinstructorFile 21
22.
HandlingofBucketOverflows 22
23.
HashIndices 해싱은file구조화에도쓰고색인구조생성에도사용 23
24.
ExampleofHashIndex 24
25.
DeficienciesofStaticHashing staticHashing에서는고정된버킷주소로만맵핑함 시간에따라특정버킷이너무작거나너무클수있음 반대로db가줄어들면버킷공간이낭비됨 대안으로주기적으로compaction하는것인데비용이비쌈 이러한문제는dynamichashing으로해결가능 25
26.
DynamicHashing db크기가늘거나줄어는데효과적인방법 해시함수가dynamic하게바꾸어줌 26
27.
ExtendableHashStructure 27
28.
UseofExtendableHashStructure 유튜브강의참고 각버킷j는값ij를저장 searchkeyk로버킷을지정하는방법은 computeh(k)=X X에서의높은i비트를버킷주소테이블로사용 searchkeyk에insert하기 위와같은절차를거침 버킷에여유가있으면Insert 버킷에여유가없으면split이후insert 28
29.
UpdatesinExtendableHashStructure(1/2) 스플릿절차에대해알아보자. ifi>ij(morethanonepointertobucketj) 새로운버킷z를할당하고ij와iz를ij+1에이어붙임 기존에j를가리키던절반을z로옮김 지우고다시bucketj에기록 k에대한버킷을다시계산하고insert ifi=ijij(onlyonepointertobucketj) i를증가하고bucket주소테이블을2배로만ㄷ름 각엔트리를각버킷으로양분함 버킷주소를재계산 29
30.
UpdatesinExtendableHashStructure(2/2) 삭제시절차를알아보자. 버킷을확인하고지움 만약엔트리가비게되면버킷자체를지움 버킷병합이가능함 버킷주소테이블의감소도가능함 30
31.
UseofExtendableHashStructure:Example(1/7)#1 각과이름이저렇게비트가구성되어있다. 여기서insert를시도하면hashprefix도0이고bucket1도0이라hash prefix값을+1한다. 31
32.
UseofExtendableHashStructure:Example(1/7)#2 32
33.
UseofExtendableHashStructure:Example(2/7) 3개insert를시도함 music은최상위비트0이니위에insert comp와finance는최상위비트1이니밑에insert 33
34.
UseofExtendableHashStructure:Example(3/7)#1 여기서다시physicsinsert를시도하면최상위비트가1이라overflow 1번째버킷을쪼개고다시hashprefix2로늘임 관련된버킷계산을다시함(music은해당없음) 최상위10:finance,physic 최상위11:computer 34
35.
UseofExtendableHashStructure:Example(3/7) #2 35
36.
UseofExtendableHashStructure:Example(4/7)#1 physicsinsert시도하면10overflow hashprefix3으로만듦 관련된버킷재계산 100:physics 101:finance historyinsert,11에속함 36
37.
37
38.
UseofExtendableHashStructure:Example(5/7)#1 compinsert시overflow 관련버킷재계산 111:computer 110:history 38
39.
UseofExtendableHashStructure:Example(5/7) #2 39
40.
UseofExtendableHashStructure:Example(6/7) 11개레코드insert후결과 40
41.
UseofExtendableHashStructure:Example(7/7)#1 elecinsert후결과 41
42.
UseofExtendableHashStructure:Example(7/7)#2 42
43.
ExtendableHashingvs.OtherSchemes extendablehashing의장점 hash퍼포먼스가파일증가에영향을받지않음 최소한의공간오버헤드 extendablehashing의단점 원하는레코드를찾는데추가의level이필요 bucket주소테이블이커질수있음(메모리보다크게) 버킷주소테이블크기의변경은비싼연산임 43
44.
OrderedIndexingvs.Hashing 44
45.
Multiple‑KeyAccess Usemultipleindicesforcertaintypesofqueries SELECT ID FROM instructor WHERE
dept_name = “Finance” and salary = 80000 Possiblestrategiesusingindicesonsingleattributes: 1.Useindexondept_nametofindallinstructorsintheFinance department;testsalary=80000 2.Useindexonsalarytofindallinstructorswithsalaryof $80000;testdept_name=“Finance” 3.Usedept_nameindextofindpointerstoallrecordspertainingto theFinancedepartment.Similarlyuseindexonsalary.Take intersectionofbothsetsofpointersobtained 45
46.
IndicesonMultipleAttributes 46
47.
BitmapIndices bitmap은다중key조회를효과적으로처리하기위한타입 관계가있는레코드는순차적이라가정함 주어진숫자n은n개의레코드를손쉽게얻어야함 상대적으로작은카디널리티에쓸수있음 비트맵은비트배열임 47
48.
UseofBitmapIndices:Example 아래와같은비트를AND/OR/NOT연산해서검색하면됨 48
49.
BitmapIndices bitmap은multipleattribute에유용함 and/or/not연산에유용함 아래와같은예제가가능 malesandL1(10010and10100=10000) 조건에맞는row수셀때더빠름 49
Download now