Table: dbo.Engagement_Binder_Tree_Item
This will contain the data representing the tree structure for each client. It should never be written to in client code. All writes will happen through known SQL stored procedures.
Columns
NameTypeConstraintsDescription
engagement_binder_tree_item_KEYint (4)NOT NULLPrimary key. This points to the engagment binder tree item.
client_KEYint (4)NOT NULLThis will contain the link to the client that is associated with this item. This is a non-nullable foreign key.
left_valueint (4)NOT NULLThis will contain the left bound for every item below this item in the binder tree. This column can be used to obtain the count for a tree.
right_valueint (4)NOT NULLThis will contain the right bound for every item below this item in the binder tree. This column can be used to generate the descendants of this item.
level_valueint (4)NOT NULLThis will contain the level or depth of this item in the binder tree. Client items are at level 1, binder items are at level 2, and levels 3+ are for workpaper and folder items.
folder_KEYint (4)This will contain the link to the folder that is associated with this item. If this item is not a folder then this will be null. This is a nullable foreign key.
workpaper_KEYint (4)This will contain the link to the workpaper that is associated with this item. If this item is not a workpaper then this will be null. This is a nullable foreign key.
engagement_binder_KEYint (4)This will contain the link to the engagement binder that is associated with this item. If this item is not a binder then this will be null. This is a nullable foreign key.
Primary key
NameColumnsDescription
PK_Engagement_Binder_Tree_Itemengagement_binder_tree_item_KEY
Unique constraints
NameColumnsDescription
UK_Engagement_Binder_Tree_Item$client_KEY$left_valueclient_KEY, left_value
UK_Engagement_Binder_Tree_Item$client_KEY$right_valueclient_KEY, right_value
Foreign keys
NameColumnsReferenced tableDescription
FK_Engagement_Binder_Tree_Item__Client__client_KEYclient_KEYClient (client_KEY)
FK_Engagement_Binder_Tree_Item__Engagement_Binder__engagement_binder_KEYengagement_binder_KEYEngagement_Binder (engagement_binder_KEY)
FK_Engagement_Binder_Tree_Item__Folder__folder_KEYfolder_KEYFolder (folder_KEY)
FK_Engagement_Binder_Tree_Item__Workpaper__workpaper_KEYworkpaper_KEYWorkpaper (workpaper_KEY)

Schema diagram