⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 databasehandler.html

📁 数据挖掘方面最新软件
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_13) on Mon Jul 14 01:36:51 CEST 2008 --><TITLE>DatabaseHandler (RapidMiner Class Documentation)</TITLE><META NAME="keywords" CONTENT="com.rapidminer.tools.jdbc.DatabaseHandler class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="DatabaseHandler (RapidMiner Class Documentation)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/DatabaseHandler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../com/rapidminer/tools/jdbc/ColumnIdentifier.html" title="class in com.rapidminer.tools.jdbc"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseService.html" title="class in com.rapidminer.tools.jdbc"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?com/rapidminer/tools/jdbc/DatabaseHandler.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="DatabaseHandler.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">com.rapidminer.tools.jdbc</FONT><BR>Class DatabaseHandler</H2><PRE>java.lang.Object  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.rapidminer.tools.jdbc.DatabaseHandler</B></PRE><HR><DL><DT><PRE>public class <B>DatabaseHandler</B><DT>extends java.lang.Object</DL></PRE><P><p>This class hides the database. Using <A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#connect(java.lang.String, java.lang.String, boolean)"><CODE>connect(String,String,boolean)</CODE></A>, you can extablish a connection to the database. Once connected, queries and updates are possible.</p>  <p>Please note that the queries does not end with the statement terminator (e.g.  ; for Oracle or GO for Sybase). The JDBC driver will automatically add the correct terminator.</p><P><P><DL><DT><B>Version:</B></DT>  <DD>$Id: DatabaseHandler.java,v 1.11 2008/07/11 16:46:15 ingomierswa Exp $</DD><DT><B>Author:</B></DT>  <DD>Ingo Mierswa</DD></DL><HR><P><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#DEFAULT_FETCH_SIZE">DEFAULT_FETCH_SIZE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#OVERWRITE_MODE_APPEND">OVERWRITE_MODE_APPEND</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#OVERWRITE_MODE_NONE">OVERWRITE_MODE_NONE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#OVERWRITE_MODE_OVERWRITE">OVERWRITE_MODE_OVERWRITE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#OVERWRITE_MODES">OVERWRITE_MODES</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#DatabaseHandler(java.lang.String, com.rapidminer.tools.jdbc.JDBCProperties)">DatabaseHandler</A></B>(java.lang.String&nbsp;databaseURL,                <A HREF="../../../../com/rapidminer/tools/jdbc/JDBCProperties.html" title="class in com.rapidminer.tools.jdbc">JDBCProperties</A>&nbsp;properties)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor of the database handler.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#addColumn(com.rapidminer.example.Attribute, java.lang.String)">addColumn</A></B>(<A HREF="../../../../com/rapidminer/example/Attribute.html" title="interface in com.rapidminer.example">Attribute</A>&nbsp;attribute,          java.lang.String&nbsp;tableName)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a column for the given attribute to the table with name tableName.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#commit()">commit</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes all changes to the database permanent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#connect(java.lang.String, java.lang.String, boolean)">connect</A></B>(java.lang.String&nbsp;username,        java.lang.String&nbsp;passwd,        boolean&nbsp;autoCommit)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Establishes a connection to the database.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#countRecords(java.sql.ResultSet)">countRecords</A></B>(java.sql.ResultSet&nbsp;rs)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Counts the number of records in the given result set.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.util.List&lt;<A HREF="../../../../com/rapidminer/example/Attribute.html" title="interface in com.rapidminer.example">Attribute</A>&gt;</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#createAttributes(java.sql.ResultSet)">createAttributes</A></B>(java.sql.ResultSet&nbsp;rs)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a list of attributes reflecting the result set's column meta data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.sql.PreparedStatement</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#createPreparedStatement(java.lang.String)">createPreparedStatement</A></B>(java.lang.String&nbsp;sqlString)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a prepared statement where result sets will have the properties   TYPE_SCROLL_SENSITIVE and CONCUR_UPDATABLE.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.sql.Statement</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#createStatement()">createStatement</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a statement where result sets will have the properties   TYPE_SCROLL_SENSITIVE and CONCUR_UPDATABLE.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#createTable(com.rapidminer.example.ExampleSet, java.lang.String, int)">createTable</A></B>(<A HREF="../../../../com/rapidminer/example/ExampleSet.html" title="interface in com.rapidminer.example">ExampleSet</A>&nbsp;exampleSet,            java.lang.String&nbsp;tableName,            int&nbsp;overwriteMode)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new table in this connection and fills it with the provided data.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/tools/jdbc/DatabaseHandler.html#disconnect()">disconnect</A></B>()</CODE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -