US20130318128A1 - Systems and Methods for Generating a Common Data Model for Relational and Object Oriented Databases - Google Patents
Systems and Methods for Generating a Common Data Model for Relational and Object Oriented Databases Download PDFInfo
- Publication number
- US20130318128A1 US20130318128A1 US13/480,279 US201213480279A US2013318128A1 US 20130318128 A1 US20130318128 A1 US 20130318128A1 US 201213480279 A US201213480279 A US 201213480279A US 2013318128 A1 US2013318128 A1 US 2013318128A1
- Authority
- US
- United States
- Prior art keywords
- data
- class
- relational database
- database
- modeling engine
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/289—Object oriented databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/211—Schema design and management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/28—Databases characterised by their database models, e.g. relational or object models
- G06F16/284—Relational databases
Definitions
- the present invention relates to computing, and in particular, to systems and methods for generating a common data model for relational and object-oriented databases.
- mapping data stored in objects to relational database systems is widely discussed, such mapping has performance issues or a negative influence on software design.
- object databases One problem associated with using object databases that it is not always possible to use them because object databases tend to be slow and are not widely accepted. It is generally desirable to use multiple databases of different types. However, object databases typically are not compatible with existing relational database software. Consequently, there exists a need for improved systems and methods for using relational and object-oriented databases.
- the present invention addresses this problem, and others, by providing systems and methods for generating a common data model for relational and object-oriented databases.
- Embodiments of the present invention include systems and methods for performing direct reporting access to transactional data stores.
- the present invention includes a computer-implemented method comprising receiving a query, in a controller, wherein a data store stores data in a relational database.
- the database comprises a plurality of fields and a plurality of data elements. Each field is associated with a portion of the data elements.
- the database is arranged as at least one table, and the query identifies data of an object to be stored in a data set.
- the method further includes determining, by the controller, whether the relational database includes a field associated with a class of the object; and if the relational database does not include a field associated with the class of the object, adding a column to the relational database, the added column having a field corresponding to the class.
- the method further includes adding the data of the object to the relational database.
- the at least one table is a single table including all objects.
- the at least one table includes a main table and at least one partition table for each sub-class of a class of the main table.
- the at least one table includes a partition table for each sub-class of said at least one partition table.
- the at least one table includes a partition table for each sub-class of said at least one partition table, said partition table includes columns of said at least one partition table.
- the partition table for each sub-class of said at least one partition table includes at least one additional column
- the method further includes determining whether a first table of the at least one table has a size that exceeds a threshold; and generating at least one partition table for each sub-class of the first table if the size of the first table exceeds the threshold.
- the method further includes generating a bit vector indicative of whether an element of the table belongs to the class.
- the method further includes compressing columns of the at least one table.
- the method further includes indexing the at least one table.
- the added column is based on the inheritance of the class.
- the database is arranged as at least one table in a column store format.
- the present invention includes a computer readable medium embodying a computer program for performing a method and embodiments described above.
- the present invention includes a computer system comprising one or more processors implementing the techniques described herein.
- the system includes a controller that receives a query.
- a data store stores data in a relational database.
- the database comprises a plurality of fields and a plurality of data elements. Each field is associated with a portion of the data elements.
- the database is arranged as at least one table.
- the query identifies data of an object to be stored in a data set.
- the controller determining whether the relational database includes a field associated with a class of the object. If the relational database does not include a field associated with the class of the object, the controller adds a column to the relational database, the added column having a field corresponding to the class. The controller adds the data of the object to the relational database.
- FIG. 1 is a schematic representation of a system for generating a common data model for relational and object-oriented databases according to an embodiment of the present invention.
- FIG. 2 illustrates an example table for a single table data store according to an embodiment of the present invention.
- FIG. 3 illustrates example tables for a partitioned table data store according to an embodiment of the present invention.
- FIG. 4 illustrates a process for generating a relational database according to an embodiment of the present invention.
- FIG. 5 illustrates a process generating multiple partition tables for a relational database according to an embodiment of the present invention.
- FIG. 6 illustrates a process generating a table of a relational database according to an embodiment of the present invention.
- FIG. 7 illustrates hardware used to implement embodiments of the present invention.
- Described herein are techniques for generating a common data model for relational and object-oriented databases.
- the apparatuses, methods, and techniques described below may be implemented as a computer program (software) executing on one or more computers.
- the computer program may further be stored on a computer readable medium.
- the computer readable medium may include instructions for performing the processes described below.
- FIG. 1 is a schematic representation of a system 100 for generating a common data model for relational and object-oriented databases according to an embodiment of the present invention.
- System 100 includes a user or other interface 105 , a data store 108 , and a data modeling system 112 .
- data store is used interchangeably with “database.”
- Data store 108 may comprise one or more data stores.
- Data modeling system 112 comprises a relational database 120 , an object database 121 , an index database 122 , a relational database model 124 , a data modeling engine 125 and a controller 130 .
- Information is conveyed between user interface 105 , data store 108 , and data modeling system 112 , along data flow paths 132 , 133 , and 134 .
- data modeling system 112 accesses the contents of database 108 over data flow path 134 when combining data.
- Relational database 120 and object database 121 are sets of data that are stored in database 108 and accessed by data modeling system 112 .
- Object database 121 stores data based on objects. The objects may be defined by a class, sub-classes, and inheritance between classes and sub-classes.
- Index database 122 comprises an index of relational database 120 and object database 121 for facilitating searching.
- Data modeling engine 125 executes a process or algorithm that analyzes data from relational database 120 , object database 121 and index database 122 and generates relational database model 124 based on the analysis. Data modeling engine 125 analyzes various properties of the databases for generating the relational database model 124 .
- relational database model 124 is arranged in a column store format. In some embodiments, relational database model 124 is arranged in a row store format.
- User or other interface 105 is a collection of one or more data input/output devices for interacting with a human user or with another data processing system to receive and output data.
- interface 105 can be a presentation system, one or more software applications, or a data communications gateway, for example.
- Data flow path 132 is data communicated over interface 105 that retrieves data from or causes a change to data stored in database 108 . Such changes include the insertion, deletion, or modification of all or a portion of the contents of database 108 .
- Data output over interface 105 can present the results of data processing activities in system 100 .
- data flow path 133 can convey the results of queries or other operations performed on data modeling system 112 for presentation on a monitor or a data communications gateway.
- Data store 108 is a collection of information that is stored at one or more data machine readable storage devices (e.g., data stores). Data store 108 may be a single data store or multiple data stores, which may be coupled to one or more software applications for storing application data. Data store 108 may store data as a plurality of data records. Each data record comprises a plurality of data elements (e.g., fields of a record). Data store 108 may include different structures and their relations (e.g., data store tables, data records, fields, and foreign key relations). Additionally, different structures and fields may include data types, descriptions, or other metadata, for example, which may be different for different data records. Data flow path 134 conveys information describing changes to data stored in data store 108 between data modeling system 112 and data store 108 Such changes include the insertion, deletion, and modification of all or a portion of the contents of one or more data stores.
- Data modeling system 112 is a collection of data processing activities (e.g., one or more data analysis programs or methods) performed in accordance with the logic of a set of machine-readable instructions.
- the data processing activities can include running queries on the contents of data store 108 .
- the results of such queries can be aggregated to yield an aggregated result set.
- a query is a request for information.
- a result set is a set of information that answers a query.
- An aggregated result set is a set of information from a data store that answers a query, such as from data store 108 .
- the set of information in an aggregated result set can be, for example, a union of the results of independent queries on two or more data sets.
- the aggregated result sets can be conveyed to interface 105 over data flow path 133 .
- Interface 105 can, in turn, render the aggregated result sets over an output device for a human or other user or to other systems.
- Controller 130 may be a component on the same system as a data store or part of a different system and may be implemented in hardware, software, or as a combination of hardware and software, for example. Controller 130 receives a query from data combination engine 125 and generates one or more requests based on the received query depending on the data stores 108 and data sets that are to be accessed. Data store 108 transforms the request from controller 130 into a query syntax (e.g., SQL) compatible with the data store, and the query may specify specific tables and fields to be read from the data store.
- a query syntax e.g., SQL
- Controller 130 receives data from data store 108 .
- controller 130 may aggregate the data of the data sets from data store 108 .
- the aggregation may be implemented with a join operation, for example.
- controller 130 returns the aggregated data to data combination engine 125 in response to the query.
- FIG. 2 illustrates a single table 200 in accordance with one embodiment of the present invention.
- Table 200 stores data for one class and all sub-classes of the class.
- the class is employee.
- Sub-classes are, for example, department, title and union status.
- Table 200 includes columns for all fields of all objects. If one field is only present in one class, the column is there for all the other classes as well. In those cases, the field is unused and set to null.
- data modeling engine 125 compresses the unused values. For example, only one employee (Tim Thomas) shown in the list is a member of the union. The values for all other shown employees are null. The column of union status may be compressed.
- data modeling engine 125 uses index database 122 for searching for a selected object type.
- table 200 further includes a column that includes information about the object type of a data entry for each class of the object stored in table 200 .
- the column is a bit-vector. The bit-vector indicates whether the row of table 200 belongs to the class of the vector.
- Data modeling engine 125 performs a logical AND of the bit vector with the corresponding class column.
- Data modeling engine 125 uses the bit-vector to accelerate the search on specific object types, or to sort table 200 for compression.
- data modeling engine 125 generates a one bit vector for each transaction during transactional processing. The one bit vector defines whether the row corresponding to the vector is seen by the transaction.
- Data modeling engine 125 may insert new rows into table 200 during parallel transactions, which may not be visible for already running transactions.
- Data modeling engine 125 determines the visible rows by performing a logical AND operation with the consistent view bit vector of the transaction and the bit vectors of the class.
- Data modeling engine 125 may sort table 200 according to the class hierarchy resulting in all objects of the same class are next to each other in table 200 . This sorting allows higher compression rates using block compression. In this instance, data modeling engine 125 compresses the null values for the higher compression.
- FIG. 3 illustrates a table 300 that is partitioned into tables based on sub-classes.
- Main table 300 is a main table that represents the super-class for all other objects of object database 121 .
- main table 300 includes three additional partitions. Partition tables are generated for each sub-class of a class in the main table. Although the partitions are described based on class, other attributes of the objects may be used for partitioning. Each partition has a different number of columns A partition has always the same columns as its super-class partition and might add its own columns.
- a partition table 310 and a partition table 320 are partitions for sub-classes of the class represented as main table 300 .
- a partition table 321 is a partition for a sub-class of partition table 320 .
- Partition table 310 , partition table 320 , and partition table 321 include the columns 311 of main table 300 .
- Partition table 310 includes an additional column 312 .
- Partition table 320 includes additional columns 322 , which in the illustrative example is two different columns
- Partition table 321 includes columns 311 and columns 322 of partition table 320 , and further includes an additional column 323 .
- Data modeling engine 125 may generate partition table 310 , partition table 320 and partition table 321 based on the inheritance of the classes and sub-classes of main table 300 .
- the partition tables are generated based on the inheritance of a class. In some embodiments, a partition tables may be generated from more than one class or sub-class.
- FIG. 4 illustrates a process for generating relational database model 124 according to an embodiment of the present invention.
- data modeling system 112 receives an object database 121 .
- data modeling engine 125 determines whether the size of relational database model 124 created from object database 121 exceeds a threshold. If the size exceeds the threshold, at 408 , data modeling engine 125 generates a partitioned database as described below in conjunction with FIG. 5 . Otherwise, at 410 , data modeling engine 125 generates a single table such as table 200 . Data modeling engine 125 may generate the table 200 using the process described below in conjunction with FIG. 6 .
- data modeling engine 125 does not determine the size of the database model 124 at 406 , and generates a single table at 410 regardless of the size of relational database model 124 .
- data modeling engine 125 generates vectors for the class.
- data modeling engine 125 creates or updates index database 122 .
- FIG. 5 illustrates a process for generating relational database model 124 includes a multiple table according to an embodiment of the present invention.
- data modeling engine 125 generates a main table and iteratively checks whether the table has any sub-classes and continues generating partition tables at lower levels.
- Data modeling engine 125 may generate the table 300 and the partition tables 310 , 320 and 321 using the process described below in conjunction with FIG. 6 .
- data modeling engine 125 moves up a level and checks the partition table.
- FIG. 5 is described for the multiple table of FIG. 3 .
- partition tables are generated based on the inheritance of a class.
- a partition tables may be generated from more than one class or sub-class.
- data modeling engine 125 generates a standard table instead of a partition table.
- data modeling engine 125 generates a main table (main table 300 ).
- data modeling engine 125 determines whether the current table being evaluated (table 300 in the first iteration) has any sub-classes. If so, at 506 , data modeling engine 125 generates a partition table (table 310 in the first instance) based on the sub-class.
- data modeling engine 125 determines whether the partition table generated at 506 as a sub-class. In the illustrative example, table 310 does not have any sub-classes.
- data modeling engine 125 increases the level of the partition table under evaluation (now table 300 ) and at 504 determines whether the table 300 has another sub-class.
- table 300 has a second sub-class
- data modeling engine 125 generates a sub-level partition table 320 .
- data modeling engine 125 determines that table 320 has a sub-class, and at 506 generates table 321 .
- data modeling engine 125 determines that table 321 has no sub-classes, and at 510 increases a level.
- data modeling engine 125 determines that table 320 has no further sub-classes.
- data modeling engine 125 determines that the level is not the last level.
- data modeling engine 125 increases the level to table 300 .
- data modeling engine 125 determines that table 300 has no further sub-classes, and at 512 , determines table 300 is the last level. At 512 , data modeling engine 125 ends the generation of the table and returns to 408 ( FIG. 4 ).
- a hybrid partitioning may be performed.
- the partition tables may be partitioned when the partitioned table exceeds a threshold size.
- data modeling engine 125 may search for objects of a class and, within the same query, search for objects of a super classes, sub-classes or both.
- FIG. 6 illustrates a process generating a table of a relational database according to an embodiment of the present invention.
- data modeling engine 125 determines whether relational database 124 includes a field associated with a class of the object. If, at 602 , relational database 124 does not include a field associated with the class of the object, at 604 , data modeling engine 125 adds a column to relational database 124 . The added column has a field corresponding to the class. In some embodiments, data modeling engine 125 stores the data for the field in metadata fields associated with the database or in index database 122 . At 606 , data modeling engine 125 adds the data of the object to relational database 124 .
- FIG. 7 illustrates hardware used to implement embodiments of the present invention.
- An example computer system 710 is illustrated in FIG. 7 .
- Computer system 710 includes a bus 705 or other communication mechanism for communicating information, and one or more processors 701 coupled with bus 705 for processing information.
- Computer system 710 also includes a memory 702 coupled to bus 705 for storing information and instructions to be executed by processor 701 , including information and instructions for performing the techniques described above, for example.
- This memory may also be used for storing variables or other intermediate information during execution of instructions to be executed by processor 701 . Possible implementations of this memory may be, but are not limited to, random access memory (RAM), read only memory (ROM), or both.
- a machine readable storage device 703 is also provided for storing information and instructions.
- Storage devices include, for example, a non-transitory electromagnetic medium such as a hard drive, a magnetic disk, an optical disk, a CD-ROM, a DVD, a flash memory, a USB memory card, or any other medium from which a computer can read.
- Storage device 703 may include source code, binary code, or software files for performing the techniques above, for example.
- Storage device 703 and memory 702 are both examples of computer readable mediums.
- Computer system 710 may be coupled via bus 705 to a display 712 , such as a cathode ray tube (CRT) or liquid crystal display (LCD), for displaying information to a computer user.
- a display 712 such as a cathode ray tube (CRT) or liquid crystal display (LCD)
- An input device 711 such as a keyboard and/or mouse is coupled to bus 705 for communicating information and command selections from the user to processor 701 .
- the combination of these components allows the user to communicate with the system, and may include, for example, user interface 105 .
- bus 705 may be divided into multiple specialized buses.
- Computer system 710 also includes a network interface 704 coupled with bus 705 .
- Network interface 704 may provide two-way data communication between computer system 710 and the local network 720 , for example.
- the network interface 704 may be a digital subscriber line (DSL) or a modem to provide data communication connection over a telephone line, for example.
- DSL digital subscriber line
- Another example of the network interface is a local area network (LAN) card to provide a data communication connection to a compatible LAN.
- LAN local area network
- Wireless links are another example.
- network interface 704 sends and receives electrical, electromagnetic, or optical signals that carry digital data streams representing various types of information.
- Computer system 710 can send and receive information, including messages or other interface actions, through the network interface 704 across a local network 720 , an Intranet, or the Internet 730 .
- computer system 710 may communicate with a plurality of other computer machines, such as server 715 .
- server 715 may be programmed with processes described herein.
- software components or services may reside on multiple different computer systems 710 or servers 731 - 735 across the network.
- Some or all of the processes described above may be implemented on one or more servers, for example.
- data store 108 and data combination system 112 might be located on different computer systems 710 or one or more servers 715 and 731 - 735 , for example.
- a server 731 may transmit actions or messages from one component, through Internet 730 , local network 720 , and network interface 704 to a component on computer system 710 .
- the software components and processes described above may be implemented on any computer system and send and/or receive information across a network, for example.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
- The present invention relates to computing, and in particular, to systems and methods for generating a common data model for relational and object-oriented databases.
- Most commercially used programming languages are object-oriented languages or have similar features. Many programs written in such languages make heavy use of databases and could not function without them. However, most common database systems are relational databases. Although mapping data stored in objects to relational database systems is widely discussed, such mapping has performance issues or a negative influence on software design.
- One problem associated with using object databases that it is not always possible to use them because object databases tend to be slow and are not widely accepted. It is generally desirable to use multiple databases of different types. However, object databases typically are not compatible with existing relational database software. Consequently, there exists a need for improved systems and methods for using relational and object-oriented databases. The present invention addresses this problem, and others, by providing systems and methods for generating a common data model for relational and object-oriented databases.
- Embodiments of the present invention include systems and methods for performing direct reporting access to transactional data stores. In one embodiment, the present invention includes a computer-implemented method comprising receiving a query, in a controller, wherein a data store stores data in a relational database. The database comprises a plurality of fields and a plurality of data elements. Each field is associated with a portion of the data elements. The database is arranged as at least one table, and the query identifies data of an object to be stored in a data set. The method further includes determining, by the controller, whether the relational database includes a field associated with a class of the object; and if the relational database does not include a field associated with the class of the object, adding a column to the relational database, the added column having a field corresponding to the class. The method further includes adding the data of the object to the relational database.
- In one embodiment, the at least one table is a single table including all objects.
- In one embodiment, the at least one table includes a main table and at least one partition table for each sub-class of a class of the main table.
- In one embodiment, the at least one table includes a partition table for each sub-class of said at least one partition table.
- In one embodiment, the at least one table includes a partition table for each sub-class of said at least one partition table, said partition table includes columns of said at least one partition table.
- In one embodiment, the partition table for each sub-class of said at least one partition table and includes at least one additional column
- In one embodiment, the method further includes determining whether a first table of the at least one table has a size that exceeds a threshold; and generating at least one partition table for each sub-class of the first table if the size of the first table exceeds the threshold.
- In one embodiment the method further includes generating a bit vector indicative of whether an element of the table belongs to the class.
- In one embodiment, the method further includes compressing columns of the at least one table.
- In one embodiment, the method further includes indexing the at least one table.
- In one embodiment, the added column is based on the inheritance of the class.
- In one embodiment, the database is arranged as at least one table in a column store format.
- In another embodiment, the present invention includes a computer readable medium embodying a computer program for performing a method and embodiments described above.
- In another embodiment, the present invention includes a computer system comprising one or more processors implementing the techniques described herein. For example, the system includes a controller that receives a query. A data store stores data in a relational database. The database comprises a plurality of fields and a plurality of data elements. Each field is associated with a portion of the data elements. The database is arranged as at least one table. The query identifies data of an object to be stored in a data set.
- The controller determining whether the relational database includes a field associated with a class of the object. If the relational database does not include a field associated with the class of the object, the controller adds a column to the relational database, the added column having a field corresponding to the class. The controller adds the data of the object to the relational database.
- The following detailed description and accompanying drawings provide a better understanding of the nature and advantages of the present invention.
-
FIG. 1 is a schematic representation of a system for generating a common data model for relational and object-oriented databases according to an embodiment of the present invention. -
FIG. 2 illustrates an example table for a single table data store according to an embodiment of the present invention. -
FIG. 3 illustrates example tables for a partitioned table data store according to an embodiment of the present invention. -
FIG. 4 illustrates a process for generating a relational database according to an embodiment of the present invention. -
FIG. 5 illustrates a process generating multiple partition tables for a relational database according to an embodiment of the present invention. -
FIG. 6 illustrates a process generating a table of a relational database according to an embodiment of the present invention. -
FIG. 7 illustrates hardware used to implement embodiments of the present invention. - Described herein are techniques for generating a common data model for relational and object-oriented databases. The apparatuses, methods, and techniques described below may be implemented as a computer program (software) executing on one or more computers. The computer program may further be stored on a computer readable medium. The computer readable medium may include instructions for performing the processes described below. In the following description, for purposes of explanation, numerous examples and specific details are set forth in order to provide a thorough understanding of the present invention. It will be evident, however, to one skilled in the art that the present invention as defined by the claims may include some or all of the features in these examples alone or in combination with other features described below, and may further include modifications and equivalents of the features and concepts described herein.
-
FIG. 1 is a schematic representation of asystem 100 for generating a common data model for relational and object-oriented databases according to an embodiment of the present invention.System 100 includes a user or other interface 105, adata store 108, and adata modeling system 112. In the following description, the term “data store” is used interchangeably with “database.”Data store 108 may comprise one or more data stores.Data modeling system 112 comprises arelational database 120, anobject database 121, anindex database 122, a relational database model 124, adata modeling engine 125 and acontroller 130. - Information is conveyed between user interface 105,
data store 108, anddata modeling system 112, alongdata flow paths data modeling system 112 accesses the contents ofdatabase 108 overdata flow path 134 when combining data. -
Relational database 120 andobject database 121 are sets of data that are stored indatabase 108 and accessed bydata modeling system 112.Object database 121 stores data based on objects. The objects may be defined by a class, sub-classes, and inheritance between classes and sub-classes.Index database 122 comprises an index ofrelational database 120 andobject database 121 for facilitating searching.Data modeling engine 125 executes a process or algorithm that analyzes data fromrelational database 120,object database 121 andindex database 122 and generates relational database model 124 based on the analysis.Data modeling engine 125 analyzes various properties of the databases for generating the relational database model 124. In some embodiments, relational database model 124 is arranged in a column store format. In some embodiments, relational database model 124 is arranged in a row store format. - User or other interface 105 is a collection of one or more data input/output devices for interacting with a human user or with another data processing system to receive and output data. For example, interface 105 can be a presentation system, one or more software applications, or a data communications gateway, for example.
Data flow path 132 is data communicated over interface 105 that retrieves data from or causes a change to data stored indatabase 108. Such changes include the insertion, deletion, or modification of all or a portion of the contents ofdatabase 108. Data output over interface 105 can present the results of data processing activities insystem 100. For example,data flow path 133 can convey the results of queries or other operations performed ondata modeling system 112 for presentation on a monitor or a data communications gateway. -
Data store 108 is a collection of information that is stored at one or more data machine readable storage devices (e.g., data stores).Data store 108 may be a single data store or multiple data stores, which may be coupled to one or more software applications for storing application data.Data store 108 may store data as a plurality of data records. Each data record comprises a plurality of data elements (e.g., fields of a record).Data store 108 may include different structures and their relations (e.g., data store tables, data records, fields, and foreign key relations). Additionally, different structures and fields may include data types, descriptions, or other metadata, for example, which may be different for different data records.Data flow path 134 conveys information describing changes to data stored indata store 108 betweendata modeling system 112 anddata store 108 Such changes include the insertion, deletion, and modification of all or a portion of the contents of one or more data stores. -
Data modeling system 112 is a collection of data processing activities (e.g., one or more data analysis programs or methods) performed in accordance with the logic of a set of machine-readable instructions. The data processing activities can include running queries on the contents ofdata store 108. The results of such queries can be aggregated to yield an aggregated result set. A query is a request for information. A result set is a set of information that answers a query. An aggregated result set is a set of information from a data store that answers a query, such as fromdata store 108. The set of information in an aggregated result set can be, for example, a union of the results of independent queries on two or more data sets. The aggregated result sets can be conveyed to interface 105 overdata flow path 133. Interface 105 can, in turn, render the aggregated result sets over an output device for a human or other user or to other systems. This output of aggregated result sets drawn fromdata modeling system 112, based on data fromdata store 108, allowssystem 100 to accurately portray the combination of different data sets. - Queries from the
data combination engine 125 or the user interface 105 may be received bycontroller 130.Controller 130 may be a component on the same system as a data store or part of a different system and may be implemented in hardware, software, or as a combination of hardware and software, for example.Controller 130 receives a query fromdata combination engine 125 and generates one or more requests based on the received query depending on thedata stores 108 and data sets that are to be accessed.Data store 108 transforms the request fromcontroller 130 into a query syntax (e.g., SQL) compatible with the data store, and the query may specify specific tables and fields to be read from the data store. -
Controller 130 receives data fromdata store 108. In responding to the query fromdata combination engine 125,controller 130 may aggregate the data of the data sets fromdata store 108. The aggregation may be implemented with a join operation, for example. Finally,controller 130 returns the aggregated data todata combination engine 125 in response to the query. -
FIG. 2 illustrates a single table 200 in accordance with one embodiment of the present invention. Table 200 stores data for one class and all sub-classes of the class. In the illustrative example, the class is employee. Sub-classes are, for example, department, title and union status. Table 200 includes columns for all fields of all objects. If one field is only present in one class, the column is there for all the other classes as well. In those cases, the field is unused and set to null. In some embodiments,data modeling engine 125 compresses the unused values. For example, only one employee (Tim Thomas) shown in the list is a member of the union. The values for all other shown employees are null. The column of union status may be compressed. - In some embodiments,
data modeling engine 125 usesindex database 122 for searching for a selected object type. In some embodiments, table 200 further includes a column that includes information about the object type of a data entry for each class of the object stored in table 200. In some embodiments, the column is a bit-vector. The bit-vector indicates whether the row of table 200 belongs to the class of the vector.Data modeling engine 125 performs a logical AND of the bit vector with the corresponding class column.Data modeling engine 125 uses the bit-vector to accelerate the search on specific object types, or to sort table 200 for compression. In some embodiments,data modeling engine 125 generates a one bit vector for each transaction during transactional processing. The one bit vector defines whether the row corresponding to the vector is seen by the transaction. This provides a consistent view during transactional processing, becausedata modeling engine 125 may insert new rows into table 200 during parallel transactions, which may not be visible for already running transactions.Data modeling engine 125 determines the visible rows by performing a logical AND operation with the consistent view bit vector of the transaction and the bit vectors of the class. -
Data modeling engine 125 may sort table 200 according to the class hierarchy resulting in all objects of the same class are next to each other in table 200. This sorting allows higher compression rates using block compression. In this instance,data modeling engine 125 compresses the null values for the higher compression. -
FIG. 3 illustrates a table 300 that is partitioned into tables based on sub-classes. Main table 300 is a main table that represents the super-class for all other objects ofobject database 121. In the illustrative example ofFIG. 3 , main table 300 includes three additional partitions. Partition tables are generated for each sub-class of a class in the main table. Although the partitions are described based on class, other attributes of the objects may be used for partitioning. Each partition has a different number of columns A partition has always the same columns as its super-class partition and might add its own columns In the illustrative example ofFIG. 3 , a partition table 310 and a partition table 320 are partitions for sub-classes of the class represented as main table 300. A partition table 321 is a partition for a sub-class of partition table 320. - Partition table 310, partition table 320, and partition table 321 include the
columns 311 of main table 300. Partition table 310 includes anadditional column 312. Partition table 320 includesadditional columns 322, which in the illustrative example is two different columns Partition table 321 includescolumns 311 andcolumns 322 of partition table 320, and further includes anadditional column 323.Data modeling engine 125 may generate partition table 310, partition table 320 and partition table 321 based on the inheritance of the classes and sub-classes of main table 300. - In some embodiments, the partition tables are generated based on the inheritance of a class. In some embodiments, a partition tables may be generated from more than one class or sub-class.
-
FIG. 4 illustrates a process for generating relational database model 124 according to an embodiment of the present invention. At 402,data modeling system 112 receives anobject database 121. At 404,data modeling engine 125 determines whether the size of relational database model 124 created fromobject database 121 exceeds a threshold. If the size exceeds the threshold, at 408,data modeling engine 125 generates a partitioned database as described below in conjunction withFIG. 5 . Otherwise, at 410,data modeling engine 125 generates a single table such as table 200.Data modeling engine 125 may generate the table 200 using the process described below in conjunction withFIG. 6 . In some embodiments,data modeling engine 125 does not determine the size of the database model 124 at 406, and generates a single table at 410 regardless of the size of relational database model 124. In some embodiments, at 412,data modeling engine 125 generates vectors for the class. In some embodiments, at 414,data modeling engine 125 creates orupdates index database 122. -
FIG. 5 illustrates a process for generating relational database model 124 includes a multiple table according to an embodiment of the present invention. In the process ofFIG. 5 ,data modeling engine 125 generates a main table and iteratively checks whether the table has any sub-classes and continues generating partition tables at lower levels.Data modeling engine 125 may generate the table 300 and the partition tables 310, 320 and 321 using the process described below in conjunction withFIG. 6 . When a table does not have a sub-class,data modeling engine 125 moves up a level and checks the partition table.Data modeling engine 125 moves up levels as partitions are finished for the table. In an illustrative example,FIG. 5 is described for the multiple table ofFIG. 3 . AlthoughFIG. 5 , is described for a partition for each class, in some embodiments, the partition tables are generated based on the inheritance of a class. In some embodiments, a partition tables may be generated from more than one class or sub-class. In some embodiments,data modeling engine 125 generates a standard table instead of a partition table. - At 502,
data modeling engine 125 generates a main table (main table 300). At 504,data modeling engine 125 determines whether the current table being evaluated (table 300 in the first iteration) has any sub-classes. If so, at 506,data modeling engine 125 generates a partition table (table 310 in the first instance) based on the sub-class. At 508,data modeling engine 125 determines whether the partition table generated at 506 as a sub-class. In the illustrative example, table 310 does not have any sub-classes. At 510,data modeling engine 125 increases the level of the partition table under evaluation (now table 300) and at 504 determines whether the table 300 has another sub-class. In this example, table 300 has a second sub-class, and at 506,data modeling engine 125 generates a sub-level partition table 320. At 508,data modeling engine 125 determines that table 320 has a sub-class, and at 506 generates table 321. At 508,data modeling engine 125 determines that table 321 has no sub-classes, and at 510 increases a level. At 504,data modeling engine 125 determines that table 320 has no further sub-classes. At 512,data modeling engine 125 determines that the level is not the last level. At 510,data modeling engine 125 increases the level to table 300. At 504,data modeling engine 125 determines that table 300 has no further sub-classes, and at 512, determines table 300 is the last level. At 512,data modeling engine 125 ends the generation of the table and returns to 408 (FIG. 4 ). - In some embodiments of
FIG. 5 , a hybrid partitioning may be performed. The partition tables may be partitioned when the partitioned table exceeds a threshold size. In some embodiments ofFIG. 5 ,data modeling engine 125 may search for objects of a class and, within the same query, search for objects of a super classes, sub-classes or both. -
FIG. 6 illustrates a process generating a table of a relational database according to an embodiment of the present invention. At 602,data modeling engine 125 determines whether relational database 124 includes a field associated with a class of the object. If, at 602, relational database 124 does not include a field associated with the class of the object, at 604,data modeling engine 125 adds a column to relational database 124. The added column has a field corresponding to the class. In some embodiments,data modeling engine 125 stores the data for the field in metadata fields associated with the database or inindex database 122. At 606,data modeling engine 125 adds the data of the object to relational database 124. -
FIG. 7 illustrates hardware used to implement embodiments of the present invention. Anexample computer system 710 is illustrated inFIG. 7 .Computer system 710 includes abus 705 or other communication mechanism for communicating information, and one ormore processors 701 coupled withbus 705 for processing information.Computer system 710 also includes amemory 702 coupled tobus 705 for storing information and instructions to be executed byprocessor 701, including information and instructions for performing the techniques described above, for example. This memory may also be used for storing variables or other intermediate information during execution of instructions to be executed byprocessor 701. Possible implementations of this memory may be, but are not limited to, random access memory (RAM), read only memory (ROM), or both. A machinereadable storage device 703 is also provided for storing information and instructions. Common forms of storage devices include, for example, a non-transitory electromagnetic medium such as a hard drive, a magnetic disk, an optical disk, a CD-ROM, a DVD, a flash memory, a USB memory card, or any other medium from which a computer can read.Storage device 703 may include source code, binary code, or software files for performing the techniques above, for example.Storage device 703 andmemory 702 are both examples of computer readable mediums. -
Computer system 710 may be coupled viabus 705 to adisplay 712, such as a cathode ray tube (CRT) or liquid crystal display (LCD), for displaying information to a computer user. Aninput device 711 such as a keyboard and/or mouse is coupled tobus 705 for communicating information and command selections from the user toprocessor 701. The combination of these components allows the user to communicate with the system, and may include, for example, user interface 105. In some systems,bus 705 may be divided into multiple specialized buses. -
Computer system 710 also includes anetwork interface 704 coupled withbus 705.Network interface 704 may provide two-way data communication betweencomputer system 710 and thelocal network 720, for example. Thenetwork interface 704 may be a digital subscriber line (DSL) or a modem to provide data communication connection over a telephone line, for example. Another example of the network interface is a local area network (LAN) card to provide a data communication connection to a compatible LAN. Wireless links are another example. In any such implementation,network interface 704 sends and receives electrical, electromagnetic, or optical signals that carry digital data streams representing various types of information. -
Computer system 710 can send and receive information, including messages or other interface actions, through thenetwork interface 704 across alocal network 720, an Intranet, or theInternet 730. For a local network,computer system 710 may communicate with a plurality of other computer machines, such asserver 715. Accordingly,computer system 710 and server computer systems represented byserver 715 may be programmed with processes described herein. In the Internet example, software components or services may reside on multipledifferent computer systems 710 or servers 731-735 across the network. Some or all of the processes described above may be implemented on one or more servers, for example. Specifically,data store 108 anddata combination system 112 might be located ondifferent computer systems 710 or one ormore servers 715 and 731-735, for example. Aserver 731 may transmit actions or messages from one component, throughInternet 730,local network 720, andnetwork interface 704 to a component oncomputer system 710. The software components and processes described above may be implemented on any computer system and send and/or receive information across a network, for example. - The above description illustrates various embodiments of the present invention along with examples of how aspects of the present invention may be implemented. The above examples and embodiments should not be deemed to be the only embodiments, and are presented to illustrate the flexibility and advantages of the present invention as defined by the following claims. Based on the above disclosure and the following claims, other arrangements, embodiments, implementations and equivalents will be evident to those skilled in the art and may be employed without departing from the spirit and scope of the invention as defined by the claims.
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US13/480,279 US8589451B1 (en) | 2012-05-24 | 2012-05-24 | Systems and methods for generating a common data model for relational and object oriented databases |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US13/480,279 US8589451B1 (en) | 2012-05-24 | 2012-05-24 | Systems and methods for generating a common data model for relational and object oriented databases |
Publications (2)
Publication Number | Publication Date |
---|---|
US8589451B1 US8589451B1 (en) | 2013-11-19 |
US20130318128A1 true US20130318128A1 (en) | 2013-11-28 |
Family
ID=49555886
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US13/480,279 Active US8589451B1 (en) | 2012-05-24 | 2012-05-24 | Systems and methods for generating a common data model for relational and object oriented databases |
Country Status (1)
Country | Link |
---|---|
US (1) | US8589451B1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150324382A1 (en) * | 2014-05-12 | 2015-11-12 | Thomas Seufert | Optimizing single-value database read operations using a single value cache |
US11481321B2 (en) | 2017-03-27 | 2022-10-25 | Sap Se | Asynchronous garbage collection in parallel transaction system without locking |
US11558067B2 (en) * | 2020-05-19 | 2023-01-17 | Sap Se | Data compression techniques |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101981575B (en) * | 2008-06-03 | 2012-11-28 | 图形科技公司 | Method and apparatus for copying objects in an object-oriented environment using a multiple-transaction technique |
JP5826114B2 (en) * | 2012-05-25 | 2015-12-02 | クラリオン株式会社 | Data decompression device, data compression device, data decompression program, data compression program, and compressed data distribution system |
CN108614868B (en) * | 2018-04-16 | 2021-09-17 | 北京酷我科技有限公司 | Automatic database upgrading method |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5761493A (en) * | 1990-04-30 | 1998-06-02 | Texas Instruments Incorporated | Apparatus and method for adding an associative query capability to a programming language |
WO1995003586A1 (en) * | 1993-07-21 | 1995-02-02 | Persistence Software, Inc. | Method and apparatus for generation of code for mapping relational data to objects |
US5734887A (en) * | 1995-09-29 | 1998-03-31 | International Business Machines Corporation | Method and apparatus for logical data access to a physical relational database |
US6016497A (en) * | 1997-12-24 | 2000-01-18 | Microsoft Corporation | Methods and system for storing and accessing embedded information in object-relational databases |
CA2427354A1 (en) * | 2000-10-31 | 2002-08-01 | Michael Philip Kaufman | System and method for generating automatic user interface for arbitrarily complex or large databases |
US8161081B2 (en) * | 2001-03-16 | 2012-04-17 | Michael Philip Kaufman | System and method for generating automatic user interface for arbitrarily complex or large databases |
US20040205692A1 (en) * | 2001-01-12 | 2004-10-14 | Robinson Marck R. | Method and system for creating reusable software components through a uniform interface |
US7454367B2 (en) * | 2002-03-29 | 2008-11-18 | Siebel Systems, Inc. | Dynamic pricing system and method |
US8122062B2 (en) * | 2003-07-22 | 2012-02-21 | Sap Ag | Meta model for an enterprise service architecture |
US7590643B2 (en) * | 2003-08-21 | 2009-09-15 | Microsoft Corporation | Systems and methods for extensions and inheritance for units of information manageable by a hardware/software interface system |
US8078646B2 (en) * | 2008-08-08 | 2011-12-13 | Oracle International Corporation | Representing and manipulating RDF data in a relational database management system |
-
2012
- 2012-05-24 US US13/480,279 patent/US8589451B1/en active Active
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150324382A1 (en) * | 2014-05-12 | 2015-11-12 | Thomas Seufert | Optimizing single-value database read operations using a single value cache |
US10360210B2 (en) * | 2014-05-12 | 2019-07-23 | Sap Se | Optimizing single-value database read operations using a single value cache |
US11481321B2 (en) | 2017-03-27 | 2022-10-25 | Sap Se | Asynchronous garbage collection in parallel transaction system without locking |
US11558067B2 (en) * | 2020-05-19 | 2023-01-17 | Sap Se | Data compression techniques |
Also Published As
Publication number | Publication date |
---|---|
US8589451B1 (en) | 2013-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11681702B2 (en) | Conversion of model views into relational models | |
US10664497B2 (en) | Hybrid database table stored as both row and column store | |
US20190272265A1 (en) | Hybrid Database Table Stored As Both Row and Column Store | |
US8768927B2 (en) | Hybrid database table stored as both row and column store | |
Junghanns et al. | Gradoop: Scalable graph data management and analytics with hadoop | |
US8589451B1 (en) | Systems and methods for generating a common data model for relational and object oriented databases | |
US10452639B2 (en) | Processing joins in a database system using zero data records | |
US9582553B2 (en) | Systems and methods for analyzing existing data models | |
US11200223B2 (en) | System and method for dependency analysis in a multidimensional database environment | |
EP2590088B1 (en) | Database queries enriched in rules | |
US20100235344A1 (en) | Mechanism for utilizing partitioning pruning techniques for xml indexes | |
US9098550B2 (en) | Systems and methods for performing data analysis for model proposals | |
US10402383B2 (en) | DBMS-supported score assignment | |
US10963474B2 (en) | Automatic discriminatory pattern detection in data sets using machine learning | |
Dwivedi et al. | Performance analysis of column oriented database vs row oriented database | |
US10885157B2 (en) | Determining a database signature | |
Rajadnye | Is Datawarehouse Relevant in the Era of Big Data? | |
CN113051441A (en) | Storage design and management method of entity object | |
Lin et al. | A fast method for frequent pattern discovery with secondary memory | |
Vittapu et al. | Synchronous CR-OLAP Tool for Efficient Parallel Computing | |
CN111159218A (en) | Data processing method and device and readable storage medium | |
Antwi et al. | Building smart cubes for reliable and faster access to data | |
Sun | On Optimal Evaluation of Preference Queries |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: SAP AG, GERMANY Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:ZAHN, TOBIAS;GEISSINGER, STEFFEN;SIGNING DATES FROM 20120522 TO 20120524;REEL/FRAME:028267/0800 |
|
FEPP | Fee payment procedure |
Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
AS | Assignment |
Owner name: SAP SE, GERMANY Free format text: CHANGE OF NAME;ASSIGNOR:SAP AG;REEL/FRAME:033625/0334 Effective date: 20140707 |
|
FEPP | Fee payment procedure |
Free format text: PAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY Free format text: PAYER NUMBER DE-ASSIGNED (ORIGINAL EVENT CODE: RMPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
FPAY | Fee payment |
Year of fee payment: 4 |
|
MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 8TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1552); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY Year of fee payment: 8 |