Teach Yourself SQL in 21 Days by Ronald R. Plew Bryan Morgan Jeff Perkins

Teach Yourself SQL in 21 Days by Ronald R. Plew Bryan Morgan Jeff Perkins

Author:Ronald R. Plew, Bryan Morgan, Jeff Perkins
Language: eng
Format: epub
Tags: SQL,


CD Copyright , Macmillan Computer Publishing. All rights reserved.

SAMS

PUBLISHING

Teach Yourself SQL in 21 Days, Second Edition

- Day 14 -Dynamic Uses of SQL

Objectives

The purpose of today's lesson is to show you where to start to apply what you have learned so far. Today's lesson covers, in very broad strokes, practical applications of SQL. We focus on applications in the Microsoft Windows environment, but the principles involved are just as applicable to other software platforms. Today you will leam the following:

i How various commercial products—Personal Oracle7, open database connectivity (ODBC), InterBase ISQL, Microsoft's Visual C++, and Borland's Delphi—relate to SQL

i How to set up your environment for SQL

i How to create a database using Oracle7, Microsoft Query, and InterBase ISQL i How to use SQL inside applications written in Visual C++ and Delphi After reading this material, you will know where to start applying your new SQL skills.

A Quick Trip

This section examines several commercial products in the context of the Microsoft Windows operating system and briefly describes how they relate to SQL. The principles, if not the products themselves, apply across various software platforms.

ODBC

One of the underlying technologies in the Windows operating system is ODBC, which enables Windows-based programs to access a database through a driver. Rather than having a custom interface to each database, something you might very well have to write yourself, you can connect to the database of your choice through a driver. The concept of ODBC is very similar to the concept of Windows printer drivers, which enables you to write your program without regard for the printer. Individual differences, which DOS programming forced you to address, are conveniently handled by the printer driver. The result is that you spend your time working on the tasks peculiar to your program, not on writing printer drivers.

ODBC applies this idea to databases. The visual part of ODBC resides in the control panel in Windows 3.1, 3.11, and Windows 95 and in its own program group in Windows NT.

We cover ODBC in more detail when we discuss creating the database later today. Personal Oracle7

Personal Oracle7 is the popular database's latest incursion into the personal PC market. Don't be put off by the number of programs that Oracle7 installs—we built all the examples used in the first several days using only the Oracle Database Manager and SQL*Plus 3.3. SQL*Plus is shown in Figure 14.1.

Figure 14.1

OracleTs SQL*Plus.

INTERBASE SQL (ISQL)

The tool used in the other examples is Borland's ISQL. It is essentially the same as Oracle7 except that Oracle7 is character oriented and ISQL is more Windows-like.

An ISQL screen is shown in Figure 14.2. You type your query in the top edit box, and the result appears in the lower box. The Previous and Next buttons scroll you through the list of all the queries you make during a session.

Figure 14.2.

InterBase's Interactive SQL. Visual C++

Dozens of books have been written about Visual C++. For the examples in this book, we used version 1.52. The procedures we used are applicable to the 32-bit version, C++ 2.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.