Abstract
We explore a new form of view rewrite called view disassembly. The objective is to rewrite views in order to “remove” certain sub-views (or unfoldings) of the view. This becomes pertinent for complex views which may be defined over other views and which may involve union. Such complex views arise necessarily in environments such as data warehousing and mediation over heterogeneous databases. View disassembly can be used for view and query optimization, preserving data security, making use of cached queries and materialized views, and view maintenance. We provide computational complexity results of view disassembly. One question is whether the unfoldings to be removed effectively cover the view, meaning that the disassembled view is effectively the empty view, evaluating to the empty table. We illustrate the complexity to determine when a collection of unfoldings cover the view definition. The problem is NP- hard with respect to the number of unfoldings to remove, but not with respect to the size (complexity) of the view definition. We next consider rewrites optimal in the size of the rewritten (disassembled) view. We prove that this task is NP- hard for a special class of views, but this time NP- hard in a worse way: it is NP- hard this time with respect to the size of the view definition in addition to the number of unfoldings to be removed. In general, we suspect the problem is computationally even harder, and we show that the general problem is in Π 2 p . However, we provide good news too. We identify a pertinent class of unfoldings for which the removal of such unfoldings always results in a simpler disassembled view than the original view itself. We also develop an algorithm that finds rewrites equivalent to the disassembled view which are, in a sense, locally optimal. The algorithm establishes a cover completion by finding a (minimal) collection of unfoldings of the view that, along with the unfoldings to be removed, covers the original view. This approach is effectively tractable, unlike the search for globally, or absolutely, optimal rewrites. Furthermore, we show that these cover-completion rewrites are preferable to absolutely optimal rewrites in many ways.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.