Databases Reference
In-Depth Information
physical database file. ISAM stands for Indexed Sequential Access Method and is the
method by which data is stored in a Jet database file. The Replication Engine allows
exact duplicates of a database to coexist on multiple systems, with periodic
synchronization.
The host languages for the Jet DBMS, such as Visual Basic and Access, are used by
database programmers to create database applications for specific purposes. For instance,
we might create a Library database application, which a library can use to maintain
information about its books, or an Order Entry database application for a small business.
Incidentally, the Jet DBMS is also capable of interfacing with non-Access-formatted
databases, such as those with format Xbase (dBase), Paradox, Btrieve, Excel, and
delimited text formats. It can also interface with open database connectivity (ODBC is
discussed in Appendix C) to access server database applications across networks.
Let us take a closer look at the components of the Jet DBMS. We will study these
components in much greater detail in separate chapters of the topic.
7.5 Data Definition Languages
We have already mentioned that a DBMS needs to provide a method for defining new
databases. This is done by providing a data definition language (DDL) to the
programmer. A DDL is not a procedural language; that is, its instructions do not actually
perform operations. Rather, a DDL is a definitional language .
7.5.1 The Jet Data Definition Language
Example 7-1 illustrates the use of the Jet data definition language. The code will run in
Visual Basic or in an Access code module, so feel free to key it in and try it yourself.
(Use a new database in Access, since some of this code will conflict with the LIBRARY
database that we have been working with in earlier chapters.) The purpose is to create a
new database called LIBRARY, along with a table called BOOKS, containing two fields,
ISBN and TITLE, and one index. (Don't worry if some portions of this code don't make
sense to you at this point.) Note that Access uses a space followed by an underscore
character ( _ ) to indicate that the next line is a continuation of the current line.
Example 7-1. Use of the Jet data definition language
' Data Definition Language example
' Declare variables of the required types
Dim ws As Workspace
Dim dbLibrary As Database
Dim tblBooks As TableDef
Dim fldBooks As Field
Dim idxBooks As Index
' Use the default workspace, called Workspaces(0)
 
Search WWH ::




Custom Search