A SIMPLE APPROACH FOR DATA MINING IN DELPHI

Data mining is a technique used to uncover previously unknown and potentially useful knowledge from large datasets. It turns data into actionable information for better decision making. Delphi incorporates a collection of high-performance data-analysis components known as the Decision Cube. The Decision Cube offers an easy path to powerful data analysis in an application. This paper describes a simple approach for data mining using the Decision Cube components of Delphi. It requires only some drag-and-dropping and property-setting, with no need for manual coding. It does not require special knowledge of data mining. At the end, an example is offered.


INTRODUCTION
With the development of society and enlargement of human activity, more and more data are produced.
Simultaneously, progress in digital data acquisition and storage technology has resulted in the growth of huge databases (Hand et al., 2001). Databases today can range in size into terabytes -more than 10 12 bytes of data.
Hidden information of strategic importance lies within these masses of data (Two Crow's Corporation, 1999).
However, when there are so many data and such huge databases, how can we get meaningful and useful knowledge from these large datasets? With ordinary tools or methods, it is difficult or even impossible. In this situation, data mining has been proposed, as a new technology and discipline providing a new and effective method to process data.

Data Mining
Data mining is a result of the evolution of databases and has become an important branch of database technology. Data mining, also popularly referred to as knowledge discovery in databases (KDD), is the automated or convenient extraction of patterns representing knowledge implicitly stored in large databases, data warehouses, and other massive information repositories (Han & Kamber, 2001). In short, data mining obtains useful and interesting information from very large datasets. It has many names: knowledge extraction, data archaeology, data dredging, and data/pattern analysis. Data mining has become increasingly common in many fields, such as banking, insurance, medicine, retailing, biology, and agriculture. In this paper we briefly describe data mining using a common data mining tool -Delphi.

Delphi
Delphi is an object-oriented, visual programming environment that develops applications for deployment on Windows and Linux (Borland, 2001). Delphi is usually considered to be a rapid application development (RAD) Data Science Journal, Volume 6, Supplement, 23 December 2007 S981 tool. It has a very large visual component library (VCL), which provides a large number of components. This is very helpful for developing highly efficient applications with a minimum of manual coding.
Delphi holds many database components, such as Data Access, Data Controls, and Decision Cube, which make database-application development very easy and highly efficient. In this paper, we use only the Data Cube components. This group of components includes TDecisionCube, TDecisionQuery, TDecisionSource, TDecisionPivot, TDecisionGrid and TDecisionGraph, which introduce an easy way to provide powerful data analysis capabilities to an application, without having to write very much code.

PROPOSED APPROACH
We implemented a simple data mining task in Delphi using Decision Cube. This approach needed only drag-and-dropping and property-setting without any manual coding. The analysis process included two steps.
First, we arranged all the components of Decision Cube in a form and set property values. Second, we set some properties values, as follows.

Select dataset source through TDecisionQuery
We selected the dataset source though the decision query Editor Box (Figure 2), reached the TDecisionQuery component. In this box, we selected the database and its table, chose the necessary fields as dimensions to be analyzed, and chose the calculation form (sum, average, or count). The selected fields and forms were displayed in "Dimension" box and "Summaries" box, respectively. After this setting, the SQL text was automatically formed and displayed in the SQL Query box (Figure 3). The text also could be edited through clicking "Edit Query" button.

Analyze dataset
We used the TDecisionCube component to receive a dataset from TDecisionQuery and analyze it, and then we transported the analyzed data to TDecisionGrid and TDecisionGraph through TDecisionSource.
After the necessary properties of TDecisionQuery were set, TDecisionCube and the Decision Cube Editor Box appeared ( Figure 4). In this box, we set properties of the selected fields.

Visualize result
Visualizing the analysis results is the final process. We utilized the TDecisionSource component to transport result data to TDecisionPivot, TDecisionGraph, and TDecisionGrid by setting these components' DecisionSource property as the name of their TDecisionSource component. We used TDecisionPivot to choosehow to display result data, TDecisionGrid to display the results in a table, TDecisionGraph to display result data in a graph. We chose the type of graph and change other graphing properties through the Editing DecisionGraph box (Figure 5), which appear from choices in TDecisionGraph component.
Finally, we set TDecisionQuery component's Active property as true.

EXAMPLE
In this example, we chose the DBDEMOS database, affiliated with Delphi, as our data source. The task was to analyze the relationship between salary and hiredate.

Arrange components in a form
We placed components of Decision Cube in a form and arranged them by setting their "Align" properties. At the Data Science Journal, Volume 6, Supplement, 23 December 2007 S982 same time, we set some dataset properties to connect the data sources among components. The changed properties are shown in Table 1, and values of the other properties are set by default. The final form is Figure 1.

Set value of important property in TDecisionQuery
In the Decision Query Editor Box, we selected DBDEMOS as the database and employee.db as the table. The selected fields and calculation form are shown in Figure 2. The SQL Query text was automatically formed as

Set value of property in TDecisionCube
We set selected fields' properties in the Decision Cube Editor Box (Figure 4). In this box, we could set the dimension's display name, type, and so on. In this example, we set all to default.

Set value of property in TDecisionGraph
We set graphing properties in the Editing DecisionGraph box (Figure5). Some values were also set as in Figure   5. Most values were set to default.
To change the graph type, the change button in Figure 5 can be used, and a new box displays as in Figure 6. In this example, we selected bar graph and canceled 3D effect.

Results
After finishing those settings, we set the TDecisionQuery's Active property to true. Then we ran the program and got the result shown in Figure 7.
From Figure 7, we see that the employee hired in 1988 receives the highest average salary. On the other hand, the average salary has no definite relationship with hiredate.

DISCUSSION
This paper presents only a very simple example of data mining in Delphi. Actually, in Delphi, more complicated and efficient data mining applications can be developed. Through changing the values of properties, we can get more information and different kinds of graphs.

S984
The data source can originate in various databases and Excel files through BDE or ODBC or ADO. Data mining results can also be represented in many forms, such as charts, formulas, and text.