WinSQL Version 2.3 - 27 Sep 1994 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 Introduction ~ ~~~~~~~~~~~~ WinSQL is a single-user database system for Windows 3.1, designed to assist in the teaching/learning of SQL. It is intended to be used in conjunction with typical introductory database courses, rather than in a completely stand-alone self-teaching situation. WinSQL is not aimed at professional developers who are probably already familiar with SQL. Compared to other Windows-based database systems (such as Access, Paradox for Windows, etc), WinSQL is a small low-budget system which lacks many features, but it has two advantages: 1. It is free (for non-commercial usage), allowing students to use it on their home computers, without any licensing hassles. 2. It provide special features for illustrating the workings of SQL queries. For example, it allows the user the options of seeing how rows are matched in joins, what results are returned by subqueries and which actual rows are grouped by a "group by" clause. (These options are controlled from the View menu.) Unlike some educational software, these displays are not hardcoded for predetermined queries applied to a predetermined database structure. Instead, they are generated dynamically, at execution time. To avoid possible misunderstandings, I point out that WinSQL does not currently provide: - full SQL support; (It provides most but not all of SQL-86.) - databases with tables of more than a few thousand rows; - forms; - client-server support (i.e. no ODBC, IDAPI, etc); - a host language interface. (A C++ interface exists, but is undocumented and subject to change. The source code is not available.) More specific details on the limitations can be found in the help file. 2 Installation of WinSQL ~ ~~~~~~~~~~~~~~~~~~~~~~ 1. WinSQL requires a 386 (or better), running Windows 3.1 (or higher), with a minimum of 1.5 Mb of free disk space. 2. Use PKUNZIP 2.04 to unpack the .zip file either to a floppy disk or to a temporary directory on your harddisk (e.g. C:\INSTALL). For simplicity, the following instructions assume that a floppy disk is used. 3. By default, the installation procedure will create the directory: c:\winsql This contains the WinSQL executables and the sample databases. If you wish to use a different disk or directory, you will be able to specify this during installation. 4. WinSQL can be installed using any of the following (equivalent) methods. Method 1: If you're not already running Windows, enter the command: win a:setup Method 2: Run Window's File Manager. Double-click on the a: drive icon. When the a: files appear, double-click on setup.exe. After installation, press Ctrl-F4 to close the a: window. Method 3: From Windows's Program Manager, select File | Run, then enter the command line: a:setup and press the Ok button. In any case, the setup program allows you to specify where you wish the files to be installed and whether you want the sample databases to also be installed. (These can be installed separately at a later stage, by rerunning the setup program.) 3 How to get newer versions of WinSQL ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New versions of WinSQL are placed on two sites: - on ftp.fit.qut.edu.au, under the directory /pub/winsql. - on ftp.cica.indiana.edu, under the directory /pub/pc/win3/util. In each case, a filename of the format "winsqlnn.zip" is used, where "nn" is replaced by the version number e.g. winsql22.zip contains version 2.2. Because of the large numbers of files uploaded to cica, it may take a week or two from when WinSQL is uploaded to cica to when it is placed in the util subdirectory. I will also post an announcement of each release to the three Internet newsgroups: comp.database; comp.edu; and comp.os.ms-windows.announce. If you have a favourite BBS or file server that does not have a copy, feel free to put a copy there too. 4 Future development ~ ~~~~~~~~~~~~~~~~~~ While the current version lacks several desirable features, I hope that some people will find it useful in its current form (even if its users later move on to bigger and better database systems). In future versions, I plan to: (a) improve the coverage of the SQL language; (b) improve aspects of the user interface; and (c) allow larger database tables to be stored. I would very much appreciate hearing from you if you use WinSQL and find problems, or if you can suggest ways in which the user interface could be improved. My email address is: J.Reye@qut.edu.au 5 Change Log ~ ~~~~~~~~~~ [Changes from version 2.2 to 2.3] Enhancements: 1. Printing is now supported. 2. Query windows are now based on personally-developed code, rather than the edit control provided by Windows. This removes the 32K restriction which previously prevented the opening of large ASCII files. When they contain a long sequence of "create table" and "insert" statements (separated by semicolons), such files are often useful as a portable way of setting up a database. 3. The "progressive execution" options have been enhanced to give the user a wider range of choice, from continuous feedback to feedback on demand. 4. Clicking on a results row automatically moves the animation bar to that row, in much the same way that items are selected in any Windows list box. 5. A new "automatically activate windows" option is available (disabled by default). When enabled and the mouse is moved into any window, that window automatically becomes the active window, without the user having to click on that window. For some activities, this makes the system easier to use, but it can be a nuisance when cascaded windows are unintentionally activated. So, it's an option which can easily be turned on or off. Bugs fixed: 1. A bug in "drop table" has been removed. A warning message box, associated with this bug, will no longer appear. 2. A bug in the scanning of decimal literals has removed. This bug caused values such as 1.23 to be inserted as 1.22. 3. As in ANSI SQL, WinSQL allows a table to be joined to itself. However, in a few cases of this, the query optimiser generated the wrong code, leading to a GPF when the query was executed. 4. A "select distinct" query, which also contains an "or" in its where clause, did not always remove all duplicate rows. 5. A bug in "not like" has been removed. 6. There was a bug in the generated code for where-clause conditions which compared one column against another, and the two columns had different numbers of decimal places. This has now been fixed. 7. Another bug related to numeric columns whose values are stored as 2-byte binary integers (e.g. decimal(3), decimal(4)). For these types of columns, the system's indexing structure was not always built correctly, leading to incorrect results being returned by some queries with where-clauses involving such columns. This bug did not affect 1-byte (e.g. decimal(2)) or 4-byte columns (e.g. decimal(5)), which is the main reason why it remained undetected until recently. 8. It is possible (although fairly rare) to have a subquery which is correlated with a column in a group-by clause. Previously, such subqueries were not analysed correctly, leading to the generation of incorrect results. 9. A bug in the setup procedure required the directory name "disk1" to be used if WinSQL was installed from a harddisk directory (rather than from a floppy disk). This has been fixed so that any directory name can be used. [Changes from version 2.1 to 2.2] Bugs fixed: 1. When the PerformanceOption was set to fastest and a database was opened, some additional memory was allocated unnecessarily. 2. When a database was opened, the system overroad the user's PerformanceOption setting. 3. Some tables in (relatively) large databases appeared to be empty when browsed, due to an addressing overflow. [Changes from version 2.0 to 2.1] Enhancements: 1. In previous versions, a query could only be saved if it was the currently-active window i.e. with a highlighted title bar. From V2.1 on, a query can be saved if it, or any one of its "results" windows, is the currently-active window. Bugs fixed: 1. A screen repainting bug corrupted the displayed values, only when scrolling a window to the left. 2. A minor syntax-check bug resulted in an incorrect error message, in the fairly rare case of using an invalid table alias in a correlated subquery. 3. The user always had the option of suppressing the Transcript window, allowing the Query window to be wider. However, the system sometimes automatically recreated the Transcript, even though the user did not wish to see it. 4. When saving a newly-created query, the system would display an unnecessary prompt for a filename, even after the user had specified one. (This bug was unintentionally introduced when replacing the Borland File Dialog box with the MS Common Dialog box.) 5. Because of a bug in a new optimisation technique, the values of the "J" column were loaded incorrectly, in the "SPJ" database. This caused them to be displayed with an incorrect (non-blank) leftmost character, for both the "J" and "SPJ" tables. If you have a V2.0 copy of SPJ.DB, then you should install the latest version of this file. Jim Reye September 1994