All Manuals > LispWorks User Guide and Reference Manual > 23 Common SQL

NextPrevUpTopContentsIndex

23.1 Introduction

This chapter covers the following areas:

The LispWorks SQL interface uses the following database terminology:

Data Definition Language (DDL)

The language used to specify and interrogate the structure of the database schema.

Data Manipulation Language (DML)

The language used for retrieving and modifying data. Also known as query language .

table

A set of records. Also known as relation .

attribute

A field of information in the table. Also known as column .

record

A complete set of attribute values in the table. Also known as tuple , or row .

view

A display of a table configured to your own needs. Also known as virtual table .

23.1.1 Overview

Common SQL is designed to provide both embedded and transparent access to relational databases from the LispWorks environment. That is, SQL/relational data can be directly manipulated from within Lisp, and also used as necessary when instantiating or accessing particular Lisp objects.

The SQL interface allows the following:

The SQL interface provides these features through two complementary layers:

The functional interface provides users with Lisp functions which map onto standard SQL DML and DDL commands. Special iteration constructs which utilize these functions are also provided. The object-oriented interface allows users to manipulate database views as CLOS classes via def-view-class. The two interfaces may be flexibly combined in accordance with system requirements and user preference. For example, a select query can be used to initialize slots in a CLOS instance; conversely, accessing a CLOS slot may trigger an implicit functional query.

23.1.2 Supported databases

Common SQL supports connections to various databases using the driver/client libraries for each interface-platform combination as indicated below in Supported driver/client libraries for each interface-platform combination.

Common SQL may work, but is currently untested, with driver/interface/platform combinations shown as "None tested". We would be pleased to hear of your experience with these other driver/interface/platform combinations, at lisp-support@lispworks.com::

Supported driver/client libraries for each interface-platform combination

interface
(module name)

"odbc"

"oracle"

"postgresql"

"mysql"

  1. Default database type
  1. :odbc-driver
  1. :oracle
  1. :postgresql
  1. :mysql
  1. Other database type
  1. :odbc
  1. :oracle8
  1. None
  1. None
  1. Windows
  1. Microsoft SQL Server
    Oracle
    Postgres
  1. Oracle 9i(r2) and later
  1. Postgres
  1. MySQL
  1. Mac OS X
  1. MySQL
    Postgres
  1. Oracle 10g and later (not supported on 64-bit PowerPC)
  1. Postgres
  1. MySQL
  1. Linux
  1. MySQL
    Postgres
  1. Oracle 9i(r2) and later
  1. Postgres
  1. MySQL
  1. FreeBSD
  1. None tested
  1. Not supported
  1. Postgres
  1. MySQL
  1. Solaris/Intel
  1. None tested
  1. Oracle 10g and later
  1. Postgres
  1. MySQL
  1. AIX
  1. None tested
  1. Oracle 11 and later
  1. None tested
  1. None tested
  1. Solaris/SPARC
  1. None tested
  1. Oracle 9i(r2) and later
  1. None tested
  1. MySQL

The keyword shown in the second and third rows is the corresponding value of the database-type argument to connect. When a client library version is shown, it is the earliest version that was tested successfully: later versions should work too, and in many cases earlier versions may work too.

Note: MySQL versions prior to 4.1.1 should be run in ANSI mode to work with Common SQL. That is, mysqld must be started with --ansi or the ansi option must appear in the [mysqld] section of its configuration file.

Note: To use PostgreSQL on any non-Microsoft Windows platform, LispWorks/Common SQL requires PostgreSQL version >= 8.x built with --enable-thread-safety.


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex