Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is there no equivalent for hierarchyid SQL data type?

I understand it that we have to map this type as binary to get to it in the application code. But why isn't there an exact equivalent with all those type methods?

How are we supposed to work with in the code? Or we aren't supposed to work with it outside SQL environment at all?

EDIT: The question extends to the geography and geometry types as well.

like image 418
User Avatar asked Jul 30 '09 04:07

User


People also ask

What are the restriction of Hierarchyid data types?

Limitations of hierarchyid The hierarchyid data type has the following limitations: A column of type hierarchyid doesn't automatically represent a tree. It is up to the application to generate and assign hierarchyid values in such a way that the desired relationship between rows is reflected in the values.

What is Hierarchyid data type in SQL Server?

The hierarchyid data type is a variable length, system data type. Use hierarchyid to represent position in a hierarchy. A column of type hierarchyid does not automatically represent a tree.

What is the ISO synonym for Ntext data type?

The ISO synonym for ntext is national text.

Which data type SQL does not support?

For example, Oracle database doesn't support DATETIME and MySQL doesn't support CLOB data type. So while designing database schema and writing SQL queries, make sure to check if the data types are supported or not.


1 Answers

The client code for the new types is installed separately by the SQL Server 2008 Feature Pack:

Microsoft SQL Server System CLR Types

The SQL Server System CLR Types package contains the components implementing the new geometry, geography, and hierarchyid types in SQL Server 2008. This component can be installed separately from the server to allow client applications to use these types outside of the server.

like image 140
Remus Rusanu Avatar answered Nov 14 '22 23:11

Remus Rusanu