Optimization of queries on a repository based on constraints on how the data is stored in the repository
First Claim
Patent Images
1. A computer-implemented method comprising:
- storing, within database objects managed by a database system, data files contained in a directory of folders, each folder of said directory of folders containing at least one data file of said data files;
in said database, storing metadata that defines plurality of constraints, wherein for each folder of said directory of folders, the plurality of constraints includes a physical constraint that specifies that storage of any data file in said each folder is restricted to at least one specified database object of said database objects;
wherein for at least two of said directory of folders, a first folder includes a first data file that is restricted by a first physical constraint of said plurality of constraints to a first database object specified by said first physical constraint and a second folder includes a second data file that is restricted by a second physical constraint of said plurality of constraints to a second database object specified by said second physical constraint;
wherein the first database object is different than the second database object;
receiving, at the database system, a query that complies with a query language;
in response to receiving said query;
based on (1) said query and (2) the plurality of constraints defined by the metadata, said database system making a determination of how data required by the query is stored in said database; and
based on the determination of how data required by the query is stored in said database, rewriting the query to generate a re-written query that specifies a restriction based on said first database object specified by said first physical constraint, wherein the received query did not specify said restriction.
0 Assignments
0 Petitions
Accused Products
Abstract
Constraints that restrict how corresponding identifiable groups of files are stored in a database, are enforced on corresponding file data. In response to a query on any data from an identifiable group of files, the effect of the constraint on how the corresponding data is stored is determined. The original query is rewritten, based on the effect of the constraint, so that the rewritten query is directed to a particular subset of the data stored in the database. Consequently, the search space is restricted to an identifiable subset of the database and execution of the rewritten query is more efficient than execution of the original query.
37 Citations
36 Claims
-
1. A computer-implemented method comprising:
-
storing, within database objects managed by a database system, data files contained in a directory of folders, each folder of said directory of folders containing at least one data file of said data files; in said database, storing metadata that defines plurality of constraints, wherein for each folder of said directory of folders, the plurality of constraints includes a physical constraint that specifies that storage of any data file in said each folder is restricted to at least one specified database object of said database objects; wherein for at least two of said directory of folders, a first folder includes a first data file that is restricted by a first physical constraint of said plurality of constraints to a first database object specified by said first physical constraint and a second folder includes a second data file that is restricted by a second physical constraint of said plurality of constraints to a second database object specified by said second physical constraint; wherein the first database object is different than the second database object;
receiving, at the database system, a query that complies with a query language;
in response to receiving said query;based on (1) said query and (2) the plurality of constraints defined by the metadata, said database system making a determination of how data required by the query is stored in said database; and based on the determination of how data required by the query is stored in said database, rewriting the query to generate a re-written query that specifies a restriction based on said first database object specified by said first physical constraint, wherein the received query did not specify said restriction. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
-
-
14. A computer-implemented method comprising:
-
storing, within database objects managed by a database system, files contained in a plurality of identifiable groups of one or more files, each identifiable group of said plurality of identifiable groups of one or more files containing at least one file of said files; in said database, storing metadata that defines a plurality of constraints, wherein for each identifiable group of one or more files of said plurality of identifiable groups, said plurality of constraints includes a physical constraint that specifies that storage of any file in said each identifiable group of one or more files is restricted to storage in a database in at least one specified database object from a group consisting of (a) a particular one or more database tables, (b) a particular one or more database table partitions, and (c) a particular one or more database views; wherein for at least two of said groups of one or more files, a first group includes a first data file that is restricted by a first physical constraint of said plurality of constraints to a first database object specified by said first physical constraint and a second group includes a second data file that is restricted by a second physical constraint of said plurality of constraints to a second database object specified by said second physical constraint; wherein the first database object is different than the second database object;
receiving, at the database system, a query that complies with a query language;
in response to receiving said query;based on (1) said query and (2) the plurality of constraints defined by the metadata, said database system making a determination of how data required by the query is stored in said database; and based on the determination on how data required by the query is stored in said database, rewriting the query to generate a re-written query that specifies a restriction based on said first database object specified by said first physical constraint, wherein the received query did not specify said group; and executing the re-written query that specifies a restriction based on said first database object. - View Dependent Claims (15, 16, 17, 18)
-
-
19. A non-transitory computer-readable medium storing instructions, which, when executed by one or more processors, cause performance of:
-
storing, within database objects managed by a database system, data files contained in a directory of folders, each folder of said directory of folders containing at least one data file of said data files; in said database, storing metadata that defines a plurality of constraints, wherein for each folder of said directory of folders, the plurality of constraints includes a physical constraint that specifies that storage of any data file in said each folder is restricted to at least one specified database object of said database objects; wherein for at least two of said directory of folders, a first folder includes a first data file that is restricted by a first physical constraint of said plurality of constraints to a first database object specified by said first physical constraint and a second folder includes a second data file that is restricted by a second physical constraint of said plurality of constraints to a second database object specified by said second physical constraint; wherein the first database object is different than the second database object; receiving, at the database system, a query that complies with a query language; in response to receiving said query; based on (1) said query and (2) the plurality of constraints defined by the metadata, said database system making a determination of how data required by the query is stored in said database; and based on the determination of how data required by the query is stored in said database, rewriting the query to generate a re-written query that specifies a restriction based on said first database object specified by said first physical constraint, wherein the received query did not specify said restriction. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
-
-
32. A non-transitory computer-readable medium storing instructions, which, when executed by one or more processors, cause performance of:
-
storing, within database objects managed by a database system, files contained in a plurality of identifiable groups of one or more files, each identifiable group of said plurality of identifiable groups of one or more files containing at least one file of said files; in said database, storing metadata that defines a plurality of constraints, wherein for each identifiable group of one or more files of said plurality of identifiable groups, said plurality of constraints includes a physical constraint that specifies that storage of any file in said each identifiable group of one or more files is restricted to storage in a database in at least one specified database object from a group consisting of (a) a particular one or more database tables, (b) a particular one or more database table partitions, and (c) a particular one or more database views; wherein for at least two of said groups of one or more files, a first group includes a first data file that is restricted by a first physical constraint of said plurality of constraints to a first database object specified by said first physical constraint and a second group includes a second data file that is restricted by a second physical constraint of said plurality of constraints to a second database object specified by said second physical constraint; wherein the first database object is different than the second database object;
receiving, at the database system, a query that complies with a query language;
in response to receiving said query;based on (1) said query and (2) the plurality of constraints defined by the metadata, said database system making a determination of how data required by the query is stored in said database; and based on the determination on how data required by the query is stored in said database, rewriting the query to generate a re-written query that specifies a restriction based on said first database object specified by said first physical constraint, wherein the received query did not specify said group; and executing the re-written query that specifies a restriction based on said first database object. - View Dependent Claims (33, 34, 35, 36)
-
Specification