\Header{dbReadTable-methods}{Convenience functions for Importing/Exporting DBMS tables}
\alias{dbExistsTable,SQLiteConnection,character-method}{dbReadTable-methods}
\alias{dbExistsTable-methods}{dbReadTable-methods}
\alias{dbReadTable,SQLiteConnection,character-method}{dbReadTable-methods}
\alias{dbRemoveTable,SQLiteConnection,character-method}{dbReadTable-methods}
\alias{dbRemoveTable-methods}{dbReadTable-methods}
\alias{dbWriteTable,SQLiteConnection,character,data.frame-method}{dbReadTable-methods}
\alias{dbWriteTable-methods}{dbReadTable-methods}
\keyword{interface}{dbReadTable-methods}
\keyword{interface}{dbReadTable-methods}
\keyword{database}{dbReadTable-methods}
\begin{Description}\relax
These functions mimic their R/S-Plus counterpart 
\code{get},
\code{assign},
\code{exists}, 
\code{remove}, and
\code{objects},
except that they generate code that gets remotely executed
in a database engine.\end{Description}
\begin{Value}
A data.frame in the case of \code{dbReadTable}; otherwise a logical 
indicating whether the operation was successful.\end{Value}
\begin{Section}{Methods}
\describe{
\item[conn] an \code{SQLiteConnection} database connection object.

\item[name] a character string specifying a table name.

\item[value] a data.frame (or coercible to data.frame).

\item[row.names] in the case of \code{dbReadTable}, this argument can be a string or
an index specifying the column in the DBMS table to be used as 
\code{row.names} in the output data.frame (a \code{NULL}, \code{""}, or 0 
specifies that no column should be used as \code{row.names} in the output).

In the case of \code{dbWriteTable}, this argument should be a logical
specifying whether the \code{row.names} should be output to the
output DBMS table; if \code{TRUE}, an extra field whose name will be 
whatever the R/S-Plus identifier \code{"row.names"} maps to the DBMS
(see \code{\Link{make.db.names}}).

\item[overwrite] a logical specifying whether to overwrite an existing table
or not.  Its default is \code{FALSE}.

\item[append] a logical specifying whether to append to an existing table
in the DBMS.  Its default is \code{FALSE}.

\item[\dots ] any optional arguments.
}\end{Section}
\begin{Note}\relax
Note that the data.frame returned by \code{dbReadTable} only has
primitive data, e.g., it does not coerce character data to factors.

SQLite table names are \emph{not} case sensitive, e.g., table
names \code{ABC} and \code{abc} are considered equal.\end{Note}
\begin{References}\relax
See the Database Interface definition document
\code{DBI.pdf} in the base directory of this package
or \url{http://developer.r-project.org/db}.\end{References}
\begin{SeeAlso}\relax
\code{\Link{SQLite}},
\code{\Link{dbDriver}},
\code{\Link{dbConnect}},
\code{\Link{dbSendQuery}},
\code{\Link{dbGetQuery}},
\code{\Link{fetch}},
\code{\Link{dbCommit}},
\code{\Link{dbGetInfo}},
\code{\Link{dbListTables}},
\code{\Link{dbReadTable}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
conn <- dbConnect("SQLite", dbname = "sqlite.db")
if(dbExistsTable(con, "fuel_frame")){
   dbRemoveTable(conn, "fuel_frame")
   dbWriteTable(conn, "fuel_frame", fuel.frame)
}
if(dbExistsTable(conn, "RESULTS")){
   dbWriteTable(conn, "RESULTS", results2000, append = T)
else
   dbWriteTable(conn, "RESULTS", results2000)
}

\end{ExampleCode}
\end{Examples}

