Why are trees useful for semi-structured data such as XML and JSON?
4 phương ánCó giải thích
Các phương án trả lời
Chọn một phương ánLời giảiChọn phương án để mở
Đáp án đúng: "Trees take advantage of the parent-child relationship of the data for easy navigation". Dữ liệu bán cấu trúc như XML và JSON có tính lồng nhau: một phần tử XML chứa phần tử con, một đối tượng JSON chứa đối tượng hay mảng con, nên biểu diễn thành cây với quan hệ cha con là tự nhiên; nhờ đó có thể duyệt theo đường dẫn từ gốc xuống như XPath hay JSONPath, tìm cha, con, anh em của một nút. "Computers can easily visualize the data with a tree structure" nói về việc hiển thị, trong khi lợi ích cốt lõi là điều hướng và truy vấn theo cấu trúc chứ không phải vẽ cho đẹp. "It is not always the case that XML and JSON can be represented as trees" sai vì tài liệu XML hợp lệ và giá trị JSON đều có cấu trúc lồng nhau nên luôn biểu diễn được thành cây. Phương án cho rằng cây chỉ hữu ích với XML vì "JSON does not contain a tree-like structure as it contains arrays" sai vì mảng JSON chỉ là một nút có các con được đánh thứ tự, vẫn nằm trong cây.
Cùng phần 4
Which data format is optimized for read-heavy operations?Có lời giảiCâu hỏiSuppose a registration website creates data with the following fields for each person registered (note: if the user does not input a value, NULL is stored instead): Name, Date, Address, and Account Number.
Suppose we collect data month by month. Each month, we would have a batch of data containing the fields listed above. At the end of the year, we want to summarize our registrant activities for the entire year, so we would remove redundancies in our data by removing any records with duplicate account numbers from month to month. What type of operation do we use in this scenario?Có lời giảiCâu hỏiWhat's the relationship between modeling data and its format?Có lời giảiCâu hỏiCả 11 câu của chủ đề11 câu
Xuất hiện trong 1 bộ đề
Đi tiếp từ đây