SQL is a computer language that is used to organize, manage, and retrieve data that is stored in a relational database. SQL is the acronym for Structured Query Language.
ODBC, or Open Database Connectivity, provides standardized access to a relational database. A DSN (Data Source Name) points to the database and links it with a specific ODBC driver.
Within ECMap, the DSN is associated with an internal program file name for the purpose of establishing a connection to the database. SQL commands are used to access and manipulate the data in the database.
Below is a brief explanation of terms that are used in ECMap SQL rule commands or instructions:
close – ends a query and terminates the program’s access to the results of the query.
commit – signals the successful end of a transaction. It notifies the database that all of the transaction statements have been executed and the transaction is complete - leaving the database self-consistent.
cursor – a buffer that holds the result of a select statement. Each cursor defines a current row position in a set of result rows returned by an SQL query.
fetch – advances the cursor to the next available row of query results if one exists – making this new row of query results the current row of the cursor. (If the cursor moves beyond the last row of query results, the fetch statement returns a NOT FOUND warning.)
insert – adds new rows of data to a table.
open – starts executing an SQL query and generating the query results.
rollback – signals the unsuccessful end of a transaction. It tells the database not to complete the current transaction, but instead to back out any changes that were made to the database during the transaction – restoring the database to its state before the transaction began.
select – retrieves data from a database and returns it in the form of query results.
transaction – a logical unit of work consisting of a sequence of one or more SQL statements that perform independent actions and are usually closely related. Each statement performs a portion of a total task that is not complete until all the statements have been successfully executed.
update – modifies data in a database.
where clause – tells the SQL to include in the query results only those rows of data that meet a specified “search” condition.