Explain pipelining approach of evaluation of expression in detail.

 Pipelining

In this method, DBMS does not store the records in temporary tables. Instead, it queries each query and the result of which will be passed to the next query to process and so on. It will process the query one after the other and each will use the result of the previous query for its processing. Pipelining evaluates multiple operations simultaneously by passing the results of one operation to the next one without storing the tuples on the disk.

In the example of figure 3.6, all three operations can be placed in a pipeline, which passes the results of the selection to the join as they are generated. In turn, it passes the results of the join to the projection as they are generated. The memory requirements are low since the results of an operation are not stored for long. However, as a result of pipelining, the inputs to the operations are not available all at once for processing.

Creating a pipeline of operations can provide two benefits:

  •  It eliminates the cost of reading and writing temporary relations, reducing the cost of query evaluation.
  • It can start generating query results quickly if the root operator of a query evaluation plan is combined in a pipeline with its inputs. This can be quite useful if the results are displayed to a user as they are generated, since otherwise there may be a long delay before the user sees any query results.

Implementation of pipelining


1. Demand-driven (or Lazy evaluation) pipelining: 

In this method, the result of lower-level queries is not passed to the higher level automatically. It will be passed to a higher level only when it is requested by the higher level. In this method, it retains the result value and state with it and it will be transferred to the next level only when it is requested.

2. Producer-driven (or Eager) pipelining: 

In this method, the lower-level queries eagerly pass the results to higher-level queries. It does not wait for the higher-level queries to request the results. In this method, the lower-level query creates a buffer to store the results and the higher-level queries pull the results for its use. If the buffer is full, then the lower-level query waits for the higher-level query to empty it. Hence it is also called PULL and PUSH pipelining.

Comments

Popular posts from this blog

Suppose that a data warehouse for Big-University consists of the following four dimensions: student, course, semester, and instructor, and two measures count and avg_grade. When at the lowest conceptual level (e.g., for a given student, course, semester, and instructor combination), the avg_grade measure stores the actual course grade of the student. At higher conceptual levels, avg_grade stores the average grade for the given combination. a) Draw a snowflake schema diagram for the data warehouse. b) Starting with the base cuboid [student, course, semester, instructor], what specific OLAP operations (e.g., roll-up from semester to year) should one perform in order to list the average grade of CS courses for each BigUniversity student. c) If each dimension has five levels (including all), such as “student < major < status < university < all”, how many cuboids will this cube contain (including the base and apex cuboids)?

Suppose that a data warehouse consists of the four dimensions; date, spectator, location, and game, and the two measures, count and charge, where charge is the fee that a spectator pays when watching a game on a given date. Spectators may be students, adults, or seniors, with each category having its own charge rate. a) Draw a star schema diagram for the data b) Starting with the base cuboid [date; spectator; location; game], what specific OLAP operations should perform in order to list the total charge paid by student spectators at GM Place in 2004?

Explain network topology .Explain tis types with its advantages and disadvantges.