A data warehouse stores data that is used for reporting and analysis. This data may be collected from various data sources and placed in the data warehouse. In collecting the data, manual, semi-automatic, and automatic mechanisms may be used. For example, a script may execute periodically to obtain information from a data source to place in the data warehouse. As another example, periodically, an employee may copy data from a company database to the data warehouse.
A data warehouse may have storage elements that correspond to aspects an organization cares about. For example, a data warehouse may have a table in which employee information from data sources may be stored. As another example, a data warehouse may have a table in which sales information may be stored.
When the structure of a data source changes, ensuring that data associated with the change is collected and stored in the data warehouse is problematic. For example, if an employee database adds a supervisor employee type, collecting supervisor employee information, placing it in the data warehouse, and reporting on this information may involve vigilance in watching for changes to the employee database and coding to ensure that this information is collected, stored, and made available at the data warehouse.
The subject matter claimed herein is not limited to embodiments that solve any disadvantages or that operate only in environments such as those described above. Rather, this background is only provided to illustrate one exemplary technology area where some embodiments described herein may be practiced.
Briefly, aspects of the subject matter described herein relate to data warehouses. In aspects, mapping information is received that maps elements of a data warehouse to types of a type system. A type system defines a hierarchy of data types of data in a data source from which the data warehouse obtains data. The mapping information also indicates whether subtypes of the data are mapped to the elements. Using this mapping information, the elements of the data warehouse may be automatically created, maintained, and populated. When the type system is changed, mapped elements in the data warehouse may be updated or created and code to extract and load the data from a data source associated with the type system may be created based on the mapping information. In addition, reports based on the mapped elements may continue to work without change.
This Summary is provided to briefly identify some aspects of the subject matter that is further described below in the Detailed Description. This Summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The phrase “subject matter described herein” refers to subject matter described in the Detailed Description unless the context clearly indicates otherwise. The term “aspects” is to be read as “at least one aspect.” Identifying aspects of the subject matter described in the Detailed Description is not intended to identify key or essential features of the claimed subject matter.
The aspects described above and other aspects of the subject matter described herein are illustrated by way of example and not limited in the accompanying figures in which like reference numerals indicate similar elements and in which:
Aspects of the subject matter described herein are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with aspects of the subject matter described herein include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microcontroller-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
Aspects of the subject matter described herein may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and so forth, which perform particular tasks or implement particular abstract data types. Aspects of the subject matter described herein may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
With reference to
The computer 110 typically includes a variety of computer-readable media. Computer-readable media can be any available media that can be accessed by the computer 110 and includes both volatile and nonvolatile media, and removable and non-removable media. By way of example, and not limitation, computer-readable media may comprise computer storage media and communication media.
Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile discs (DVDs) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer 110.
Communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer-readable media.
The system memory 130 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 131 and random access memory (RAM) 132. A basic input/output system 133 (BIOS), containing the basic routines that help to transfer information between elements within computer 110, such as during start-up, is typically stored in ROM 131. RAM 132 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 120. By way of example, and not limitation,
The computer 110 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media, discussed above and illustrated in
The computer 110 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 180. The remote computer 180 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 110, although only a memory storage device 181 has been illustrated in
When used in a LAN networking environment, the computer 110 is connected to the LAN 171 through a network interface or adapter 170. When used in a WAN networking environment, the computer 110 typically includes a modem 172 or other means for establishing communications over the WAN 173, such as the Internet. The modem 172, which may be internal or external, may be connected to the system bus 121 via the user input interface 160 or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 110, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
As mentioned previously, when a data source that is associated with a data warehouse changes, data corresponding to this change may not be captured by the data warehouse without re-working the system.
The data warehouse 205 may include a data store that is capable of storing data in a structured format. The term data is to be read broadly to include anything that may be stored on a computer storage medium. Some examples of data include information, program code, program state, program data, other data, and the like.
A data store may comprise any storage media capable of storing data. For example, a data store may comprise a file system, volatile memory such as RAM, other storage media described in conjunction with
Data stored in the data warehouse 205 may be organized in tables, records, objects, other data structures, and the like. The data may be stored in HTML files, XML files, spreadsheets, flat files, document files, and other files. The data warehouse 205 may comprise a relational database, object-oriented database, hierarchical database, network database, other type of database, some combination or extension of the above, and the like.
Data from a data warehouse 205 may be accessed via a database management system (DBMS). A DBMS may comprise one or more programs that control organization, storage, management, and retrieval of data of the data warehouse 205. A DBMS may receive requests to access data in the data warehouse and may perform the operations needed to provide this access. Access as used herein may include reading data, writing data, deleting data, updating data, a combination including one or more of the above, and the like.
The data warehouse 205 may be implemented on or as one or more computers (e.g., the computer 110 as described in conjunction with
Each of the data sources 210-215 may be implemented on or as one or more computers (e.g., the computer 110 as described in conjunction with
The warehouse agent of a data source may comprise a set of one or more processes, threads, or the like that provide information from the data source to the data warehouse. A warehouse agent may execute periodically, in response to changes of data in the data source, or in some other manner. For example, a warehouse agent may be invoked from a process that updates, deletes, or adds data on a data source. In conjunction with updating, deleting, or adding the data, the warehouse agent may send data to the data warehouse 205.
A data source may include data that is structured according to a type system. In a type system, a type may either be a base type or may derive and extend from another type. For example, a supervisor type may derive from an employee type which may derive from an entity type. A supervisor type may include all the properties of an employee type and may extend these properties with additional properties. Likewise, an employee type may include all the properties of an entity type and may extend these properties. The entity type may be a base type that does not derive from another type.
In an example, when a data source is first implemented, it may be implemented according to a portion of the type system 305. For example, a data source may be implemented with the entity type 310 and the computer type 311 but without any of the types that derive from the computer type 311. A warehousing agent may be implemented to extract and send data from the data source to a data warehouse based on this implemented type system.
Later, as needs dictate, the data source may be extended to include the other types 312-317. Because it was created for the original data type, the warehousing agent may not capture all or a portion of the data in the other types. It is when this occurs that traditional data warehousing systems lose effectiveness in capturing, storing, and reporting on additional data corresponding to the additional types.
A dimension captures an aspect of an organization. For example, an organization may have employees having various responsibilities such as engineering, accounting, management, and so forth. To capture information about employees of any responsibility, a dimension may be created in a data warehouse.
As another example, an organization may have products, stores, orders, and salespersons. Each of these general types may have multiple subtypes, but the organization may desire reports on the general level. To capture information from each of these types and their subtypes, if any, four dimensions may be created at a data warehouse.
As used herein, a subtype is any type that derives directly or indirectly from another type. The subtypes of a type are all types that derive directly or indirectly from the type. Referring to
Returning to
A fact may include zero or more measures. A measure may include additional information about data stored in the one or more dimensions associated by the fact. For example, a measure may include quantity of a product sold in a transaction, CPU or other utilization of a computer, number of software products installed on a computer, price, another measure, or the like.
An outrigger (e.g., an outrigger defined according to the outrigger type 425) associates properties of one or more types (e.g., types associated with the dimensions 420 and 421). For example, one type may include computer information. Computers may be manufactured by various manufacturers. Another type may include printer information. Printers, also, may be manufactured by various manufacturers. Instead of storing the manufacturers in the dimension tables, manufacturer IDs may be stored in the dimension tables. These manufacturer IDs may also be stored in an outrigger table in tuples. Each tuple may include the manufacturer ID and a manufacturer name.
An outrigger table like the one described above may speed and/or simplify obtaining information about manufacturers. For example, without the outrigger table, determining the distinct manufacturers may involve scanning each dimension table that includes manufacturer information, concatenating the manufacturers found, and eliminating duplicates. With the outrigger table, determining the distinct manufacturers may involve just scanning the outrigger table.
Via the mapping 505, a dimension may be associated one-to-one with a type at any level in the type hierarchy. For example, referring to
Via the mapping 505, a fact may be associated with a set of one or more types. Associating a fact with a type allows a fact table to be built which associates multiple dimensions in the data warehouse. Some exemplary XML that may be used to define an exemplary fact is as follows:
In the exemplary XML above, three types are defined: Entity, Computer, and User. A relationship (i.e., ComputerHasOwner) is defined that associates a computer with a user. Then, a fact (i.e., ComputerUser) is defined that includes the relationship (i.e. ComputerHasOwner) previously defined. Similarly, multiple types and relationships between those types may be defined. These relationships may then be used to create a fact that associates multiple dimensions in a data warehouse that are mapped to the types in the data source.
Via the mapping 505, an outrigger may be associated with properties of one or more types. The outrigger may then track name and ID of these properties across the one or more types. Some exemplary XML that may be used to define an exemplary outrigger is as follows:
In the exemplary XML above, three types are defined: Entity, Computer, and Printer. Then, an outrigger is defined that associates the property Manufacturer that is included in the Computer and Printer types. Similarly, outriggers may be defined for a property of a certain type or for a set of similar properties from more than one type.
The definitions for the fact and the outriggers above may include more, less, and/or other types, properties, relationships, associations, and so forth without departing from the spirit or scope of aspects of the subject matter described herein. Furthermore, the form of the definitions for the fact and the outrigger is not limited to XML. For example, the definition may be included in a class hierarchy defined in a language other than XML. Indeed virtually any type definition language for the type system may be used without departing from the spirit or scope of aspects of the subject matter described herein. Based on the structure indicate above and the teachings herein, those skilled in the art may recognize many different type definition languages that may be used to define facts and outriggers without departing from the spirit or scope of aspects of the subject matter described herein.
The phrase “mapping information” refers to information in the mapping 505, data source type system 510, and/or data warehouse model 515. The mapping information may be utilized by one or more components that extract, transform, and load (ETL) data. These components may create and maintain a data warehouse modeled according to the data warehouse model 515 based on a data source structured according to the data source type system 510.
In particular, where the mapping 505 indicates that a type is associated with a dimension, a component may generate a storage element (e.g., a table) of the dimension such that the storage element has fields (e.g., columns) corresponding to the properties included in the type. If the type has subtypes, the component may add any additional properties included in the subtypes to the dimension if the mapping 505 indicates that this is to be done.
If a type system is updated, the component may update (e.g., keep in sync) the storage element of the dimension as appropriate. For example, if the mapping 505 indicates that subtypes are to be mapped to a dimension and that all properties are to be included, when a subtype of a mapped type is added to the type system, the dimension may be updated to include fields corresponding to properties of the subtype. Likewise, if a subtype of a mapped type is deleted, the dimension may be updated to remove fields for properties in the deleted subtype.
For extraction, a component may determine what data to extract from a data source based on the mapping information. For example, if the mapping 505 associates a type with a dimension and indicates that subtypes are not to be associated with the dimension, the component may extract data associated with the type but not extract data associated with subtypes of the type.
Likewise, for loading, a component may determine what data to load into a data warehouse based on the mapping information.
When the mapping information changes, the components above may operate to handle these changes. In one embodiment, a component may create code that does the work desired. For example, a component responsible for extracting data from a data source may generate code to extract the data from the data source. This code may remain until the component generates different code to extract the data.
As another example, a component responsible for maintaining a schema (e.g., table definitions) of a data warehouse, may generate code that maintains the schema. When based on the mapping information, the component determines that the schema of the data warehouse is to be changed, the component may replace the previously generated code with other code.
In another embodiment, the component itself may perform the work desired. For example, a component responsible for extracting data from a data source may change what data it extracts based on the mapping information. In this embodiment, the component may “interpret” the mapping information to determine how to extract data from a data source.
The mapping 505 may receive and store custom code to be used to generate a measure for a particular fact. A measure may not be included in any of the dimensions associated with a fact. For example, a measure of CPU utilization for a computer may not be in a computer dimension. To generate this measure, custom code may be created (e.g., by a developer) and provided to the mapping 505. The code may be stored in or associated with the mapping 505 and may then be subsequently used to generate the measure. It will be recognized that this mechanism allows measures to be calculated based on information outside of associated types in the type system.
In one example, the type system 305 of
The properties indicated above are exemplary and are not intended to be all-inclusive or exhaustive. In an actual type system, there may be many other properties defined in the type system. Furthermore, the form of the definition of the type system is not limited to XML. For example, the definition may be included in a class hierarchy defined in a language other than XML. Indeed virtually any type definition language for the type system may be used without departing from the spirit or scope of aspects of the subject matter described herein. Based on the structure indicate above and the teachings herein, those skilled in the art will recognize many different type definition languages that may be used to define a type system of a data source without departing from the spirit or scope of aspects of the subject matter described herein.
If an administrator desires to create a data warehouse with two dimensions and associate the dimensions with the type system above, the administrator may use the exemplary XML below:
In the XML above, a computer dimension and a server dimension are defined. The computer dimension is associated with the computer type of the previous type system. The computer dimension indicates that subtypes are to be included in the dimension and also indicates that all properties found in all subtypes are to be included.
The server dimension is associated with the server of the previous type system. The server dimension is not to include subtypes of the server type, but is to include all of the properties of the server type.
The two XML snippets above may be associated together by placing them in the same XML document and/or between tags. For example, the two XML snippets above may be placed between tags as follows:
The mapping information may also allow additional interaction between a data source and the data warehouse. For example, using the mapping information, a user viewing the data source may obtain information about a measure for type of the data source. The measure may have been created after the type, but with the mapping information, a data source component may determine that additional information (e.g., a measure) is available and may present a user interface to allow the user to determine what additional information (e.g., what measures) is available and also allow the user to view the additional information.
Furthermore, a user viewing data in the data warehouse may be able to “drill down” into information contained therein and access information from one or more data sources associated with the data warehouse via the mapping information. For example, a user may be viewing a report presented by a component of the data warehouse and may be able to double click (or provide other input) on an employee ID displayed in the report. When the user drills down, the data warehouse may use the mapping information to provide access to the data and/or may open an interface (e.g., a form) that allows the user to directly access the data in the appropriate data source(s).
Reports generated at the data warehouse may be written such that they surface or do not surface new properties included in new subtypes. For example, a report may be written such that it is using a known set of types and properties. This report may maintain its format even if the type, its properties, or the hierarchy are changed.
If a report is authored in a way to anticipate and take advantage of new properties and/or new derivations to be made to existing types, when new properties and/or new derivations are made, the report may automatically allow displaying of the new information as desired.
Turning to
The communications mechanism 645 allows apparatus(es) upon which the system maintainer 605 is hosted to communicate with other entities as shown in
The store 640 is any storage media capable of storing mapping information. The store 640 may comprise a file system, database, volatile memory such as RAM, other storage, some combination of the above, and the like and may be distributed across multiple devices. The store 640 may be external, internal, or include components that are both internal and external to the apparatus(es) hosting the system maintainer 605.
The change detector 615 comprises one or more processes, threads, or the like that are responsible for detecting changes to a data type and/or data on a data store. In response to a change to a data type, the change detector 615 may determine if the change affects a data warehouse. A change may affect the data warehouse if, for example, the change modifies a type or a subtype that is mapped to a dimension, fact, or outrigger. If a change affects the data warehouse, the change detector 615 may trigger the schema updator 620, the extractor component 625, and the loader component 635.
The schema updator 620 may comprise a component that is responsible for updating and/or creating the schema of a data warehouse based on mapping information. For example, the mapping information may indicate types that are associated with dimensions. Using this information, the schema updator 620 may create dimensions having fields (e.g., columns) suitable for storing information from a data source structured according to the types.
The extractor component 625 may comprise a component that is responsible for extracting data from a data source and providing that data to a loader. The extractor component 625 may utilize the mapping information to determine the data that needs to be extracted from a data source. Using the mapping information, the extractor component 625 may generate code that extracts the data from the data source.
The user interface 630 may comprise a component that interfaces with a system administrator or the like to obtain the mapping information. For example, the user interface may 630 may provide a graphical interface in which an administrator may enter associations between elements of a data warehouse (e.g., dimensions, facts, and outriggers) and types of a type system. The interface may also allow an administrator to indicate code usable to generate a measure associated with a fact.
The loader component 635 may comprise a component that is responsible for loading extracted data into a data warehouse. The loader component 635 may utilize the mapping information to determine the data that needs to be loaded into the data warehouse. Using the mapping information, the loader component 635 may generate code that loads the data into the data warehouse.
At block 715, elements of the data warehouse schema are created/updated. For example, referring to
At block 720, components to extract data from the data source are generated. For example, referring to
At block 725, components to load data into the data warehouse are generated. For example, referring to
At block 730, data is extracted and loaded as needed. For example, referring to
At block 735, an indication that the type system has changed is received. For example, referring to
At block 740, a determination is made as to whether the change affects the data warehouse. For example, referring to
At block 745, if the change affects the data warehouse, the actions continue at block 715; otherwise, the actions continue at block 730. If the change affects the data warehouse, then elements of the data warehouse may be updated to accommodate the change. If the change does not affect the data warehouse, the normal process of extracting and loading data may continue.
At block 810, first input is received that indicates a type of a type system. For example, referring to
At block 815, second input is received that indicates an element (e.g., dimension, fact, outrigger) of a data warehouse to associate with the type. For example, referring to
At block 820, third input is received that indicates whether subtypes are also to map to the element. For example, referring to
At block 835, other actions, if any, may occur.
As can be seen from the foregoing detailed description, aspects have been described related data warehousing. While aspects of the subject matter described herein are susceptible to various modifications and alternative constructions, certain illustrated embodiments thereof are shown in the drawings and have been described above in detail. It should be understood, however, that there is no intention to limit aspects of the claimed subject matter to the specific forms disclosed, but on the contrary, the intention is to cover all modifications, alternative constructions, and equivalents falling within the spirit and scope of various aspects of the subject matter described herein.