TAILIEUCHUNG - Hướng dẫn học Microsoft SQL Server 2008 part 48

và cho phép khai báo XML biến và sử dụng chúng như là các thông số và giá trị trả lại. XQuery là một ngôn ngữ W3C khuyến cáo tạo ra để truy vấn và các tài liệu XML định dạng. XQuery có thể được sử dụng để truy vấn tài liệu XML giống như một truy vấn SQL được sử dụng để lấy thông tin từ các bảng quan hệ. Các kiểu dữ liệu XML thực hiện một tập hợp giới hạn của đặc tả XQuery và truy vấn một T-SQL có thể sử dụng XQuery để lấy thông. | Part III Beyond Relational The following script adds the level to the WHERE cause of the previous script and finds only those members of the Information Servies Department who report directly to Jean DECLARE @ManagerNode HierarchyID @ManagerLevel INT SELECT @ManagerNode OrganizationNode @ManagerLevel OrganizationLevel FROM WHERE OrganizationNode 5 -- Jean Trenary - IT Manager SELECT as Name OrganizationNode as OrganizationLevel FROM E JOIN P ON WHERE @ManagerNode 1 AND Result Busines OrganizationLevel @ManagerLevel 1 sEntityID Name OrganizationLevel 264 - Stephanie Conroy 5 1 2 267 Karen Berg 5 2 2 268 Ramesh Meyyappan 5 3 2 269 Dan Bacon 5 4 2 270 Francois Ajenstat 5 5 2 271 Dan Wilson 5 6 2 272 Janaina Bueno 5 7 2 Inserting new nodes Inserting the root node into a HierarchyID hierarchy must start with the binary root node. The getroot method returns a root node value. Inserting additional nodes into HierarchyID s relative node position hierarchy first requires determining which nodes are already there. The GetDescendant method can be used to generate the next node position. You can download additional hierarchical sample code from . Performance The HierarchyID data type is a compact data type optimized for storing relative node postion. As such it takes less space than a character-based materialized path. The HierarchyID node column should be indexed which will aid subtree-type searches. There are specific Query Optimizer optimizations for indexing and HierarchyID but I have found that materialized path is still slightly faster than HierarchyID. 432 Traversing Hierarchies 17 If the searches are primarily along a specific level then another index keyed by level column and the .

TÀI LIỆU MỚI ĐĂNG
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.