The following commonly owned, co-pending United States patent application, including the present application, are related to each other and is incorporated by reference herein in its entirety, U.S. patent application Ser. No. 10/817,161 entitled CUSTOM ENTITIES AND FIELDS IN A MULTI-TENANT DATABASE SYSTEM, by Weissman et al., filed Apr. 2, 2010.
A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
The current invention relates generally to providing custom indexes in a multi-tenant database environment.
The subject matter discussed in the background section should not be assumed to be prior art merely as a result of its mention in the background section. Similarly, a problem mentioned in the background section or associated with the subject matter of the background section should not be assumed to have been previously recognized in the prior art. The subject matter in the background section merely represents different approaches, which in and of themselves may also be inventions.
In conventional database systems, users access their data resources in one logical database. A user of such a conventional system typically retrieves data from and stores data on the system using the user's own systems. A user system might remotely access one of a plurality of server systems that might in turn access the database system. Data retrieval from the system might include the issuance of a query from the user system to the database system. The database system might process the request for information received in the query and send to the user system information relevant to the request.
In multi-tenant database systems, such as the salesforce.com service, a multi-tenant architecture is used wherein customer organizations (i.e., tenants) share database resources in one logical database. The database tables themselves are typically shared; each entity in the data model typically contains an organization_id column that distinguishes rows for each tenant. All queries and data manipulation are performed in the context of a tenant filter on this (indexed) organization_id column to ensure proper security and the appearance of virtual private databases. In the salesforce.com system, for example, this strategy is used to expose standard entities such as Account, Contact, Lead, and Opportunity entities to customers.
However, customers may wish to add their own custom data to the database system in addition to the standard entities and fields provided with the standard application. In a traditional client/server application, where the customer has its own physical database, adding custom data is typically done via DDL (data definition language) against that database to create new physical schema—tables and columns. In an online multi-tenant database system, such as the salesforce.com service, this approach may be untenable for various reasons. For example, for a database system with a large population of tenants (e.g., on the order of 1,000 or 10,000 or more tenants), the union of all desired schema would overwhelm the underlying data dictionary catalog (e.g., Oracle dictionary). Additionally, the maintenance of all of these schema objects would be a nearly impossible burden for DBAs (database administrators). Further, current relational databases do not support online DDL (in a highly concurrent transactional system) well enough for organizations to remain logically independent. Specifically, the creation of schema by one organization could lock the application for all other customers causing unacceptable delays.
To allow custom data to be supported by a single multi-tenant database system standard objects, such as tables may be provided for use by multiple tenants or organizations. Each organization may add or define custom fields for inclusion in a standard object. Custom fields for multiple tenants may be stored in a single field within the object data structure, and this single field may contain different data types for each tenant. Indexing columns may also be provided, wherein a tenant may designate a field for indexing. Data values for designated fields are copied to an index column, and each index column may include multiple data types. Each organization may also define custom objects including custom fields and indexing columns.
Unfortunately, a table that defines custom fields might process a query relatively slowly if, for example, a query contains more than one parameter for searching or sorting. Such a query may execute by scanning hundreds or thousands of rows to find the second parameter and perform filtering or sorting operations.
In accordance with embodiments, there are provided methods and systems for providing multiple column custom indexes in a multi-tenant database environment. A method embodiment provides defining a multi-tenant data structure having a plurality of data columns data fields and a plurality of rows for each of multiple tenants, each row including a data column for a tenant identifier, defining a first data field for a tenant, the first data field having a first data type, defining a second data field for the tenant, the second field having a second data type, and defining an index table including a tenant identifier for the tenant, a copy of data from the first data field and the second data field, and a key to the corresponding rows of the multi-tenant data structure.
While the present invention is described with reference to an embodiment in which techniques for providing custom indexes in a multi-tenant database environment are implemented in a system having an application server providing a front end for an on-demand database service capable of supporting multiple tenants, the present invention is not limited to multi-tenant databases nor deployment on application servers. Embodiments may be practiced using other database architectures, i.e., ORACLE®, DB2® by IBM and the like without departing from the scope of the embodiments claimed.
Any of the above embodiments may be used alone or together with one another in any combination. Inventions encompassed within this specification may also include embodiments that are only partially mentioned or alluded to or are not mentioned or alluded to at all in this brief summary or in the abstract. Although various embodiments of the invention may have been motivated by various deficiencies with the prior art, which may be discussed or alluded to in one or more places in the specification, the embodiments of the invention do not necessarily address any of these deficiencies. In other words, different embodiments of the invention may address different deficiencies that may be discussed in the specification. Some embodiments may only partially address some deficiencies or just one deficiency that may be discussed in the specification, and some embodiments may not address any of these deficiencies.
In the following drawings like reference numbers are used to refer to like elements. Although the following figures depict various examples of the invention, the invention is not limited to the examples depicted in the figures.
General Overview
Methods and systems are provided for providing custom indexes in a multi-tenant database environment.
As used herein, the term multi-tenant database system refers to those systems in which various elements of hardware and software of the database system may be shared by one or more customers. For example, a given application server may simultaneously process requests for a great number of customers, and a given database table may store rows for a potentially much greater number of customers. As used herein, the term query plan refers to a set of steps used to access information in a database system.
A multi-tenant database client may desire to run frequent API (Application Programming Interface) queries with a filter on one column and a sort on another column, returning just the first few rows or, for example, only new rows. Such a query might traditionally need to scan 1000 rows or more and sort the data on each query to find the first few rows.
One way to avoid sorting or scanning all of the rows is to use a composite standard database index. This avoids a second sorting operation, but may introduce a large maintenance overhead in a multitenant system because the index must be maintained for all tenants' data. Another way is to join more than one custom index together for purposes of executing the query; however this will still require a sort operation because sort ordering is generally not preserved when two indexes are joined together. However, related lists with sorts can be slow when a parent object has many related child objects. Queries that sort through related lists can also use a sort and rownum (number of rows to sort) limit to reduce the delay, but this can affect the result.
To answer such queries efficiently, a two column custom index can be used. In one embodiment, platform objects, such as tables with rows and columns, are provided that give list views with filters on a first parameter, for example CommunityId and sorts on a second parameter, such as date or score. The second column may be used for dependencies, cascade deletes, or any other useful parameters. Two column custom indexes, as explained below, may be more efficient than composite indexes and custom index joins for evaluating filters on two parameters because the index ordering may be used in order to avoid a sort operation.
In one embodiment, the two column custom index definitions may be stored in the existing custom_index table in a field2_enum_or_id column. In another embodiment, the data for two column custom indexes may be stored in new tables such as a “core.cust_idx_value_string_num” table. There may be separate tables for each combination of value types.
Creating new tables allows the data to be divided among multiple tables so that for upgrade scripts, large data copies and exports, and other large scale operations, the custom index tables will be smaller. New tables may also avoid overhead in index storage when compared against an implementation with a single table and multiple data columns. Separate tables allows each row to be indexed only twice (a PK and a data value index) rather than once for each combination of data types. This reduces the total number of tables.
Next, mechanisms and methods for providing custom indexes in a multi-tenant database environment will be described with reference to example embodiments.
Custom Fields
According to one embodiment, for a table such as one for a standard entity, an additional set of two or more columns, e.g., 10, 100, or 250 columns, of text data are defined in the physical schema. These additional columns, also referred to herein as custom data columns, custom field columns or custom fields, allow a system administrator to define additional fields that are not included in the pre-defined standard fields for that entity. These custom fields preferably have a data-type of VARCHAR (variable length character). In one aspect, these custom fields are preferably stored out of row from the main entity table, although these fields may be stored in the main table. For example, if the main table is called “sales.account” then the custom field data might be stored in a table called “sales.account_cfdata” where “cf” stands for “custom field.” Both of these tables preferably contain an organization_id column to distinguish tenant (organization) rows, as well as the same indexed primary key (e.g., account id, in this case) that identifies those rows throughout the database. Furthermore, both tables are preferably partitioned physically on the database (e.g., Oracle DB) to encourage parallelization, for example, when necessary to act on the entire table for maintenance purposes and to maintain shallower indexes.
In the specific example of
Custom field table 110 similarly includes an org id column 111, a table id column 112 and a plurality of data columns 113. As above, table id column 112 acts as the primary key for table 110 and preferably includes the same values as table id column 102 of table 100. In the specific example shown, there are 250 data columns 113 labeled as val0, val1 . . . val249. It is appreciated that any other number may be used as desired, such as, for example, 10 or 100.
When an organization is created initially and associated with database table 100, the custom field columns 113 are empty for that organization. However, every time a record or row is created in the main table (e.g., account) a corresponding row is created in the custom field table—all custom field columns are Null, and therefore take up no space until used.
In one aspect, data is only allowed to enter these custom fields when a new “column” for the organization is defined, e.g., by the administrator for that organization. For example, in the Account entity example, it may be desirable for a specific organization to create one or more additional custom fields, in addition to the standard fields 103, to store specific types of data that may not be accounted for in the predefined standard fields. An organization can create additional custom columns for such data. Rather than defining a physical column (in Oracle, the definition of which would be placed in the Oracle dictionary catalog) a definition of the additional column is stored in metadata, e.g., in a metadata catalog, which may include one or more metadata tables. The definition of a physical column could likewise be stored in XML (eXtensible Markup Language) or some other format.
Table name column 230 stores the names of standard entity tables, such as Account, or the id of custom entity tables created for an organization. Field name column 240 stores the text name of the custom field, and field datatype column 250 stores the data type for the custom field. Examples of data types include text, number, date, picklist, etc. A picklist data type is a text field where the value is chosen from an enumerated list of values. A picklist is typically displayed as a dropdown in the UI. Is_indexed column 260 stores a value indicating whether the field has been flagged for indexing, which will be described in more detail below. In one aspect, column 260 stores a boolean value. Column_number column 270 stores the column number (e.g., “val0”) assigned to a custom field in custom field table 110 (
The creation of a new custom field in the application allocates one of the custom field columns 113 to hold the data. In preferred aspects, the lowest numbered columns are filled first. For example, as shown in
In one aspect, a variety of virtual data-types are allowed for these custom fields even though the underlying physical storage may be character based. When the organization's system administrator defines numeric or date custom field types, for instance, then the values are stored as text in a canonical format that allows easy conversion back to the logical data-type. As mentioned earlier, in one aspect, a data type of VARCHAR is preferably used. For instance, in this aspect, dates are stored in the YYYYMMDD format—which allows for conversion via the TO_DATE(<column>, ‘YYYYMMDD’) function and also allows for proper sorting without doing any conversion. For numbers, the usual decimal format is used, and the Oracle function TO_NUMBER( ) may be used to convert back to numeric values for sorting, mathematical operations, and filtering, etc.
Because the database is multi-tenant, a given physical custom field column may contain data across multiple organizations. For example, because an organization is not limited to specific data types, one organization may define one data type such as a date and another organization may define a different data type such as a string or a number. Therefore it is likely that strings, numbers, and dates will all be found in one physical custom field column.
In one embodiment, metadata is used to determine the data type(s) in a given custom field column. That is, metadata is used to track the logical data type for each organization in each custom column. In one aspect, a mapping function is created from the metadata. For example, when an organization defines a custom field for a standard entity, a custom field definition is stored in metadata table 200 including the organization id for that organization, the table name (e.g., .account_cfdata) and the column number assigned in the custom table (e.g., val0). In this manner, the data type(s) in any custom column can be determined for efficient data retrieval given the column number, table name and organization id.
Custom Field Indexing
Now consider the problem of indexing the data in these custom field columns (e.g., columns 113) to allow for fast retrieval. For example, users expect to filter on date values as dates and numeric values as numbers. However, in order for these filters to work efficiently, given the expressions above used to convert their values, it would be necessary to place a functional index (e.g., an Oracle DB functional index) on each organization's slice of the data in a given custom field column. This is not possible from the Oracle DB perspective because the Oracle DB does not understand that one physical column contains data in multiple formats. For example, if one tries to create an index on the TO_DATE or TO_NUMBER expressions above, an error would result since other textual values in that physical column would not conform to the desired format.
Similarly, when searching on string data, users expect case insensitive searches. That is, searching for “car” should find “CAR” or “CaR.” However, the definition of case insensitive is language dependent, and a service (e.g., CRM service) using such a multi-tenant database structure may be multi-language enabled. To search properly on multi-language data requires the use of a functional index built using various NLS (natural language standards) functions in Oracle. Since a given physical column could contain data in multiple languages it would be necessary to build N different indexes for each of the languages supported which would result in a non-scalable solution.
For the reasons listed above, among others, such “Indexed Custom Fields” are implemented in one embodiment by storing data in a separate set of indexed columns. According to one embodiment of the present invention, a plurality of additional index columns are provided to allow for indexing custom fields. When a custom field is flagged for indexing by a database administrator, one of the plurality of index columns is allocated to that flagged column. Data from the flagged column is copied to the allocated index column. The data is stored in the index column in a format that facilitates searching, e.g., for dates and strings. For example, the YYYYMMDD is itself a searchable format as strings in that format can be compared lexically using normal string comparison.
In one aspect, to avoid the problem with searching across multiple languages, a “case folding” algorithm is implemented (e.g., in an application server) that converts each string custom field value to a universal case insensitive format. One such case folding algorithm is an algorithm defined by the Unicode Consortium in the Unicode 4.0 standard, section 3.13—Caseless Matching (http://www.unicode.org/versions/Unicode4-.0.0/ch03.pdf), hereby incorporated by reference, which is a tabular lookup function that converts characters to a form that is binary comparable independent of case for all languages that have a concept of case. Whenever values in the original custom field column are searched, the SQL instead filters on the corresponding case-folded indexed column after performing the same case folding operation on the literal being searched. Dates need not be modified from their YYYYMMDD format, which is also included in the index (unmodified) as text.
Organizations that choose not to use indexed custom fields will have null values in these fields, and Nulls do not take up any space in the indexes. In this manner space is used up in the database only as custom columns are actually indexed. Also, index columns 320 are preferably stored in the corresponding custom field table, however, they may be stored out of row, in which case it is preferred that the org id 311 and table id 312 columns be copied to the separate indexed column table to facilitate searching.
Two-Column Custom Index
According to one embodiment of the invention, a custom field column or a standard column of a multi-tenant or single tenant database may have multiple two column custom indexes. The two index columns may be different to provide new functionality for index columns in accessing the data. The two different columns can be used in many different combinations, depending on the structure of the data and the anticipated queries into the data. For sorting purposes or to speed data access, one of the columns may be a date or time, a magnitude, a dollar amount, or a location. In another example, one of the columns of a two column custom index is a foreign key, for optimization of related lists and for a CommunityId field.
When such two column custom indexes are widespread, they may also be used as a structure even if the index only uses one of the two columns. In such a case, a two column indexes may include at least some null values. This allows for cases when one column is null but the other column is not.
In a further extension, both columns can be null. This corresponds to rows that are not being used. This preserves the structure and reserves a capability to add indexes with one or two columns later. These rows can be excluded from any queries or other use where the values for both rows values are null. Certain types of queries could also be enhanced by excluding rows where the first index column, or in a different configuration, the second index column, is null. The single column indexes in the two-column structure may not be useful for filters on the leading column. This would prevent the second column index to be used on such a filter. Such indexes would still require some overhead processing to update the columns that are not null. In one embodiment, the index tables are separate custom tables and are not created unless the data is to be indexed.
A double column index provides additional possibilities for finding data and running queries. One such new possibility is a sort based on both columns of the index. If there is a low row number limit (rownum limit) and the sort ordering requested by the query matches the ordering of the index, then the needed (small) number of rows can be returned quickly and in order, without the need for a database sort operation or to scan any additional rows. In another example, the first column can be used as a filter and the second column can be used as a sort. Alternatively after a sort on the first column, there may be a filter on the second column, or the index may be used to evaluate filters on both the first and second columns.
The two-column index is explained below in the context of a particular example.
In this example, an identifying column 401 provides an identification of the tenant for which e-mails have been stored in the database. This general information column 401 may be supplemented with additional columns providing keys, account information, pointers to other identifiers, etc., depending on the application. The custom field columns 410 provide information about the e-mails. The particular columns shown are for illustration purposes. More or fewer columns may be used depending on the nature of the e-mail system and the level of record-keeping that is desired.
In the present example, email_id 420, provides a unique identifier for each row. to_address 430 provides the destination of the e-mail message for each row. The same or additional columns may be used for additional addressees, when appropriate. from_address 440 provides the source for each row date 450 provides the data that the message was sent. More accurate timing information may be stored in the same or additional column if desired. subject 460 and body 470 are taken directly from the text of the e-mail size 480 and status 490 provide statistical information about the e-mail.
The index table, not only provides an index into the data but can also be sorted, based on any one or more particular fields. In the example of
The database data can then be e) sorted by date and f) the most recent row can be identified as the result of the query. Such a process provides a result for a query for the most recent e-mail for “jesse@email.com.” In this process every e-mail for “jesse@email.com” was accessed in the main database must be accessed in the main database table.
In the example beginning with
The query can then take the primary key “9” for the identified row and e) read that row from the database. An example portion of the data for this row is shown as
System Overview
Environment 610 is an environment in which an on-demand database service exists. User system 612 may be any machine or system that is used by a user to access a database user system. For example, any of user systems 612 can be a handheld computing device, a mobile phone, a laptop computer, a work station, and/or a network of computing devices. As illustrated in
An on-demand database service, such as system 616, is a database system that is made available to outside users that do not need to necessarily be concerned with building and/or maintaining the database system, but instead may be available for their use when the users need the database system (e.g., on the demand of the users). Some on-demand database services may store information from one or more tenants stored into tables of a common database image to form a multi-tenant database system (MTS). Accordingly, “on-demand database service 616” and “system 616” will be used interchangeably herein. A database image may include one or more database objects. A relational database management system (RDMS) or the equivalent may execute storage and retrieval of information against the database object(s). Application platform 618 may be a framework that allows the applications of system 616 to run, such as the hardware and/or software, e.g., the operating system. In an embodiment, on-demand database service 616 may include an application platform 618 that enables creation, managing and executing one or more applications developed by the provider of the on-demand database service, users accessing the on-demand database service via user systems 612, or third party application developers accessing the on-demand database service via user systems 612.
The users of user systems 612 may differ in their respective capacities, and the capacity of a particular user system 612 might be entirely determined by permissions (permission levels) for the current user. For example, where a salesperson is using a particular user system 612 to interact with system 616, that user system has the capacities allotted to that salesperson. However, while an administrator is using that user system to interact with system 616, that user system has the capacities allotted to that administrator. In systems with a hierarchical role model, users at one permission level may have access to applications, data, and database information accessible by a lower permission level user, but may not have access to certain applications, database information, and data accessible by a user at a higher permission level. Thus, different users will have different capabilities with regard to accessing and modifying application and database information, depending on a user's security or permission level.
Network 614 is any network or combination of networks of devices that communicate with one another. For example, network 614 can be any one or any combination of a LAN (local area network), WAN (wide area network), telephone network, wireless network, point-to-point network, star network, token ring network, hub network, or other appropriate configuration. As the most common type of computer network in current use is a TCP/IP (Transfer Control Protocol and Internet Protocol) network, such as the global internetwork of networks often referred to as the “Internet” with a capital “I,” that network will be used in many of the examples herein. However, it should be understood that the networks that the present invention might use are not so limited, although TCP/IP is a frequently implemented protocol.
User systems 612 might communicate with system 616 using TCP/IP and, at a higher network level, use other common Internet protocols to communicate, such as HTTP, FTP, AFS, WAP, etc. In an example where HTTP is used, user system 612 might include an HTTP client commonly referred to as a “browser” for sending and receiving HTTP messages to and from an HTTP server at system 616. Such an HTTP server might be implemented as the sole network interface between system 616 and network 614, but other techniques might be used as well or instead. In some implementations, the interface between system 616 and network 614 includes load sharing functionality, such as round-robin HTTP request distributors to balance loads and distribute incoming HTTP requests evenly over a plurality of servers. At least as for the users that are accessing that server, each of the plurality of servers has access to the MTS' data; however, other alternative configurations may be used instead.
In one embodiment, system 616, shown in
One arrangement for elements of system 616 is shown in
Several elements in the system shown in
According to one embodiment, each user system 612 and all of its components are operator configurable using applications, such as a browser, including computer code run using a central processing unit such as an Intel Pentium® processor or the like. Similarly, system 616 (and additional instances of an MTS, where more than one is present) and all of their components might be operator configurable using application(s) including computer code to run using a central processing unit such as processor system 617, which may include an Intel Pentium® processor or the like, and/or multiple processor units. A computer program product embodiment includes a machine-readable storage medium (media) having instructions stored thereon/in which can be used to program a computer to perform any of the processes of the embodiments described herein. Computer code for operating and configuring system 16 to intercommunicate and to process webpages, applications and other data and media content as described herein are preferably downloaded and stored on a hard disk, but the entire program code, or portions thereof, may also be stored in any other volatile or non-volatile memory medium or device as is well known, such as a ROM or RAM, or provided on any media capable of storing program code, such as any type of rotating media including floppy disks, optical discs, digital versatile disk (DVD), compact disk (CD), microdrive, and magneto-optical disks, and magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data. Additionally, the entire program code, or portions thereof, may be transmitted and downloaded from a software source over a transmission medium, e.g., over the Internet, or from another server, as is well known, or transmitted over any other conventional network connection as is well known (e.g., extranet, VPN, LAN, etc.) using any communication medium and protocols (e.g., TCP/IP, HTTP, HTTPS, Ethernet, etc.) as are well known. It will also be appreciated that computer code for implementing embodiments of the present invention can be implemented in any programming language that can be executed on a client system and/or server or server system such as, for example, C, C++, HTML, any other markup language, Java™, JavaScript, ActiveX, any other scripting language, such as VBScript, and many other programming languages as are well known may be used. (Java™ is a trademark of Sun Microsystems, Inc.).
According to one embodiment, each system 616 is configured to provide webpages, forms, applications, data and media content to user (client) systems 612 to support the access by user systems 612 as tenants of system 616. As such, system 616 provides security mechanisms to keep each tenant's data separate unless the data is shared. If more than one MTS is used, they may be located in close proximity to one another (e.g., in a server farm located in a single building or campus), or they may be distributed at locations remote from one another (e.g., one or more servers located in city A and one or more servers located in city B). As used herein, each MTS could include one or more logically and/or physically connected servers distributed locally or across one or more geographic locations. Additionally, the term “server” is meant to include a computer system, including processing hardware and process space(s), and an associated storage system and database application (e.g., OODBMS or RDBMS) as is well known in the art. It should also be understood that “server system” and “server” are often used interchangeably herein. Similarly, the database object described herein can be implemented as single databases, a distributed database, a collection of distributed databases, a database with redundant online or offline backups or other redundancies, etc., and might include a distributed database or storage network and associated processing intelligence.
User system 612, network 614, system 616, tenant data storage 622, and system data storage 624 were discussed above in
Application platform 618 includes an application setup mechanism 738 that supports application developers' creation and management of applications, which may be saved as metadata into tenant data storage 622 by save routines 736 for execution by subscribers as one or more tenant process spaces 704 managed by tenant management process 710 for example. Invocations to such applications may be coded using PL/SOQL 734 that provides a programming language style interface extension to API 732. A detailed description of some PL/SOQL language embodiments is discussed in commonly owned U.S. Pat. No. 7,730,478 entitled, METHOD AND SYSTEM FOR ALLOWING ACCESS TO DEVELOPED APPLICATIONS VIA A MULTI-TENANT DATABASE ON-DEMAND DATABASE SERVICE issued Jun. 1, 2010 to Craig Weissman, which is incorporated in its entirety herein for all purposes. Invocations to applications may be detected by one or more system processes, which manages retrieving application metadata 716 for the subscriber making the invocation and executing the metadata as an application in a virtual machine.
Each application server 700 may be communicably coupled to database systems, e.g., having access to system data 625 and tenant data 623, via a different network connection. For example, one application server 7001 might be coupled via the network 614 (e.g., the Internet), another application server 700N-1 might be coupled via a direct network link, and another application server 700N might be coupled by yet a different network connection. Transfer Control Protocol and Internet Protocol (TCP/IP) are typical protocols for communicating between application servers 700 and the database system. However, it will be apparent to one skilled in the art that other transport protocols may be used to optimize the system depending on the network interconnect used.
In certain embodiments, each application server 700 is configured to handle requests for any user associated with any organization that is a tenant. Because it is desirable to be able to add and remove application servers from the server pool at any time for any reason, there is preferably no server affinity for a user and/or organization to a specific application server 700. In one embodiment, therefore, an interface system implementing a load balancing function (e.g., an F5 Big-IP load balancer) is communicably coupled between the application servers 700 and the user systems 612 to distribute requests to the application servers 700. In one embodiment, the load balancer uses a least connections algorithm to route user requests to the application servers 700. Other examples of load balancing algorithms, such as round robin and observed response time, also can be used. For example, in certain embodiments, three consecutive requests from the same user could hit three different application servers 700, and three requests from different users could hit the same application server 700. In this manner, system 616 is multi-tenant, wherein system 616 handles storage of, and access to, different objects, data and applications across disparate users and organizations.
As an example of storage, one tenant might be a company that employs a sales force where each salesperson uses system 616 to manage their sales process. Thus, a user might maintain contact data, leads data, customer follow-up data, performance data, goals and progress data, etc., all applicable to that user's personal sales process (e.g., in tenant data storage 622). In an example of a MTS arrangement, since all of the data and the applications to access, view, modify, report, transmit, calculate, etc., can be maintained and accessed by a user system having nothing more than network access, the user can manage his or her sales efforts and cycles from any of many different user systems. For example, if a salesperson is visiting a customer and the customer has Internet access in their lobby, the salesperson can obtain critical updates as to that customer while waiting for the customer to arrive in the lobby.
While each user's data might be separate from other users' data regardless of the employers of each user, some data might be organization-wide data shared or accessible by a plurality of users or all of the users for a given organization that is a tenant. Thus, there might be some data structures managed by system 616 that are allocated at the tenant level while other data structures might be managed at the user level. Because an MTS might support multiple tenants including possible competitors, the MTS should have security protocols that keep data, applications, and application use separate. Also, because many tenants may opt for access to an MTS rather than maintain their own system, redundancy, up-time, and backup are additional functions that may be implemented in the MTS. In addition to user-specific data and tenant specific data, system 616 might also maintain system level data usable by multiple tenants or other data. Such system level data might include industry reports, news, postings, and the like that are sharable among tenants.
In certain embodiments, user systems 612 (which may be client systems) communicate with application servers 700 to request and update system-level and tenant-level data from system 616 that may require sending one or more queries to tenant data storage 622 and/or system data storage 624. System 616 (e.g., an application server 700 in system 616) automatically generates one or more SQL statements (e.g., one or more SQL queries) that are designed to access the desired information. System data storage 624 may generate query plans to access the requested data from the database.
Each database can generally be viewed as a collection of objects, such as a set of logical tables, containing data fitted into predefined categories. A “table” is one representation of a data object, and may be used herein to simplify the conceptual description of objects and custom objects according to the present invention. It should be understood that “table” and “object” may be used interchangeably herein. Each table generally contains one or more data categories logically arranged as columns or fields in a viewable schema. Each row or record of a table contains an instance of data for each category defined by the fields. For example, a CRM database may include a table that describes a customer with fields for basic contact information such as name, address, phone number, fax number, etc. Another table might describe a purchase order, including fields for information such as customer, product, sale price, date, etc. In some multi-tenant database systems, standard entity tables might be provided for use by all tenants. For CRM database applications, such standard entities might include tables for Account, Contact, Lead, and Opportunity data, each containing pre-defined fields. It should be understood that the word “entity” may also be used interchangeably herein with “object” and “table”.
In some multi-tenant database systems, tenants may be allowed to create and store custom objects, or they may be allowed to customize standard entities or objects, for example by creating custom fields for standard objects, including custom index fields. U.S. patent application Ser. No. 10/817,161, filed Apr. 2, 2004, entitled “Custom Entities and Fields in a Multi-Tenant Database System”, and which is hereby incorporated herein by reference, teaches systems and methods for creating custom objects as well as customizing standard objects in a multi-tenant database system. In certain embodiments, for example, all custom entity data rows are stored in a single multi-tenant physical table, which may contain multiple logical tables per organization. It is transparent to customers that their multiple “tables” are in fact stored in one large table or that their data may be stored in the same table as the data of other customers.
While the invention has been described by way of example and in terms of the specific embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. To the contrary, it is intended to cover various modifications and similar arrangements as would be apparent to those skilled in the art. Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
This application claims the benefit of U.S. Provisional Patent Application 61/345,883 entitled Methods And Systems For Providing Custom Indexes In A Multi-Tenant Database Environment, by Jesse Collins et al., filed May 18, 2010, the entire contents of which are incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5043872 | Cheng et al. | Aug 1991 | A |
5577188 | Zhu | Nov 1996 | A |
5608872 | Schwartz et al. | Mar 1997 | A |
5649104 | Carleton et al. | Jul 1997 | A |
5715450 | Ambrose et al. | Feb 1998 | A |
5761419 | Schwartz et al. | Jun 1998 | A |
5819038 | Carleton et al. | Oct 1998 | A |
5821937 | Tonelli et al. | Oct 1998 | A |
5831610 | Tonelli et al. | Nov 1998 | A |
5873079 | Davis et al. | Feb 1999 | A |
5873096 | Lim et al. | Feb 1999 | A |
5918159 | Fomukong et al. | Jun 1999 | A |
5963953 | Cram et al. | Oct 1999 | A |
6029163 | Ziauddin | Feb 2000 | A |
6092083 | Brodersen et al. | Jul 2000 | A |
6169534 | Raffel et al. | Jan 2001 | B1 |
6182079 | Lenzie | Jan 2001 | B1 |
6189011 | Lim et al. | Feb 2001 | B1 |
6216135 | Brodersen et al. | Apr 2001 | B1 |
6233617 | Rothwein et al. | May 2001 | B1 |
6178425 | Brodersen et al. | Jun 2001 | B1 |
6266669 | Brodersen et al. | Jul 2001 | B1 |
6272487 | Beavin et al. | Aug 2001 | B1 |
6295530 | Ritchie et al. | Sep 2001 | B1 |
6324568 | Diec | Nov 2001 | B1 |
6324693 | Brodersen et al. | Nov 2001 | B1 |
6336137 | Lee et al. | Jan 2002 | B1 |
D454139 | Feldcamp | Mar 2002 | S |
6367077 | Brodersen et al. | Apr 2002 | B1 |
6393605 | Loomans | May 2002 | B1 |
6405220 | Brodersen et al. | Jun 2002 | B1 |
6434550 | Warner et al. | Aug 2002 | B1 |
6446089 | Brodersen et al. | Sep 2002 | B1 |
6505188 | Ghazal et al. | Jan 2003 | B1 |
6535909 | Rust | Mar 2003 | B1 |
6549908 | Loomans | Apr 2003 | B1 |
6553563 | Ambrose et al. | Apr 2003 | B2 |
6560461 | Fomukong et al. | May 2003 | B1 |
6574635 | Stauber et al. | Jun 2003 | B2 |
6577726 | Huang et al. | Jun 2003 | B1 |
6601087 | Zhu et al. | Jul 2003 | B1 |
6604117 | Lim et al. | Aug 2003 | B2 |
6604128 | Diec | Aug 2003 | B2 |
6609150 | Lee et al. | Aug 2003 | B2 |
6621834 | Scherpbier et al. | Sep 2003 | B1 |
6654032 | Zhu et al. | Nov 2003 | B1 |
6665648 | Brodersen et al. | Dec 2003 | B2 |
6665655 | Warner et al. | Dec 2003 | B1 |
6684438 | Brodersen et al. | Feb 2004 | B2 |
6711565 | Subramaniam et al. | Mar 2004 | B1 |
6724399 | Katchour et al. | Apr 2004 | B1 |
6728702 | Subramaniam et al. | Apr 2004 | B1 |
6728960 | Loomans | Apr 2004 | B1 |
6732095 | Warshavsky et al. | May 2004 | B1 |
6732100 | Brodersen et al. | May 2004 | B1 |
6732111 | Brodersen et al. | May 2004 | B2 |
6754681 | Brodersen et al. | Jun 2004 | B2 |
6763351 | Subramaniam et al. | Jul 2004 | B1 |
6763501 | Zhu et al. | Jul 2004 | B1 |
6768904 | Kim | Jul 2004 | B2 |
6782383 | Subramaniam et al. | Aug 2004 | B2 |
6804330 | Jones et al. | Oct 2004 | B1 |
6823384 | Wilson | Nov 2004 | B1 |
6826565 | Ritchie et al. | Nov 2004 | B2 |
6826582 | Chatterjee et al. | Nov 2004 | B1 |
6826745 | Coker et al. | Nov 2004 | B2 |
6829655 | Huang et al. | Dec 2004 | B1 |
6842748 | Warner et al. | Jan 2005 | B1 |
6850895 | Brodersen et al. | Feb 2005 | B2 |
6850949 | Warner et al. | Feb 2005 | B2 |
7007006 | Zilio et al. | Feb 2006 | B2 |
7340411 | Cook | Mar 2008 | B2 |
7499907 | Brown et al. | Mar 2009 | B2 |
7526469 | Narita et al. | Apr 2009 | B2 |
7620655 | Larsson et al. | Nov 2009 | B2 |
7779039 | Weissman | Aug 2010 | B2 |
7962521 | Brown et al. | Jun 2011 | B2 |
8359325 | Gui et al. | Jan 2013 | B1 |
8396860 | Ramesh et al. | Mar 2013 | B1 |
8510290 | Brown et al. | Aug 2013 | B1 |
8768959 | Annapragada et al. | Jul 2014 | B1 |
8868404 | Yancey et al. | Oct 2014 | B1 |
9081805 | Stamen | Jul 2015 | B1 |
9146984 | Bozkaya et al. | Sep 2015 | B1 |
9336272 | Thombre et al. | May 2016 | B1 |
20010044791 | Richter et al. | Nov 2001 | A1 |
20020022986 | Coker et al. | Feb 2002 | A1 |
20020029161 | Brodersen et al. | Mar 2002 | A1 |
20020029376 | Ambrose et al. | Mar 2002 | A1 |
20020035577 | Brodersen et al. | Mar 2002 | A1 |
20020042264 | Kim | Apr 2002 | A1 |
20020042843 | Diec | Apr 2002 | A1 |
20020072951 | Lee et al. | Jun 2002 | A1 |
20020078015 | Ponnekanti | Jun 2002 | A1 |
20020082892 | Raffel et al. | Jun 2002 | A1 |
20020129352 | Brodersen et al. | Sep 2002 | A1 |
20020140731 | Subramaniam et al. | Oct 2002 | A1 |
20020143997 | Huang et al. | Oct 2002 | A1 |
20020152102 | Brodersen et al. | Oct 2002 | A1 |
20020161734 | Stauber et al. | Oct 2002 | A1 |
20020162090 | Parnell et al. | Oct 2002 | A1 |
20020165742 | Robins | Nov 2002 | A1 |
20030004971 | Gong et al. | Jan 2003 | A1 |
20030018705 | Chen et al. | Jan 2003 | A1 |
20030018830 | Chen et al. | Jan 2003 | A1 |
20030061244 | Hirohata | Mar 2003 | A1 |
20030066031 | Laane | Apr 2003 | A1 |
20030066032 | Ramachadran et al. | Apr 2003 | A1 |
20030069936 | Warner et al. | Apr 2003 | A1 |
20030070000 | Coker et al. | Apr 2003 | A1 |
20030070004 | Mukundan et al. | Apr 2003 | A1 |
20030070005 | Mukundan et al. | Apr 2003 | A1 |
20030074418 | Coker | Apr 2003 | A1 |
20030088545 | Subramaniam et al. | May 2003 | A1 |
20030088579 | Brown et al. | May 2003 | A1 |
20030093408 | Brown et al. | May 2003 | A1 |
20030120675 | Stauber et al. | Jun 2003 | A1 |
20030151633 | George et al. | Aug 2003 | A1 |
20030159136 | Huang et al. | Aug 2003 | A1 |
20030187921 | Diec | Oct 2003 | A1 |
20030189600 | Gune et al. | Oct 2003 | A1 |
20030191743 | Brodersen et al. | Oct 2003 | A1 |
20030204427 | Gune et al. | Oct 2003 | A1 |
20030206192 | Chen et al. | Nov 2003 | A1 |
20030225730 | Warner et al. | Dec 2003 | A1 |
20030229639 | Carlson et al. | Dec 2003 | A1 |
20040001092 | Rothwein et al. | Jan 2004 | A1 |
20040010489 | Rio | Jan 2004 | A1 |
20040015981 | Coker et al. | Jan 2004 | A1 |
20040027388 | Berg et al. | Feb 2004 | A1 |
20040117355 | Lef et al. | Jun 2004 | A1 |
20040128001 | Levin et al. | Jul 2004 | A1 |
20040186860 | Lee et al. | Sep 2004 | A1 |
20040193510 | Catahan, Jr. et al. | Sep 2004 | A1 |
20040199489 | Barnes-Leon et al. | Oct 2004 | A1 |
20040199536 | Barnes Leon et al. | Oct 2004 | A1 |
20040199543 | Braud et al. | Oct 2004 | A1 |
20040249854 | Barnes-Leon et al. | Dec 2004 | A1 |
20040260534 | Pak et al. | Dec 2004 | A1 |
20040260659 | Chan et al. | Dec 2004 | A1 |
20040268299 | Lei et al. | Dec 2004 | A1 |
20050050555 | Exley et al. | Mar 2005 | A1 |
20050091098 | Brodersen et al. | Apr 2005 | A1 |
20050163136 | Chiu | Jul 2005 | A1 |
20050203940 | Farrar et al. | Sep 2005 | A1 |
20050223022 | Weissman | Oct 2005 | A1 |
20050289102 | Das et al. | Dec 2005 | A1 |
20060023945 | King et al. | Feb 2006 | A1 |
20060136368 | Young-Lai et al. | Jun 2006 | A1 |
20060167865 | Andrei | Jul 2006 | A1 |
20060235831 | Adinolfi | Oct 2006 | A1 |
20070027860 | Bestgen et al. | Feb 2007 | A1 |
20070073761 | Anderson et al. | Mar 2007 | A1 |
20070124276 | Weissman et al. | May 2007 | A1 |
20070136386 | Burger | Jun 2007 | A1 |
20070226186 | Ewen et al. | Sep 2007 | A1 |
20070271268 | Fontoura et al. | Nov 2007 | A1 |
20080005092 | Kleewein et al. | Jan 2008 | A1 |
20080040320 | Dettinger et al. | Feb 2008 | A1 |
20080052271 | Lam | Feb 2008 | A1 |
20080168058 | Gordon | Jul 2008 | A1 |
20080177697 | Barsness et al. | Jul 2008 | A1 |
20090019001 | Thiyagarajan et al. | Jan 2009 | A1 |
20090049288 | Weissman | Feb 2009 | A1 |
20090055439 | Pai et al. | Feb 2009 | A1 |
20090070313 | Beyer et al. | Mar 2009 | A1 |
20090182592 | Ballaro | Jul 2009 | A1 |
20090282045 | Hsieh et al. | Nov 2009 | A1 |
20100005054 | Smith et al. | Jan 2010 | A1 |
20100005055 | An et al. | Jan 2010 | A1 |
20100036801 | Pirvali et al. | Feb 2010 | A1 |
20100057796 | Brown et al. | Mar 2010 | A1 |
20100088311 | Fosse et al. | Apr 2010 | A1 |
20100114976 | Castellanos et al. | May 2010 | A1 |
20100121868 | Biannie et al. | May 2010 | A1 |
20100169354 | Baby et al. | Jul 2010 | A1 |
20100174701 | Burger | Jul 2010 | A1 |
20100250504 | Balasubramanian et al. | Sep 2010 | A1 |
20100262593 | Bruno et al. | Oct 2010 | A1 |
20100287206 | Cain et al. | Nov 2010 | A1 |
20100287214 | Narasayya et al. | Nov 2010 | A1 |
20110010394 | Carew et al. | Jan 2011 | A1 |
20110040744 | Haas et al. | Feb 2011 | A1 |
20110055201 | Burger | Mar 2011 | A1 |
20110258179 | Weissman et al. | Oct 2011 | A1 |
20110282839 | Paksoy et al. | Nov 2011 | A1 |
20120233147 | Solheim et al. | Sep 2012 | A1 |
20130086038 | Perry | Apr 2013 | A1 |
20130124500 | Beavin et al. | May 2013 | A1 |
20130173590 | Ghazal | Jul 2013 | A1 |
20130232133 | Al-Omari et al. | Sep 2013 | A1 |
20130254210 | Morris et al. | Sep 2013 | A1 |
20140188532 | Liu et al. | Jul 2014 | A1 |
20150112965 | Tokuda et al. | Apr 2015 | A1 |
Number | Date | Country |
---|---|---|
2006076520 | Feb 2007 | WO |
Entry |
---|
Final Office Action for U.S. Appl. No. 14/028,316 dated Feb. 21, 2018, 26 pages. |
Final Office Action for U.S. Appl. No. 14/028,316 dated Oct. 21, 2015, 26 pages. |
Non-Final Office Action for U.S. Appl. No. 14/028,316 dated Aug. 10, 2017, 23 pages. |
Non-Final Office Action for U.S. Appl. No. 14/028,316 dated Jun. 17, 2015, 21 pages. |
Non-Final Office Action for U.S. Appl. No. 14/028,316 dated Nov. 3, 2016, 24 pages. |
A Method and System to Enhance Query Performance by Autonomically Creating and Deleting Database Indices at Runtime. IBM. Published Sep. 24, 2003. IP.com Number IPCOM000019661D. |
Corrected Notice of Allowability for U.S. Appl. No. 13/549,306 dated Sep. 14, 2018, 5 pages. |
Final Office Action for U.S. Appl. No. 13/549,306 dated Nov. 13, 2013, 17 pages. |
Final Office Action for U.S. Appl. No. 13/549,306 dated Nov. 7, 2014, 25 pages. |
Final Office Action for U.S. Appl. No. 13/549,306 dated Sep. 26, 2016, 28 pages. |
He, Hong. “Applications deployment on the Saas platform” In Pervasive Computing and Applications (ICPCA), 201 O 5th International Conference on, pp. 232-237. IEEE, 2010. |
Hui, Mei, Dawei Jiang, Guoliang Li, and Yuan Zhou. “Supporting database applications as a service.” In Data Engineering, 2009. ICDE'09. IEEE 25th International Conference on, pp. 832-843. IEEE, 2009. |
Non-Final Office Action for U.S. Appl. No. 12/971,978 dated Jan. 14, 2013, 17 pages. |
Non-Final Office Action for U.S. Appl. No. 13/549,306 dated Jun. 16, 2014, 23 pages. |
Non-Final Office Action for U.S. Appl. No. 13/549,306 dated Jun. 24, 2013, 15 pages. |
Non-Final Office Action for U.S. Appl. No. 13/549,306 dated May 20, 2016, 22 pages. |
Notice of Allowance for U.S. Appl. No. 12/971,978 dated Jul. 8, 2013, 11 pages. |
Notice of Allowance for U.S. Appl. No. 13/549,306 dated Jun. 1, 2018, 9 pages. |
Notice of Allowance for U.S. Appl. No. 13/549,306 dated Nov. 20, 2017, 8 pages. |
Tovarnak, Daniel, and Toma Pitner. “Towards multi-tenant and interoperable monitoring of virtual machines in cloud.” In Symbolic and Numeric Algorithms for Scientific Computing (SYNASC), 2012 14th International Symposium on, pp. 436-442. IEEE, 2012. |
Notice of Allowance for U.S. Appl. No. 14/028,316 dated Aug. 8, 2018, 8 pages. |
Number | Date | Country | |
---|---|---|---|
20110289091 A1 | Nov 2011 | US |
Number | Date | Country | |
---|---|---|---|
61345883 | May 2010 | US |