
Hbase Data Model์ ๋ํด

- Hbase๋ Data๋ฅผ Table ํํ๋ก ์ ์ฅํ๋ค.
Tables
Row
- ํ๋์ Row Key์ ์ฌ๋ฌ๊ฐ์ Column์ผ๋ก ๊ตฌ์ฑ๋์ด ์๋ค.
- Row๋ค์ ์ด๋ฆ์์ผ๋ก ์ ๋ ฌ๋์ด ์ ์ฅ๋๋ค.
Column
- Column์
Column Family
์ Column Qualifier
๋ก ๊ตฌ์ฑ๋์ด ์๊ณ ๊ตฌ๋ถ์๋ :
๋ฅผ ์ฌ์ฉํ๋ค.
Column Families
- ์ข์ Disk I/O์ ์ํด ์ฌ๋ฌ Column๋ค์ ๋ฌผ๋ฆฌ์ ์ผ๋ก ๊ฐ๊น๊ฒ ์ ์ฅํ๋ค.
- ๊ฐ๊ฐ์ Column Family๋ Storage ๊ด๋ จ ์ค์ ํ์ผ์ ๊ฐ์ง๊ณ ์๋ค.
- ๋ฉ๋ชจ๋ฆฌ์ Cache Option
- ์์ถ Option
- Row Key๋ฅผ ์ธ์ฝ๋ฉ Option
- ํ
์ด๋ธ๋ด์ ๊ฐ๊ฐ์ Row๋ ๊ฐ์ Column Families๋ฅผ ๊ฐ์ง๊ณ ์๋ค.
Column Qualifiers
- Data์ ์ถ๊ฐ์ ์ผ๋ก Index๋ฅผ ํ๊ธฐ ์ํด Column Family์ ์ถ๊ฐํ๋ค.
- ํ
์ด๋ธ์ด ์์ฑ๋ ๋ Column Family๊ฐ ๊ณ ์ ์ ์ด๋๋ผ๋
- Column Qualifiers๋ ์ ๋์ ์ผ๋ก ๋ค๋ฃฐ ์ ์๋ค.
Cell
- Row
- Column Family, Qualifier
- Value
- TimeStamp๋ก ์ด๋ฃจ์ด์ ธ์๋ค.
Timestamp
- value์ ํจ๊ป ๊ฐ์ด ์์ฑ๋๋ค.
- ๊ธฐ๋ณธ์ ์ผ๋ก RegionServer์ ๋ฐ์ดํฐ๊ฐ ์ถ๊ฐ๋ ์๊ฐ์ ์๋ฏธํ๋ค.
- ์ค์ ์ผ๋ก ํ์์คํฌํ์ ์ฐ์ฌ์ง ๊ฐ์ ๋ค๋ฅด๊ฒ ํ ์ ์๋ค.
Example
๋
ผ๋ฆฌ์ ์ธ ๋ชจ์ต

- ์ค๊ฐ์ค๊ฐ ๋น ๊ณต๊ฐ์ ๋ณผ ์ ์๋ค.
- ํ์ง๋ง ์ค์ ๋ก ์ ์ฅํ ๋์๋ ๋น ๊ณต๊ฐ์ ์๊ธฐ์ง ์๋๋ค.
Multi-dimensional Map
{
"com.cnn.www": {
contents: {
t6: contents:html: "<html>..."
t5: contents:html: "<html>..."
t3: contents:html: "<html>..."
}
anchor: {
t9: anchor:cnnsi.com = "CNN"
t8: anchor:my.look.ca = "CNN.com"
}
people: {}
}
"com.example.www": {
contents: {
t5: contents:html: "<html>..."
}
anchor: {}
people: {
t5: people:author: "John Doe"
}
}
}
๋ฌผ๋ฆฌ์ ์ผ๋ก ์ด๋ป๊ฒ ์ ์ฅํ ๊น?
- column Family๋ก ์ ์ฅํ๋ค.
column Family : anchor

column Family : contents

Reference