concept HierarchyId in category sql

This is an excerpt from Manning's book SQL Server MVP Deep Dives Vol. 2.
Because HierarchyId is a SQL CLR type, all its methods are case sensitive.
The next important part of understanding the power of HierarchyId is its internal organization. Let’s look at HierarchyId storage, which is in binary format. The size of a node varies from 3 to 856 bytes depending on the hierarchy level. Creating an index on a HierarchyId field sometimes can cause the following warning message: “Index key size is more than 892. Some data cannot be inserted into this index.” Don’t worry. You’ll never face this problem, because storage of HierarchyId data is extremely optimized and, in most cases, the key size won’t be too big. But you must know what size your field is and how big it can be in your database. The following information will help you to deal with it.
The best way to understand this idea is to create a table with HierarchyId data and examine this data. The script for creating the table and inserting the test data is shown in the following listing.
Listing 1. Creating and populating a table with a HierarchyId field
CREATE TABLE Categories ( Id int IDENTITY(1,1) NOT NULL, Node hierarchyid NOT NULL, Name nvarchar(100) NULL, IsShowOnSite bit NOT NULL, CONSTRAINT PK_CATEGORIES_ID PRIMARY KEY(Id) ) GO INSERT INTO Categories VALUES ('/1/', N'Automobiles', 1), ('/2/', N'Animals and Pets', 1), ('/1/1/', N'Autos for Sale', 1), ('/1/2/', N'Autos Wanted', 1), ('/1/1.5/', N'Auto Service', 1), ('/1/1/1/', N'Classic Cars', 1), ('/1/1/2/', N'Sedans', 1), ('/1/1/3/', N'Trucks', 1), ('/1/1/1.2/', N'Motorcycles', 1), ('/2/1/', N'Birds', 1), ('/2/2/', N'Dogs and Puppies', 1), ('/2/3/', N'Cats and Kittens', 1) GO