The present invention relates to the field of data retrieval and manipulation and, more specifically, to providing a logical view of a data source.
A development tool such as, for example, VISUAL STUDIO™ from Microsoft Corp. of Redmond, Wash., enables development of a wide range of computing applications. Such applications may include, for example, web applications, extensible markup language (XML) applications, and traditional client applications. If an application is data-driven, then the application may have one or more associated data sources. Such data sources may be for example, databases, web services, extensible markup language (XML) documents, and business objects. Such data sources may be used to categorize, organize, and maintain data that is useful to an application.
Conventional development tools may include a server management console to enable the user to explore and manage databases. Such a server management console may be, for example, SERVER EXPLORER™ from Microsoft Corp. of Redmond, Wash. Such a server management console may enable the user to make data connections and log onto servers. Once connected to a server, the management console may be used to explore the server databases and system services including, for example, event logs, message queues, and performance counters.
Specifically, the management console may provide a physical view of connected databases. The term physical, as used herein, refers to the actual manner in which data is organized in a data source. For example, the physical view may include a tree structure in which each connected database is a top level node. Tables, views, stored procedures, and functions within a particular database may be viewed by opening a node corresponding to the particular database. In turn, columns and triggers for a particular table may be viewed by opening a node corresponding to the particular table. Additionally, the management console may provide a link to a database designer or table designer that enables the user to visually design a database or data tables. Furthermore, the management console may enable the user to add, delete, and modify data source elements in the physical view.
Importantly, resources from the server management console may be imported into a development tool designer. When such resources are imported, the designer may automatically create components that reference the imported resources. For example, a data table node from the physical view discussed above may be imported into the designer. The data table node may be dragged and dropped onto a designer surface. Once dropped onto the designer, an object may be created with an interface to view and manipulate the database.
A drawback of conventional server management consoles is that, because they provide a physical view of connected data sources, they do not offer a consistent experience for viewing and manipulating different heterogeneous data sources. For example, a database may organize data in a physical layout including tables which, in turn, include rows and columns, while an extensible markup language (XML) document may organize data into a different physical layout including elements, sub-elements, and attributes. In addition to being inconsistent across different types of data sources, a physical view be confusing to a user because it does not necessarily organize data in a manner that is intuitive to users.
Thus, there is a need in the art for systems and methods for providing a logical view of a connected data source. Such a logical view will offer a consistent experience for viewing and manipulating different heterogeneous data sources. Additionally, such a logical view will make data from middle tier or object sources of data as easy to target as traditional database data. Furthermore, such a logical view will present data in a logical manner that is intuitive to users. It is desired that data source objects may be imported from the logical view into a designer, and that the designer may generate interfaces for viewing, managing, and manipulating the data source objects. It is further desired that such a logical view enable users to explore, add, delete, and modify data source elements directly from the development tool. Systems and methods with these and other characteristics are desired.
Systems and methods for providing a logical view of a data source are disclosed. The data source may include a number of data source objects organized according to a data source schema. The data source schema may be retrieved or inferred, and the data source objects may be identified. A logical relationship between the data source objects may be determined based on the data source schema. A logical view of the data source that shows the logical relationship between the data source objects may be displayed.
According an aspect of the invention, an interface may be provided that enables a user to identify the data source. Alternatively, a reference such as, for example, a uniform resource locator that identifies the data source may be detected. Once the data source is identified, the data source schema may be retrieved from the data source. Alternatively, the data source schema may be retrieved from a document that is available locally.
According to another aspect of the invention, if the data source schema is not available, then the data source schema may be inferred. Once the data source schema is retrieved or inferred, an interface may be provided that enables the user to select particular data source objects to include in the logical view of the data source.
According to another aspect of the invention, the logical view of the data source may be displayed in a logical data source interface. The logical data source interface may include a logical tree structure with nodes corresponding to data source objects. The data source interface may enable the user to add, modify, and delete a data source object, and such changes may be propagated back to the data source. The data source interface may also enable the user to associate a data source object with a designer object in a designer interface. Upon associating the data source object with the designer object, a display interface may be generated within the designer object to enable the user to view, manage, and manipulate the data source object. A default interface to view, manage, and manipulate the data source object may be selected by the user in the logical data source interface. The logical data source interface may also be filtered to display only data source objects that are associated with a selected designer object.
Additional features and advantages of the invention will be made apparent from the following detailed description of illustrative embodiments that proceeds with reference to the accompanying drawings.
The illustrative embodiments will be better understood after reading the following detailed description with reference to the appended drawings, in which:
The subject matter of the present invention is described with specificity to meet statutory requirements. However, the description itself is not intended to limit the scope of this patent. Rather, the inventors have contemplated that the claimed subject matter might also be embodied in other ways, to include different steps or elements similar to the ones described in this document, in conjunction with other present or future technologies. Moreover, although the term “step” may be used herein to connote different aspects of methods employed, the term should not be interpreted as implying any particular order among or between various steps herein disclosed unless and except when the order of individual steps is explicitly described.
We will now explain the present invention with reference to presently preferred, exemplary embodiments. We will first describe illustrative computing and development environments in which the invention may be practiced, and then we will describe presently preferred implementations of the invention.
Illustrative Computer Environment
As shown in
The personal computer 120 may further include a hard disk drive 127 for reading from and writing to a hard disk (not shown), a magnetic disk drive 128 for reading from or writing to a removable magnetic disk 129, and an optical disk drive 130 for reading from or writing to a removable optical disk 131 such as a CD-ROM or other optical media. The hard disk drive 127, magnetic disk drive 128, and optical disk drive 130 are connected to the system bus 123 by a hard disk drive interface 132, a magnetic disk drive interface 133, and an optical drive interface 134, respectively. The drives and their associated computer-readable media provide non-volatile storage of computer readable instructions, data structures, program modules and other data for the personal computer 120.
Although the exemplary environment described herein employs a hard disk, a removable magnetic disk 129, and a removable optical disk 131, it should be appreciated that other types of computer readable media which can store data that is accessible by a computer may also be used in the exemplary operating environment. Such other types of media include a magnetic cassette, a flash memory card, a digital video disk, a Bernoulli cartridge, a random access memory (RAM), a read-only memory (ROM), and the like.
A number of program modules may be stored on the hard disk, magnetic disk 129, optical disk 131, ROM 124 or RAM 125, including an operating system 135, one or more application 212 programs 136, other program modules 137 and program data 138. A user may enter commands and information into the personal computer 120 through input devices such as a keyboard 140 and pointing device 142 such as a mouse. Other input devices (not shown) may include a microphone, joystick, game pad, satellite disk, scanner, or the like. These and other input devices are often connected to the processing unit 121 through a serial port interface 146 that is coupled to the system bus, but may be connected by other interfaces, such as a parallel port, game port, or universal serial bus (USB). A monitor 147 or other type of display device is also connected to the system bus 123 via an interface, such as a video adapter 148. In addition to the monitor 147, a personal computer typically includes other peripheral output devices (not shown), such as speakers and printers. The exemplary system of
When used in a LAN networking environment, the personal computer 120 is connected to the LAN 151 through a network interface or adapter 153. When used in a WAN networking environment, the personal computer 120 typically includes a modem 154 or other means for establishing communications over the wide area network 152, such as the Internet. The modem 154, which may be internal or external, is connected to the system bus 123 via the serial port interface 146. In a networked environment, program modules depicted relative to the personal computer 120, or portions thereof, may be stored in the remote memory storage device. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.
Exemplary Development Environment
An exemplary prior art development environment is shown in
Development tool 210 includes server management console 215 that enables database 220a to be explored, managed, and manipulated at development tool 210. Server management console may be, for example, SERVER EXPLORER™ from Microsoft Corp. of Redmond, Wash. Server management console 215 may enable the user to connect and log on to database 220a. Once connected to database 220a, server management console 215 may be used to explore database 220a and system services including, for example, event logs, message queries, and performance counters. Specifically, server management console 215 may provide a physical view of data source objects database 220a. Such data source objects may include, for example, tables, stored procedures, columns, and triggers. Such a physical view is discussed in detail below with reference to
Development tool 210 also includes designer 212, which is an interface that enables the user to create, view, manage, and manipulate objects associated with a development project. Such objects may include, for example, forms and controls. A form is an object that enables the presentation of information to the user and the acceptance of input information from the user. A form may expose properties which define its appearance, methods which define its behavior, and events which define its interaction with the user. By setting its properties and writing code to respond to its events, a user may customize a form to meet the requirements of an application. A simple way to define a user interface for a form is to place controls on the form's surface.
A control is an object that is contained within a form. A control may be an object such as, for example, a data grid view, a drop down list, a combo-box, a button, or a check-box. Each type of control has its own set of properties, methods, and events that make it suitable for a particular purpose. The designer 212 enables a user to add controls to a form. For example, the designer 212 may enable a control to be added to a form by dragging and dropping the control from a toolbox, double clicking on the control in a toolbox, or selecting the control in a toolbox and lassoing an area in the form. Once a control is added to a from, the designer 212 enables the control to be aligned and positioned within the form.
Importantly, a designer object within designer 212 may be associated with a database object within server management console 215. For example, a form in the designer 212 may be associated with a particular data table within database 220a. There are a number of methods for associating a designer object with a database object. For example, a database object may be dragged from server management console 215 and dropped into an object within designer 212. When a designer object is associated with a database object, the object may be automatically populated with elements of the database object. For example, if a designer object is associated with a data table, the designer object may be automatically populated with the columns of the data table.
Referring now to
Importantly, as shown by the double arrowed dashed line in
In addition to associating data source objects with designer objects, the physical tree structure shown in
A drawback of server management console 215 is that, because it provides a physical view of connected data sources, it does not offer a consistent experience for viewing and manipulating different heterogeneous data sources. Furthermore, a physical view be confusing to a user because it does not necessarily organize data in a manner that is intuitive to users. Thus, systems and methods of the present invention are directed to providing a logical rather than a physical view of connected data sources.
Systems and Methods of the Present Invention
An exemplary development environment 400 in accordance with the present invention is shown in
Network 230 may be a local are network (LAN) or a wide area network (WAN) such as, for example, the Internet. As should be appreciated, XML document 220c and business object 220d may be stored locally at development tool 210 and need not necessarily be accessed via network 230. Additionally, database 220a may be on a local server or file at development tool 210. Also, web service “proxy” objects may be stored locally or referenced and may delegate to a remote service. Furthermore, XML document 220c and object 220d may be stored in a referenced assembly.
Unlike development tool 210 of
Logical data source interface 415 may enable a data source object to be associated with a designer object within designer 212. There are a number of methods for associating a data source object with a designer object. For example, a data source object may be dragged from logical data source interface 415 and dropped into an object within designer 212. When a data source object is associated with a designer object, the designer object may be automatically populated with elements of the data source object.
Referring now to
Importantly, the data in the logical view shown in
Each element within the logical tree structure has an associated icon that is displayed adjacent to the element. The icon indicates the type of display interface that is generated to display the element in an associated designer object. Specifically, the grid icon next to each business object indicates that a grid display will generated to display the business object. The text box icon next to each property indicates that a text box input field will generated to display the property. The text box icons include a rectangular box surrounding the letters “ab”.
As shown by the double arrowed dashed line in
Logical data source interface 415 may enable the user to select a type of display interface with which to display each data source object in designer 212. Referring now to
Referring now to
The list of display interfaces shown in the drop down menus of
Logical data source interface 415 may enable the user to connect to new data sources. When the user connects to a new data source, a data configuration wizard may be displayed that enables the user to select particular data source objects to be included in the logical view of the data source. Referring now to
The user may make changes to the logical structure of a data source using logical data source interface 415. Specifically, the user may add and delete data source objects. For example, the user may remove the Customers data table from database 220a. Furthermore, the user may display data source objects in designer 212 and then modify the displayed data source objects. For example, the user may add a record to the Customers data table by adding a row to the grid interface displayed in form 312 of
The logical view shown in logical data source interface 415 may be filtered according to a selected designer object within designer 212. For example, if form 312 of
Development tool 212 may also include a properties interface which displays properties of objects within the development environment 400. The properties interface may be configured to display properties of particular data source objects in logical data source interface 415. For example, if the Customer object is selected within logical data source interface 415, then the properties of the Customer object may be displayed in the properties interface.
A flowchart of an exemplary method for providing a logical view of a data source in accordance with the present invention is shown in
Steps 910-914 are optional steps. In place of steps 910-914, logical data source interface 415 may detect a document that includes the data source schema and retrieve the data source schema directly from the detected document. The document may be part of a development project managed by development tool 210.
Alternatively, logical data source interface 415 may detect a reference that identifies the data source and may connect to the data source using the reference. The reference may be, for example, a uniform resource locator (URL) or a reference to an assemnbly. The reference may also be part of a development project managed by development tool 210.
Additionally, if a data source schema is not available, then, rather than retrieving that data source schema at step 914, development tool 210 may infer the data source schema. The data source schema may be inferred by, for example, using reflection capabilities to inspect the shape of objects returned by a data source. Using reflection capabilities may enable development tool 210 to discover, for example, a set of properties that an object exposes including name and type. Examining the properties may enable relationships between the properties to be inferred. An exemplary set of classes is shown below:
By looking at the Customer class, development tool 210 may identify that a data source has one property called ‘Orders’ that is of type ‘Order’. Therefore, a relationship between Customer and Order may be inferred.
At step 916, data source objects within the data source are identified based on the retrieved or inferred data source schema. At step 918, an interface is provided to enable the user to select data source objects to be included in the logical view. Such an interface may be, for example, data configuration wizard 900 of
At step 920, a logical relationship is determined between the selected data source objects. At step 922, a logical view of the data source is provided. The logical view shows the logical relationship between the selected data source objects. The logical view may be, for example, a logical tree structure as shown in
Conclusion
Systems and methods for providing a logical view of a data source have been disclosed. The disclosed logical view offers a consistent experience for viewing and manipulating different heterogeneous data sources. Additionally, the disclosed logical view will make data from middle tier or object sources of data as easy to target as traditional database data. Furthermore, the disclosed logical view presents data in a logical manner that is intuitive to humans. Data source objects may be imported from the logical view into a designer, and the designer may generate interfaces for viewing, managing, and manipulating the data source objects. The disclosed logical view may enable a user to explore, add, delete, and modify data source elements directly from the development tool.
While the present invention has been described in connection with the preferred embodiments of the various figures, it is to be understood that other similar embodiments may be used or modifications and additions may be made to the described embodiment for performing the same function of the present invention without deviating therefrom. For example, in addition to a tree structure, the logical view may be displayed using other logical structures such as for example a detailed object diagram. Therefore, the present invention should not be limited to any single embodiment, but rather should be construed in breadth and scope in accordance with the appended claims.
This application is related by subject matter to U.S. patent application (Ser. No. unknown) entitled “System and Method for Generating a Parameterized Query” filed on Jan. 30, 2004 (Attorney Docket Number MSFT-2958, Client Docket Number 307292.01), U.S. patent application (Ser. No. unknown) entitled “System and Method for Exposing a Child List” filed on Jan. 30, 2004 (Attorney Docket Number MSFT-2959, Client Docket Number 307291.01), and U.S. patent application (Ser. No. unknown) entitled “System and Method for Exposing Tasks in a Development Environment” filed on Jan. 30, 2004 (Attorney Docket Number MSFT-2961, Client Docket Number 307290.01), the contents of which are hereby incorporated by reference in their entirety.