ClickHouse/docs/fa/sql-reference/dictionaries/external-dictionaries/external-dicts-dict-hierarchical.md
Ivan Blinkov d91c97d15d
[docs] replace underscores with hyphens (#10606)
* Replace underscores with hyphens

* remove temporary code

* fix style check

* fix collapse
2020-04-30 21:19:18 +03:00

2.5 KiB
Raw Blame History

machine_translated machine_translated_rev toc_priority toc_title
true d734a8e46d 45 لغتنامهها سلسله مراتبی

لغتنامهها سلسله مراتبی

کلیک هاوس از لغت نامه های سلسله مراتبی با یک کلید عددی.

در ساختار سلسله مراتبی زیر نگاه کنید:

0 (Common parent)
│
├── 1 (Russia)
│   │
│   └── 2 (Moscow)
│       │
│       └── 3 (Center)
│
└── 4 (Great Britain)
    │
    └── 5 (London)

این سلسله مراتب را می توان به عنوان جدول فرهنگ لغت زیر بیان شده است.

_ورود _ نواحی نام _خانوادگی
1 0 روسیه
2 1 مسکو
3 2 مرکز
4 0 بریتانیا
5 4 لندن

این جدول شامل یک ستون است parent_region که شامل کلید نزدیکترین پدر و مادر برای عنصر.

تاتر از سلسله مراتبی املاک برای فرهنگ لغت خارجی صفات. این ویژگی اجازه می دهد تا شما را به پیکربندی فرهنگ لغت سلسله مراتبی شبیه به بالا توضیح داده شد.

این حکومت دیکتاتوری تابع اجازه می دهد تا شما را به زنجیره پدر و مادر از یک عنصر.

برای مثال ما ساختار فرهنگ لغت می تواند به شرح زیر است:

<dictionary>
    <structure>
        <id>
            <name>region_id</name>
        </id>

        <attribute>
            <name>parent_region</name>
            <type>UInt64</type>
            <null_value>0</null_value>
            <hierarchical>true</hierarchical>
        </attribute>

        <attribute>
            <name>region_name</name>
            <type>String</type>
            <null_value></null_value>
        </attribute>

    </structure>
</dictionary>

مقاله اصلی