My current application was built up in SQL Server 2008
server in JAVA
with Hibernate
and I had used HierarchyId
data type for department hierarchy in my database.
I had written SQL queries to deal with HierarchyId datatype. And I also have n-Level
of department tree structure.
Now I want to change my Database server from SQL Server 2008
to MySQL
as per business requirement.
After feasibility checking I came with the solution that my whole application will migrate to MySQL database server except HierarchyId
data type.
So my main challenge is to find alternate solution of HierarchyId
data type with the minimal change in coding.
What is the best way to implement department hierarchy in my database?
Thanks...