Abstract:
An abstraction engine receives requests identifying a source application and a logical identifier and maps the request attributes to a stored procedure. The stored procedure invokes a native database call with respect to a database and returns the response to the abstraction later, which reformats the response to an object having &lt;key, value&gt; pairs that is independent of the database protocol or organization. Stored procedures may be mapped to various combinations of attributes of requests, which may include attributes such as a user identifier and application version. The stored procedure may return data from a particular database location or perform more complex functions such as filtering functions with using predefined filer criteria and locations or a filtering criteria and/or location derived from the request.

Description:
RELATED APPLICATION 
       [0001]    The present application claims the benefit of U.S. Provisional Application No. 62/281,474 filed Jan. 21, 2016, which is hereby incorporated herein in its entirety by reference. 
     
    
     TECHNICAL FIELD 
       [0002]    This disclosure relates to systems and methods for accessing a database. 
       BACKGROUND 
       [0003]    For a large enterprise, data may be stored in various locations and any various formats, i.e. different database protocols. Accordingly, applications must format requests according to various protocols and extract data from responses having various formats. This increases the cost of application development. 
         [0004]    The systems and methods disclosed herein provide an improved approach for accessing databases using applications. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0005]    In order that the advantages of the disclosure will be readily understood, a more particular description will be rendered by reference to specific embodiments illustrated in the appended drawings. Understanding that these drawings depict only typical embodiments and are not therefore to be considered limiting of the scope of the claims, the disclosure will be set out and explained with additional specificity and detail through use of the accompanying drawings, in which: 
           [0006]      FIG. 1  is a schematic block diagram of a network environment suitable for implementing embodiments. 
           [0007]      FIG. 2  is a schematic block diagram of an example computing device suitable for implementing methods in accordance with embodiments. 
           [0008]      FIG. 3  is schematic block diagrams of software components of a system in accordance with an embodiment. 
           [0009]      FIG. 4  is a process flow diagram of a method for executing database requests in accordance with an embodiment. 
       
    
    
     DETAILED DESCRIPTION 
       [0010]    It will be readily understood that components of embodiments, as generally described and illustrated in the Figures herein, could be arranged and designed in a wide variety of different configurations. Thus, the following more detailed description of the embodiments of the disclosure, as represented in the Figures, is not intended to limit the scope of the claims but is merely representative of certain examples of presently contemplated embodiments in accordance with that which is claimed. The presently described embodiments will be best understood by reference to the drawings, wherein like parts are designated by like numerals throughout. 
         [0011]    Embodiments in accordance with the present disclosure may be embodied as an apparatus, method, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.), or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “module” or “system.” Furthermore, the present disclosure may take the form of a computer program product embodied in any tangible medium of expression having computer-usable program code embodied in the medium. 
         [0012]    Any combination of one or more computer-usable or computer-readable media may be utilized. For example, a computer-readable medium may include one or more of a portable computer diskette, a hard disk, a random access memory (RAM) device, a read-only memory (ROM) device, an erasable programmable read-only memory (EPROM or Flash memory) device, a portable compact disc read-only memory (CDROM), an optical storage device, and a magnetic storage device. In selected embodiments, a computer-readable medium may comprise any non-transitory medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. 
         [0013]    Computer program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, Smalltalk, C++, or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on a computer system as a stand-alone software package, on a stand-alone hardware unit, partly on a remote computer spaced some distance from the computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). 
         [0014]    The present disclosure is described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions or code. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. 
         [0015]    These computer program instructions may also be stored in a non-transitory computer-readable medium that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instruction means which implement the function/act specified in the flowchart and/or block diagram block or blocks. 
         [0016]    The computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. 
         [0017]    Referring to  FIG. 1 , a network environment  100  may be used to implement methods as described herein. The environment  100  may include a server system  102   a  associated with an entity. The server system  102   a  may host or access one or more databases  104   a.  The server system  102   a  may execute an abstraction engine  106  programmed to access the database  104   a  according to the methods described herein. 
         [0018]    The server system  102   a  may further be in data communication with another server system  102   b  that may host or access another database  104   b.  For example, the server system  102   a  may be coupled to the server system  102   b  by means of a network  108 , such as a local area network (LAN), wide area network (WAN), the Internet, or any other type of wired or wireless network connection. The abstraction engine  106  may access the database  104   b  by way of the network  108  and the server system  102   b.    
         [0019]    Users may access the server system  102   a  by way of personal computers  110 , such as laptop or desktop computers, tablet computers, smartphones, or other types of computing devices. The personal computers may connect to the server system  102   a  by way of the network  108 . In some embodiments, the server system  102   a  operates a web server for receiving and responding to requests from browsers executing on the personal computers  110 . 
         [0020]      FIG. 2  is a block diagram illustrating an example computing device  200 . Computing device  200  may be used to perform various procedures, such as those discussed herein. The server systems  102   a,    102   b  and personal computers  110  may have some or all of the attributes of the computing device  200 . Computing device  200  can function as a server, a client, or any other computing entity. Computing device can perform various monitoring functions as discussed herein, and can execute one or more application programs, such as the application programs described herein. Computing device  200  can be any of a wide variety of computing devices, such as a desktop computer, a notebook computer, a server computer, a handheld computer. a tablet computer and the like. A server system  102   a,    102   b  may include one or more computing devices  200  each including one or more processors. 
         [0021]    Computing device  200  includes one or more processor(s)  202 , one or more memory device(s)  204 , one or more interface(s)  206 , one or more mass storage device(s)  208 , one or more Input/Output (I/O) device(s)  210 , and a display device  230  all of which are coupled to a bus  212 . Processor(s)  202  include one or more processors or controllers that execute instructions stored in memory device(s)  204  and/or mass storage device(s)  208 . Processor(s)  202  may also include various types of computer-readable media, such as cache memory. 
         [0022]    Memory device(s)  204  include various computer-readable media, such as volatile memory (e.g., random access memory (RAM)  214 ) and/or nonvolatile memory (e.g., read-only memory (ROM)  216 ). Memory device(s)  204  may also include rewritable ROM, such as Flash memory. 
         [0023]    Mass storage device(s)  208  include various computer readable media, such as magnetic tapes, magnetic disks, optical disks, solid-state memory (e.g., Flash memory), and so forth. As shown in  FIG. 2 , a particular mass storage device is a hard disk drive  224 . Various drives may also be included in mass storage device(s)  208  to enable reading from and/or writing to the various computer readable media. Mass storage device(s)  208  include removable media  226  and/or non-removable media. 
         [0024]    I/O device(s)  210  include various devices that allow data and/or other information to be input to or retrieved from computing device  200 . Example I/O device(s)  210  include cursor control devices, keyboards, keypads, microphones, monitors or other display devices, speakers, printers, network interface cards, modems, lenses, CCDs or other image capture devices, and the like. 
         [0025]    Display device  230  includes any type of device capable of displaying information to one or more users of computing device  200 . Examples of display device  230  include a monitor, display terminal, video projection device, and the like. 
         [0026]    Interface(s)  206  include various interfaces that allow computing device  200  to interact with other systems, devices, or computing environments. Example interface(s)  206  include any number of different network interfaces  220 , such as interfaces to local area networks (LANs), wide area networks (WAN), wireless networks, and the Internet. Other interface(s) include user interface  218  and peripheral device interface  222 . The interfaces)  206  may also include one or more peripheral interfaces such as interfaces for printers, pointing devices (mice, track pad, etc.), keyboards, and the like. 
         [0027]    Bus  212  allows processor(s)  202 , memory device(s)  204 , interfaces)  206 , mass storage device(s)  208 , I/O device(s)  210 , and display device  230  to communicate with one another, as well as other devices or components coupled to bus  212 . Bus  212  represents one or more of several types of bus structures, such as a system bus, PCI bus, IEEE 1394 bus, USB bus, and so forth. 
         [0028]    For purposes of illustration, programs and other executable program components are shown herein as discrete blocks, although it is understood that such programs and components may reside at various times in different storage components of computing device  200 , and are executed by processor(s)  202 . Alternatively, the systems and procedures described herein can be implemented in hardware, or a combination of hardware, software, and/or firmware. For example, one or more application specific integrated circuits (ASICs) can be programmed to carry out one or more of the systems and procedures described herein. 
         [0029]    Referring to  FIG. 3 , the network environment  100  may implement and/or execute the illustrated software components. An application layer  300  may include various applications that consume data from one or more databases. The application layer  300  may be executed by the same server system  102   a  that executes the abstraction engine  106  or a different server system. Likewise, the application layer  300  may be executed by personal computers  110  in data communication with the server system  102   a.  The application layer  300  may include applications such as reporting applications  302   a,  batch reporting applications  302   b,  visualization applications  302   c,  or any other type of application for accessing and formatting data in a database. 
         [0030]    Data requests from the application layer  300  may be input to the abstraction engine  106  and responses to request may be provided by the abstraction engine  106  to the application layer  300 . 
         [0031]    The abstraction engine may implement a data abstraction service  304  that translates requests and routes them to one or more modules  306   a - 306   c  programmed to access various types of databases. In particular, the data abstraction services  304  may translate requests into procedures executed by, or including calls to, the modules  306   a - 306   c.  Likewise, the data abstraction service  304  receives responses from the modules  306   a - 306   c  and translates them into a universal format, e.g. an object of known format, and returns the responses to the application layer  300 . 
         [0032]    In the illustrated embodiment, module  306   a  is programmed to access click-speed data in an OLTP (On-Line Transaction Processing) type database  308   a.  Module  306   b  is programmed to access an OLAP (On-Line Analytical Processing) type database  308   b.  Module  306   c  accesses cold data in an OLAP type database  308   c.    
         [0033]    Modules may be provided that access any type of data according to any database protocol known in the art. For example, database  308   a  may be an NDatabase from MICROSOFT, database  308   b  may be a TERADATA database, and database  308   c  may be a file server of any type known in the art. Other database protocols such as SQL, DB2, ORACLE, or the like, may also be implemented by the databases  308   a - 308   c.  A batch loading/scheduling module  310  may receive requests from the abstraction engine  106  and submit them to databases  308   a - 308   b  for execution. 
         [0034]    Referring to  FIG. 4 , the data abstraction service  304  may execute the illustrated method  400  in order to translate requests received from the application layer  300  into instructions formatted according to a database protocol of a database  308   a - 308   c.  The method  400  may be executed by the server system  102   a.    
         [0035]    The method  400  may include receiving  402  a request from an application. The request may include some or all of an application identifier (App ID), an application version identifier (Version ID), user identifier (User ID), and a logical identifier that references the data requested (Step Number). The logical identifier does not need to correspond to any particular canonical label of the database to which the request is directed and the request itself does not conform to any particular database protocol. In some embodiments, the logical identifier may be mapped to a value, such as a step number, that is included in a table mapping stored procedures to a combination of request attributes. 
         [0036]    The method  400  then includes extracting  404  the attributes from the request (App ID, Version ID, User ID, Step Number). The method  400  then includes mapping  406  these values to a stored procedure. For example, the data abstraction service  304  may store or access a table that lists potential values for these attributes and maps one or more combinations of values to a stored procedure. The stored procedure may simply invoke retrieval of data form a corresponding database location or may perform more complex tasks such as a filtering function. In some embodiments, in addition to the attributes noted above, the request may include one or more filtering criteria that are then input to the stored procedure corresponding to the attributes of the request. A filtering request may further specify what portion of a data set to search or the portion to be searched may be determined from the logical identifier and programmed into the corresponding stored procedure mapped to the attributes of the request. 
         [0037]    The method  400  may then include executing  408  the stored procedure. The stored procedure may be executed by the server system  102   a  or may be passed to a separate database server  102   b.  The stored procedure will be formatted and submitted in accordance to a particular database to which it is addressed. Accordingly, multiple stored procedures corresponding to different types of databases may be mapped to various combinations of request attributes, thereby enabling multiple types of databases to be accessed by the same application without requiring that the application be programmed to use multiple database protocols. 
         [0038]    Executing  408  the stored procedure may include executing the procedure only upon authentication of a user. For example, the User ID field may be evaluated and the stored procedure is executed only if the User ID is determined to have access to the data referenced by the stored procedure. 
         [0039]    The method  400  may further include receiving  410  a result of execution of the stored procedure. This may include a table of values representing a range of values requested, a result of a filtering operation, or any other type of database access request known in the art. 
         [0040]    The output is then formatted  412  into an object. In particular, inasmuch as the application is abstracted from the specific database protocol, the data from multiple types of databases may all be transformed into a same format. For example, a table may include column and/or row labels such that each value in the table (unique column and row address) may have one or more labels associated therewith. Accordingly, each value may be mapped to one or more values and included in an object as a &lt;key,value&gt; pair, where “key” is a label from the original data table. 
         [0041]    For example, a table may be formatted {&lt;key1&gt;[&lt;key1.1, value1&gt;,&lt;key1.2, value2&gt;. . . ]}. Where key1 is a column label, key1.1 and key 1.2 are labels for rows, and value1 is the value at column key1 and row key1.1 and value2 is the value at column key1 and row key1.2. 
         [0042]    The &lt;key,value&gt; pairs may be stored in an object and streamed or formatted directly into a stream of data returned  414  to the application that issued the request corresponding to the data. The object returned may be a JSON (JavaScript object notation) object, XML (extensible markup language) object, or any other type of data object. 
         [0043]    The above-described approach provides many advantages. For example, if a database is moved from a first database according to a first protocol to a second database of a second protocol, the entry in the stored procedures map may be changed such that a given combination of request attributes will point to a procedure corresponding to the second protocol and second database rather than the first protocol and the first database. However, the format of the request does not need to change and no reprogramming of applications making requests is required. 
         [0044]    Likewise, if the organization (e.g. ordering of columns or rows) of a database may be changed without requiring any modification of an application accessing the database. Inasmuch as data is transformed into &lt;key,value&gt; pairs, the actual ordering of the columns will not impact the intelligibility of the data, since each value will be labeled. 
         [0045]    The present invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described embodiments are to be considered in all respects only as illustrative, and not restrictive. The scope of the invention is, therefore, indicated by the appended claims, rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.