TAILIEUCHUNG - Keyword Search in Databases- P20

Keyword Search in Databases- P20:Conceptually, a database can be viewed as a data graph GD(V ,E), where V represents a set of objects, and E represents a set of connections between objects. In this book, we concentrate on two kinds of databases, a relational database (RDB) and an XML database. In an RDB, an object is a tuple that consists of many attribute values where some attribute values are strings or full-text; there is a connection between two objects if there exists at least one reference from one to the other | 94 4. KEYWORD SEARCH IN XML DATABASES Algorithm 32 IndexedLookupEager S1 Si Input l lists of Dewey IDs Si is the list of Dewey IDs of the nodes containing keyword k . Output All the SLCAs 1 V 2 while there are more nodes in Si do 3 Read p nodes of Si into buffer B 4 for i 2 to l do 5 B getSLCA B Si 6 removeFirstNode B if v _ and getFirstNode B x v 7 output v as a SLCA if v _ B _ 0 and v getFirstNode B 8 if B _ 0 then 9 v removeLastNode B 10 output B as SLCA nodes 11 output v as a SLCA 12 Procedure getSLCA Si S2 13 Result 0 u root with Dewey ID 0 14 for each node v e Si in increasing Dewey ID order do 15 x lca v closest v S2 16 if pre u pre x then 17 Result Result U u if u x 18 u X 19 return Result U u ScanEager p at Line 3 must be no smaller than Si . it must first compute slca Si S2 then slca slca Si S2 S3 and continue. ScanEager directly follows from Property Property Property . ScanEager outputs all the SLCA nodes . slca Si Si in time O ld Si d y l_2 Si or O ld S Xu and Papakonstantinou 2005 . Although ScanEager has the same time complexity as StackAlgorithm it has two advantages. First ScanEager starts from the smallest keyword list and it does not have to scan to the end of every keyword list and may terminate much earlier. Second the number of lca operations of ScanEager is O l Si which is usually much less than that of the StackAlgorithm that has OQ2i_i Si lca operations. Multiway SLCA MultiwaySLCA Sun et al. 2007 further improves the performance of IndexedLookupEager but with the same worst case time complexity. The Motivation and general idea of MultiwaySLCA are shown by the following example. . SLCA-BASED SEMANTICS 95 Algorithm 33 ScanEager Si Si Input l lists of Dewey IDs Si is the list of Dewey IDs of the nodes containing keyword k . Output All the SLCAs 1 u root with Dewey ID 0 2 for each node Vi e Si in increasing Dewey ID order do 3 moving cursors in each list S to closest vi Si for 1 i l 4 V lca vi closest vi S2 closest vi Si 5

TỪ KHÓA LIÊN QUAN
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.