โ B+ Trees โ
์ธ๋ฑ์ค
2. Properties
- ์ ๋ ฌ๋์ด ์๊ณ ์์ ์์ฑ์ ๊ฐ์ง๊ณ ์๊ธฐ ๋๋ฌธ์ ํธ๋ฆฌ ์๋๋ก leaf๋ฅผ ์ํํ๋ฉด์ ์ํ๋ ํน์ record๋ฅผ ์ฐพ์ ์ ์๋ค (BSTs, binary search trees์ ๋น์ทํจ)
5. Sorting Records
Alternative 1: By Value
- leaf pages = data pages
- ๋ ์ฝ๋์ ๋ํ ํฌ์ธํฐ๋ฅผ๊ฐ ์๋ ์ค์ ๋ก ๋ ์ฝ๋๋ฅผ ๊ฐ์ง๊ณ ์๋ค
- ๊ตฌํํ๊ธฐ ์ฝ์ง๋ง ๊ฐ์ ํ์ผ์ multiple indexes๋ฅผ ๋ง๋ค ์ ์๋ค๋ ๋จ์ ์ด ์๋ค
Alternative 2: By Reference
- leaf pages๋ ํด๋นํ๋ ๋ ์ฝ๋์ ํฌ์ธํฐ๋ฅผ ๊ฐ์ง๊ณ ์๋ค
- multiple indexes๊ฐ ๊ฐ๋ฅํ๋ค
Alternative 3: By List of References
- leaf pages๋ ํฌ์ธํฐ ๋ฆฌ์คํธ๋ฅผ ๊ฐ์ง๊ณ ์๋ค
6. Clustering
๋ฐ์ดํฐ ํ์ด์ง์ ๋ฐ์ดํฐ๊ฐ ์ด๋ป๊ฒ ์ ๋ฆฌ๋์ด ์๋์ง
unclustered
- ์ ๋๋์ด ์์ง ์๋ค
clustered
- ๋ฐ์ดํฐ ํ์ด์ง๊ฐ B+ tree์ ์ธ๋ฑ์ค์ ๊ฐ์ด ์ ๋ ฌ๋์ด ์๋ค. ์ธ์ ํ ํค๋ฅผ ๊ฐ์ง๊ณ ์๋ 2๊ฐ์ ๋ ์ฝ๋๋ ๊ฐ์ ํ์ด์ง์ ์์นํ ํ๋ฅ ์ด ํฌ๊ธฐ ๋๋ฌธ์ 2๋ฒ์งธ ๋ ์ฝ๋๋ฅผ ์ฝ์ ๋๋ ์บ์๋ ํ์ด์ง์์ ๊ฐ์ ธ์ค๋ฉด ๋๋ค
- unclustered ์ธ๋ฑ์ค์ ๋น๊ตํด์ clustered ์ธ๋ฑ์ค๋ ๋ฒ์ ํ์์ ์ ๋ฆฌํ์ง๋ง ์ ์งํ๋ ๋น์ฉ์ด ๋ ํฌ๋ค
7. Counting IO's
- 1. read the appropriate root-to-leaf-path
- 2. read the appropriate data page(s)
- 3. write data page
- 4. update index page(s)
'์คํฐ๋ > ๋ฐ์ดํฐ๋ฒ ์ด์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[CS186] Introduction to Database Systems - Week 6 (0) | 2023.06.03 |
---|---|
[CS186] Introduction to Database Systems - Week 5 (0) | 2023.05.27 |
[CS186] Introduction to Database Systems - Week 4 (0) | 2023.05.20 |
[CS186] Introduction to Database Systems - Week 2 (0) | 2023.05.06 |
[๋ฐ์ดํฐ๋ฒ ์ด์ค ์์คํ ] Relational Languages (1) | 2023.04.15 |
๋๊ธ