• Cơ sở dữ liệu - Chapter 20: Database system architecturesCơ sở dữ liệu - Chapter 20: Database system architectures

    Shared memory contains shared data ● Buffer pool ● Lock table ● Log buffer ● Cached query plans (reused if same query submitted again) ■ All database processes can access shared memory ■ To ensure that no two processes are accessing the same data structure at the same time, databases systems implement mutual exclusion using either ● Operat...

    pdf37 trang | Chia sẻ: huyhoang44 | Ngày: 16/03/2020 | Lượt xem: 711 | Lượt tải: 0

  • Cơ sở dữ liệu - Chapter 19: Information retrievalCơ sở dữ liệu - Chapter 19: Information retrieval

    Solution: use number of hyperlinks to a site as a measure of the popularity or prestige of the site ● Count only one hyperlink from each site (why? ­ see previous slide) ● Popularity measure is for site, not for individual page  But, most hyperlinks are to root of site  Also, concept of “site” difficult to define since a URL prefix like cs....

    pdf25 trang | Chia sẻ: huyhoang44 | Ngày: 16/03/2020 | Lượt xem: 652 | Lượt tải: 0

  • Cơ sở dữ liệu - Chapter 18: Data analysis and miningCơ sở dữ liệu - Chapter 18: Data analysis and mining

    Data cleansing ● E.g. correct mistakes in addresses (misspellings, zip code errors) ● Merge address lists from different sources and purge duplicates ■ How to propagate updates ● Warehouse schema may be a (materialized) view of schema from data sources ■ What data to summarize ● Raw data may be too large to store on­line ● Aggregate values ...

    pdf52 trang | Chia sẻ: huyhoang44 | Ngày: 16/03/2020 | Lượt xem: 652 | Lượt tải: 0

  • Cơ sở dữ liệu - Chapter 17: Recovery systemCơ sở dữ liệu - Chapter 17: Recovery system

    Database buffers are generally implemented in virtual memory in spite of some drawbacks: ● When operating system needs to evict a page that has been modified, the page is written to swap space on disk. ● When database decides to write buffer page to disk, buffer page may be in swap space, and may have to be read from swap space on disk and ou...

    pdf81 trang | Chia sẻ: huyhoang44 | Ngày: 16/03/2020 | Lượt xem: 936 | Lượt tải: 0

  • Cơ sở dữ liệu - Chapter 16: Concurrency controlCơ sở dữ liệu - Chapter 16: Concurrency control

    Allow data items to be of various sizes and define a hierarchy of data granularities, where the small granularities are nested within larger ones ■ Can be represented graphically as a tree (but don't confuse with treelocking protocol) ■ When a transaction locks a node in the tree explicitly, it implicitly locks all the node's descendents in th...

    pdf79 trang | Chia sẻ: huyhoang44 | Ngày: 16/03/2020 | Lượt xem: 619 | Lượt tải: 0

  • Cơ sở dữ liệu - Chapter 15: TransactionsCơ sở dữ liệu - Chapter 15: Transactions

    Instructions l i and lj of transactions Ti and Tj respectively, conflict if and only if there exists some item Q accessed by both li and lj, and at least one of these instructions wrote Q. 1. l i = read(Q), lj = read(Q). li and lj don’t conflict. 2. l i = read(Q), lj = write(Q). They conflict. 3. l i = write(Q), lj = read(Q). They conflict...

    pdf46 trang | Chia sẻ: huyhoang44 | Ngày: 16/03/2020 | Lượt xem: 808 | Lượt tải: 0

  • Cơ sở dữ liệu - Chapter 14: Query optimizationCơ sở dữ liệu - Chapter 14: Query optimization

    Some query optimizers integrate heuristic selection and the generation of alternative access plans. ● Frequently used approach  heuristic rewriting of nested block structure and aggregation  followed by cost­based join­order optimization for each block ● Some optimizers (e.g. SQL Server) apply transformations to entire query and do not depe...

    pdf69 trang | Chia sẻ: huyhoang44 | Ngày: 16/03/2020 | Lượt xem: 735 | Lượt tải: 0

  • Cơ sở dữ liệu - Chapter 13: Query processingCơ sở dữ liệu - Chapter 13: Query processing

    Worst case estimate: b r ∗ bs + br block transfers + 2 * br seeks ● Each block in the inner relation s is read once for each block in the outer relation (instead of once for each tuple in the outer relation ■ Best case: b r + bs block transfers + 2 seeks. ■ Improvements to nested loop and block nested loop algorithms: ● In block nested­loop,...

    pdf55 trang | Chia sẻ: huyhoang44 | Ngày: 16/03/2020 | Lượt xem: 895 | Lượt tải: 0

  • Cơ sở dữ liệu - Chapter 12: Indexing and hashingCơ sở dữ liệu - Chapter 12: Indexing and hashing

    Since the inter­node connections are done by pointers, “logically” close blocks need not be “physically” close. ■ The non­leaf levels of the B+­tree form a hierarchy of sparse indices. ■ The B+­tree contains a relatively small number of levels  Level below root has at least 2*  n/2 values  Next level has at least 2*  n/2 *  n/2 values...

    pdf84 trang | Chia sẻ: huyhoang44 | Ngày: 16/03/2020 | Lượt xem: 902 | Lượt tải: 0

  • Cơ sở dữ liệu - Chapter 11: Storage and file structureCơ sở dữ liệu - Chapter 11: Storage and file structure

    Level 1 provides much better write performance than level 5 ● Level 5 requires at least 2 block reads and 2 block writes to write a single block, whereas Level 1 only requires 2 block writes ● Level 1 preferred for high update environments such as log disks ■ Level 1 had higher storage cost than level 5 ● disk drive capacities increasing rapid...

    pdf90 trang | Chia sẻ: huyhoang44 | Ngày: 16/03/2020 | Lượt xem: 817 | Lượt tải: 0