Method and system for multi-entry and multi-template matching in a database
First Claim
1. A method for searching items in a database, the database storing a plurality of items, each item comprising a plurality of entries, the method comprising:
- receiving a request including a take or read operation, a number of desired items and a multi-template comprised of a plurality of templates;
selecting an item in the database to compare to the multi-template;
comparing the multi-template to one of the items in the database by comparing each template in the multi-template with the entries in the one of the items to determine if each template has a matching entry, each entry being allowed to match more than one template;
returning the one of the items when a match is determined by the comparison;
removing the matching item from the database when the request includes a take operation;
repeating the selecting and comparing steps until the number of matching items found equals the desired number of items in the request or all items in the database have been compared; and
returning a null value when a match is not determined as a result of the comparison.
0 Assignments
0 Petitions
Accused Products
Abstract
A database system wherein one or more entry databases store a plurality of entries. Each entry is of a given type that defines the fields of the entry. Each field contains or identifies an object with associated attributes or data. The type of each entry may further define behavior in the form of methods the entry can implement. An entry type which is a subtype of another inherits all fields and behavior of its super-type, and contains additional fields and/or defines new/modified behavior. Entries may be expressed in a Java™ programming language. The database system may further employ a search engine which allows queries to be made upon entries in the database. In one implementation, the queries include a read operation, a take operation, and a notify operation. Each query request includes a command indicating the type of operation, and a template which is an entry object having some or all of its fields set to specific values that must be matched exactly. Other fields of the template entry may be specified as wildcards, whose values do not matter. The search engine may further be configured to create an index for caching entries having characteristics which are commonly specified by queries. In one implementation, the databases may also store sets of entries which are matched using sets of templates.
166 Citations
3 Claims
-
1. A method for searching items in a database, the database storing a plurality of items, each item comprising a plurality of entries, the method comprising:
-
receiving a request including a take or read operation, a number of desired items and a multi-template comprised of a plurality of templates;
selecting an item in the database to compare to the multi-template;
comparing the multi-template to one of the items in the database by comparing each template in the multi-template with the entries in the one of the items to determine if each template has a matching entry, each entry being allowed to match more than one template;
returning the one of the items when a match is determined by the comparison;
removing the matching item from the database when the request includes a take operation;
repeating the selecting and comparing steps until the number of matching items found equals the desired number of items in the request or all items in the database have been compared; and
returning a null value when a match is not determined as a result of the comparison. - View Dependent Claims (2, 3)
determining whether a selected entry is the same type or subtype of a selected template;
comparing the fields of the selected entry of the same type or subtype of the selected template with the corresponding fields of the selected template which are not wildcard fields;
determining whether the data associated with each field of the selected entry matches the data of the corresponding fields of the selected template; and
indicating a match when the data of all fields of the selected entry match those of the selected template.
-
-
3. The method of claim 2, wherein at least one field of the selected template specifies a range of values in which the data of a corresponding field in the selected entry must lie to result in a match.
Specification