Patent ID: 8150861

Claim:
A method for implementing database queries for a plurality of streams of data, comprising: receiving a plurality of streams of data, for storage in a database; for each of the plurality of streams of data, sampling that stream of data at a plurality of time intervals to capture a plurality of samples, wherein each sample corresponds to a portion of that stream of data captured during that time interval; providing a plurality of equations and equation coefficients stored in an equation analysis unit; for each of the plurality of samples, approximating that sample by selecting an equation and equation coefficients that optimally fits that sample, wherein the equation and equation coefficients for each of the plurality of samples is selected from the plurality of equations and equation coefficients stored in the equation analysis unit; storing the plurality of streams of data in the database; storing the equations and equation coefficients approximating the plurality of samples in the equation analysis unit; subsequently receiving, by a database query arbiter, a query for data which includes a join over two or more of the streams of data, for a particular time interval; determining whether to respond to the query by retrieving data from the database, or by using the equations, and when it is determined to respond using the equations, then forwarding the query to the equation analysis unit, determining, for each of the two or more streams of data, the particular time interval the query is directed to, determining, based on the particular time interval the query is directed to for each of the two or more streams of data, which equation and equation coefficients from the plurality of equation and equation coefficients fit that stream of data for that particular time interval, selecting, based on the particular time interval the query is directed to for each of the two or more streams of data, the equation and equation coefficients that fit that stream of data for that particular time interval, and simultaneously solving the selected equations to determine a response to the query; and wherein the method steps are performed by at least one processor.