<<

Corporation

The InterBase Newsletter InterCom VOLUME 2, NUMBER 1, WINTER 1998

InterBase Releases Server for NetWare 4.11 InterBase Porting to On March 3, 1998, InterBase , project management, and InterBase Software Corp. is nearing Corporation announced the availability of billing tasks. completion of a Linux port of InterBase Server, according to Mike Tossy, Director its InterBase 4.2.2 Server for Novell “We are extremely pleased to have the of Marketing. “We currently expect to be NetWare 4.11. InterBase Server is an 4.2.2 Server available to us,” said David embeddable engine that able to offer this port by the end of June,” combines business-critical, relational said Tossy. “The first release will likely be database technology with ease of “InterBase Software based on InterBase 4.0. We will follow up installation, use and maintenance. later in the year with a port of InterBase 5.” InterBase 4.2.2 succeeds the current Corporation is meeting Linux is a freeware workalike of the InterBase 4.0 Server for NetWare 3.12. the needs of the embedded . It has gradually grown in “The release of the InterBase 4.2.2 Server popularity on Intel hardware as an underscores the continued commitment to database VAR across affordable alternative to expensive RISC- our IT and VAR (value-added-reseller) multiple platforms” based UNIX platforms, and resource- customers using NetWare,” said Jim Weil, hungry Windows NT. president of InterBase Software InterBase users have requested a port of the Corporation. “This, along with the Robinson, Carpe Diem development database server to Linux for several years. December 1997 release of InterBase 5.0 manager, SAGE U.S., Inc. “A large portion The response to the announcement on the Server for Windows NT, Solaris, and of our customers are operating on NetWare InterBase list server was enthusiastic and HP-UX, illustrates that InterBase Software 4 platforms, and the 4.2.2 Server will allow uniformly positive. Corporation is meeting the needs of the us to fulfill the NetWare needs of our embedded database VAR across multiple growing customer base.” InterBase Software Corp. will announce a platforms.” Beta program for the Linux version in the The upgraded InterBase Server product is next few weeks. InterBase 4.2.2 Server for NetWare is includes the InterBase 5.1 Client for the already in use by SAGE U.S., Inc., a VAR 32-bit Windows® platform. The based in Dallas, that uses InterBase enhanced Client is enabled with a 32-bit to provide data management in its Carpe application interface to the IPX/SPX Diem software for time tracking of project Continued on page 2 Table of Contents

4InterBase Releases Server for Novell InterBase ports currently available NetWare 4.11 ...... 1 4InterBase Porting to Linux . . . . . 1 InterBase 4.0 Server • NCR UNIX SVR4 2.0.3 InterBase 5.0 Server 4New Release of Perl Package. . . . 2 • DEC OpenVMS 6.2 • 3.1x • Microsoft Windows NT 4.0 • SCO ODT 3.0 4Q&A: Chip Handley ...... 2 • SCO OpenServer Release 5.0 • Microsoft Windows 95 • Red Hat Linux 5.0 (6/98) • IBM AIX 4.1.x RS/6000 • Solaris 2.5.1 on SPARC 4Upsizing . . . . 4 • SGI IRIX V.5.3 • HP-UX 10.20 InterBase 4.2.x Server 4Ask the InterBase Gurus ...... 6 • Data General DG/UX R4.11 • SunOS 4.1.4 • Novell NetWare 4.11 4New Tools ...... 7 • DEC Digital UNIX 3.2C • Microsoft Windows NT 3.51 NETWARE — Continued from page 1 network protocol. This capability is built on Microsoft Winsock,® thereby eliminating the third-party client networking component requirement of the previous InterBase 4.0 for NetWare. Both the 32-bit InterBase Client, and the existing 16-bit InterBase Client for Windows are certified to work with the new Server release, using either IPX/SPX or TCP/IP. Later this year, InterBase Software Corporation plans to follow up with an InterBase 5 Server for NetWare. Thereafter, InterBase projects two releases each year for the Novell platform, starting in the second and fourth quarters of 1999.

Manager of Technical Services Chip Handley enjoys his work.

New Release of Perl Package IBPerl is not a replacement for the InterBase client library; it is a wrapper B ILL KARWIN around the InterBase API, and it functions Q&A: Chip Handley An update of IBPerl, the popular Perl only when the InterBase client is installed. Each issue of InterCom features an programmer’s interface to the InterBase interview with a key InterBase IBPerl has been tested only on Solaris, but API is now on the InterBase web site: personality. This month, we interview the Perl port to Win32 is finally stabilizing, Chip Handley, Manager of InterBase http://www.interbase.com/ so IBPerl will soon work on Wintel. download/ Technical Services. IBPerl comes with full source code, and it Q: How long have you worked for Perl is a free interpreted scripting language is customizable. I invite Perl hackers to add InterBase? popular on UNIX platforms. It is well features and email them to me. Features on I will be celebrating my five-year known for its rich collection of contributed the wish list for the next update of IBPerl anniversary with InterBase next month. modules, especially its CGI programming include: interface for web server scripts. The home I have held the titles of Support Engineer, • Testing to ensure Win32 support page for Perl is: Support Supervisor, Release Manager, and • Compatibility with Tim Bunce’s DBI Client Services Manager. http://www.perl.com/ interface Q: What is it about InterBase that has IBPerl is a general-purpose, object- • Support for storing Bob data kept you here for 5 years? oriented interface to the InterBase client • Support for DDL statements I believe in and am sold on the IB API. Any Perl script can directly manipulate • Support for InterBase array data technology. I like the market and the variety data in a local or remote database. of technology I’m exposed to as a part of IBPerl is a contributed freeware offering, it—from operating systems and The new version of IBPerl has several not an officially supported part of the environments to our customers’ enhancements over the previous release: InterBase product. IBPerl comes with no applications. • Redesigned error handling implied liability on the part of Bill Karwin or InterBase Software Corp. Q: What makes the IB support team • Multiple concurrent connections unique? Bill Karwin is the Manager of Technical • Multiple concurrent transactions Publications for InterBase Software Corp., I’m proud to be a part of the Client Services • Multiple concurrent statement cursors and the author of IBPerl. He can be reached team because of the way we all work by email at [email protected]. together—we’re very much a team. We • fetch() method to retrieve rows of a work in a tiered problem-solving query return set directly into Perl lists or environment: there are 3 tiers, and hash lists responsibility for a call is shared among the • Support for fetching Blob data team. We also work closely with the

InterCom 2 international technical services designed to meet different customers providing back line assistance. Once the teams, helping them resolve issues with needs. decision has been made for InterBase as designated contacts and weekly phone One new option is a low-cost Internet the engine for the application, the calls. support program, which gives the customer developer should use one of the InterBase Q: I’ve noticed you use the term Client the best value on InterBase technical Support options and work directly with Services as well as Technical Services support. It allows the customer to submit InterBase Software Corp. when referring to your team. Why? incidents via email and guarantees you a Q: Whom should customers contact I sometimes use the term Client Services response within two business days. for support services outside the U.S.? because we also deal with customer Q: Does InterBase technical support Outside of the U.S., customers should training, consulting, pre-sales service, and cover the UNIX versions of InterBase? contact their InterBase Sales give escalated service levels to our overseas UNIX Support Contracts are available, as Representative for their local service customers. We therefore do more than just the majority of our mission critical provider. technical support, we are here to solve customers are running on UNIX platforms. Q: What does the future hold in store customer needs. Technical Services is the for you team? term most people are familiar with, Q: Does InterBase technical support My team is working towards using the web however. cover InterClient? InterClient is covered under all the to solve problems and proactively get Q: What option is best for a small- standard contracts at no additional charge. information to our customers. We will be volume customer or mid-range VAR? using the web for bug reporting and The best option for a small application Q: What is the best way for developers electronic support services, and we will be developer is to become an InterBase VAR, using Borland tools to get technical publishing a problem resolution database which offers, among other services, support? that customers can access. We are also in unlimited InterBase Hotline support. We Basic installation support for InterBase can the process implementing a new call also offer a variety of other options that are be obtained through the Borland Technical tracking system to better serve our Support Department with InterBase customers needs.

TABLE 1. InterBase technical services offerings Service Description Ordering instruction Technical Support Account Management Offers a dedicated Support Engineer with guaranteed Contact your local InterBase Sales representative response time. or call (888)345-2015 InterBase Hotline Unlimited phone assistance via a toll-free number. Contact your local InterBase Sales representative or call (888)345-2015 Incidents Support As needed, pay as you go service. Can be purchased in Contact your local InterBase Sales representative packs for a volume discount. or call (888)345-2015 On-Line Support Technical assistance utilizing electronic mail. Contact your local InterBase Sales representative or call (888)345-2015 Training On location Training offered by a qualified InterBase engineer at the Contact your local InterBase Sales representative customer site. or call (888)345-2015 Training from Five-day instructor lead training course, exploring Contact MER Systems, Inc. MER Systems, Inc. everything you need to develop and manage a database (416)410-5166 application. www.mers.com Training from Five-day instructor lead training course, exploring Contact DeVries Data Systems DeVries Data Systems everything you need to develop and manage a database (408)866-8033 application. www.dvdata.com Consulting Training from Call for more information. (408)430-1501 experienced partners Free Technical Information Email List Server An active list server managed off-site by Robert Schieck of Send message to [email protected] MER Systems, Inc. Newsgroup news://forums.borland.com/ borland.public.interbase

InterCom 3 files reside on the client. Since you can’t • There are several platforms and Upsizing Paradox Databases specify a remote server’s directory as a operating system versions available as Paradox working directory, connecting to well as portability across those J AMES ARIAS-LA RHEIR an InterBase database with a Paradox platforms. This article describes the issues a database application requires that you precede the • Transactional processing, which administrator has to consider before InterBase table name with a Borland provides support for rollback and migrating a Paradox database to InterBase. Database Engine (BDE) alias. commit operations, is managed using This information is presented at a high level There is also the concept of business rules, disk-based writing to provide a more so that migrating users see the big picture stable environment. Paradox performs before diving in. Although this article sometimes called integrity constraints. Paradox and InterBase use similar business all read and write operations in memory focuses on migrating Paradox databases to in conjunction with the pdoxusrs.net InterBase, the fundamentals of moving rules, although through slightly different implementations. Each DBMS supports file. When a situation occurs, such as a from any desktop database (for example, power outage or system crash, that dBASE or Access) to a SQL (Structure referential integrity, primary keys, required fields, and default field values. InterBase abnormally interrupts Paradox, data Query Language) database server are the loss or corruption may result. same. has the added functionality of triggers and stored procedures that move the bulk of the • The Multi-Generational Architecture of Culture Shock! data manipulation code off of the client InterBase supports a record versioning application (as with Paradox) and to the scheme that reduces data contention. Changing your Paradox perspective of what server’s database. Paradox realizes only one instance of a the InterBase database might look like it is record and manages it through a lock the first hurdle. Fortunately, a good portion Finally, there is the concept of live data. file (pdoxusrs.lck). Paradox tables support a pessimistic of your current database application design • InterBase reliably manages up to 200 locking scheme, which forces applications still functions perfectly in the InterBase concurrent user-connections. implementation. The client/server to obtain a record lock before any changes • In InterBase, some database structure paradigm that InterBase employs entails can be attempted. Hence the need for a changes such as adding and dropping new concepts that the Paradox developer pdoxusrs.net file. InterBase supports an columns can be made on the fly; can (or will learn to) appreciate. optimistic locking scheme, which enables clients to start changing a record—from a Paradox requires exclusive access to the First, the database’s structure is the most snapshot of the current state of the tables. obvious difference between InterBase and database—without locking it. This • InterBase requires little additional DBA Paradox databases. InterBase databases snapshot controls the locking of the data experience. As with application design, usually consist of one file (for example, through a transaction stamp, which is your current database knowledge is still employee.gdb) that contains definitions managed by the Multi-Generational valid and easily expands to include the and values for tables, indexes, data Architecture of InterBase. concepts of a database server. validation, triggers, procedures, and so on. • InterBase maintains a small footprint: Paradox database definitions are Reasons for Upsizing 10MB required for server install, 2MB distributed among several files, such as: required for client’s driver and • A table: employee.db Using the InterBase database server libraries. provides several advantages over desktop • Indexes for the table: employee.xg0 databases: Another advantage InterBase has is the • Validity checks: employee.val multitude of ways the client application has • You can develop in any software to communicate with the database server. • Blobs in the table: employee.mb package that can use ODBC drivers or Following is a list: The next significant difference is the make direct InterBase API calls. • Use a BDE alias through an ODBC driver separation of data and code. In Paradox, • In all cases, there are increased limits (you get the ODBC driver with the there is the concept of one or more or no limits at all on database and InterBase Server). working directories where the data files record size, number of columns per (Paradox tables), reports, forms, and • Use a BDE alias through an SQL Links table, number of concurrent scripts reside. These reside on either a driver (you get the SQL Links driver with connections, etc. or dedicated file server. Given one of the Borland Client/Server suites). the client/server nature of InterBase, only • The locking mechanism is more • Use a programming language, like ++ the tables themselves are located on the sophisticated; say good-bye to Builder to make InterBase API calls. For server machine; all of the other application pdoxusrs.net problems. a web server-based connection, you can

InterCom 4 TABLE 2. How Paradox table properties migrate Table Property Migration Issues Datatypes* Most Paradox datatypes map well to InterBase datatypes. Those that do not transparently translate into InterBase are Auto- increment, separate Time & Date, Logical and BCD. Picture Statements Table-based picture statements can be simulated by using check constraints; otherwise, the picture statement can be moved to the data field on the Paradox form. Table Lookups CHECK constraints can be used to make a column’s entered value conform to another table’s column value. Referential Integrity By using a combination of CHECK constraints and foreign key designations, you can achieve the same functionality as Paradox referential integrity. Validity Checks CHECK constraints can be used to specify requirements of a newly entered value. Keys* Keys are called PRIMARY KEYs in InterBase and InterBase does not allow a record to be posted where its primary key value is NULL. Secondary Indexes* To improve performance, InterBase indexes have the added option of being made inactive before doing large inserts. Then the index can be re-activated to rebuild the index. InterBase does not support case-insensitive indexes, but you can use collation sequences to achieve similar results. Password Security InterBase maintains a security database that is separate from the actual database. A user is given rights to the database using standard SQL GRANT statements (or can be restricted by the REVOKE command). Also, passwords are not ‘additive’ as in Paradox. Table Language In addition to setting the language (character set) for a particular table, InterBase also enables you to specify a single language for the entire database (default) or for a specific column within a table. You can also specify various character orders (COLLATION SEQUENCE). *These properties are automatically transferred when using the Paradox Copy Utility or Data Pump migration techniques described below. use the InterClient driver, an all-Java, Restructure utility can’t modify InterBase still use the Paradox Data Model to link thin-client JDBC driver. There are metadata, but Paradox’s SQL File tool tables together in forms and reports, and InterBase “hooks” to simplify enables you to do such modifications. you can leave ObjectPAL code mostly development, which makes for a very Fortunately, you can leave most of the front- unchanged. fast connection. end application’s design intact. You can • Use a programming language to make ODBC driver API calls, which will in turn FIGURE 1. Using Database Explorer to view an InterBase Index Definition. make InterBase API calls.

Migrating Paradox tables to an InterBase database No two database software packages are the same, although the core database design principles such as table relations and the use of indexes still apply. Table 2 lists each property of a Paradox table and its effect in the InterBase scheme. Future articles, will detail the solutions for the problem conversions. As you’ve seen so far, depending on the complexity of the tables, migrating Paradox tables to an InterBase database may involve considerable work. For example, you need to learn some SQL for database structure (metadata) changes. Database Explorer is a tool that comes with and C++Builder. It performs most functions—see Figure 1. Paradox’s

InterCom 5 There are three ways to migrate your was not the case with joins expressed in Paradox tables into an InterBase database Ask the InterBase Gurus SQL92: The following list ranks them from easiest If you have questions about InterBase FROM JOIN to most difficult: ON... that are not covered in the • Paradox’s Copy utility: documentation and are beyond the scope rather than the SQL89 syntax: The old familiar Tools | Utilities | of technical support, send them to: FROM , Copy utility translates Paradox [email protected]. WHERE... datatypes and some table properties to Pavel Cisar in the Czech Republic If you find that a query has been badly the corresponding InterBase datatypes asks: “Is there a some kind of cost optimized and the indexes you have defined and properties. An InterBase database optimizer in InterBase and if so, are appropriate, you can create a PLAN that must first exist and the aliases must be what strategy does it use?” overrides the optimizer’s decisions. If that configured in the BDE. The answer comes from Ann Harrison, isn’t more than you wanted to know, your • Data Pump: one of the early developers of InterBase. boss isn’t working you hard enough. All versions of InterBase have used a cost- The Data Migration Wizard comes with based optimizer to select join order. The Footnotes Delphi and C++Builder. The tool moves costs considered are the table cardinality1 data and column structure between 1 Cardinality is the number of rows in the and the index selectivity.2 The intention is different formats. An InterBase database table. InterBase’s optimizer estimates to minimize the size of the intermediate cardinality from the number of pointer must first exist and the aliases must be 3 products. Starting in V2.0. we added pages and the size of a row. This configured in the BDE. 4 decision tree pruning, which reduced the number is cheap to maintain and • External Files: cost of optimizing a 14 way join from 4 provides a good indication of the I/O hours to 10 seconds, without reducing the InterBase allows you to query/import necessary to retrieve all rows. However, performance of the optimized query. data from external, fixed-length files, to it does not accurately represent the which Paradox can easily export. Blob The optimizer first identifies the conjuncts5 number of rows in a sparsely populated data will need to be programmatically between tables in the join and indexes that table. The alternatives we considered extracted to a separate file. This is a can be used with them. Next, it examines would create “hotspots” in the database data-only migration, and does not paths through the conjuncts that connect and degrade update and insert translate table structure information, all tables and estimates the size of the performance. Our decision was that the other than column identity. intermediate product at each step. Some hotspots would overwhelm any gain in conjuncts are better than others —equality optimization. Because of the SQL foundation InterBase through a unique index is best; inequality maintains, it is also a good idea to 2 Selectivity is the ratio of the number of (<>) is so bad it is never used. If there are distinct values in the index to the familiarize yourself with SQL and the no indexed paths between tables, the InterBase extensions to it. There are several number of entries. The selectivity of an optimizer interpolates a sort/merge join or index is set when it is created, good books on SQL; just be sure to a natural scan of one table. There’s a cost purchase one that covers SQL92, as reactivated, or when someone requests estimate for each of those operations: sort/ that it be reset. Keeping more precise InterBase is fully SQL92 entry-level merge is bad, natural scan is terrible. The compliant. statistics on selectivity might improve optimizer selects the path with the lowest optimization, but would also reduce Upcoming articles in InterCom will cost. update and insert performance. compose specific solutions to the issues Finally, the optimizer chooses access 3 The intermediate product is the raised here. If you have a specific concern strategies for subqueries and applies number of rows present at any stage of regarding upsizing your desktop database secondary indexes to queries. InterBase’s building up the result set. In a simple to InterBase and would like it covered in bitmapped intermediate index structures example, consider the query: future issues, please send a note describing allow it to use multiple indexes on access to your concern to [email protected]. a single table. The V5 optimizer has been SELECT s.name FROM departments d, enhanced to recognize redundant6 and James Arias-La Rheir is a Client/Server managers m, unnecessary7 indexes. Support Engineer at InterBase Software WHERE d.manager = m.name Corp. He previously served three years as a In theory, the order of tables in an inner AND d.name = ‘NOD’ Senior Support Engineer in the Paradox join statement should have no effect on the The name column is a unique key in Technical Support group. output of the optimizer. Prior to V5, that each of the tables and manager is a non-

InterCom 6 unique indexed column in departments, clause in SQL92. They can also be meaning there is a 1:n relationship derived by ‘distributing’ the comparison New Tools between managers and departments. operator. A.KEY = B.KEY B ILL KARWIN There are 500 departments and 300 describes an explicit conjunct between managers. A and B. B.KEY = C.KEY describes The InterBase community regularly an explicit conjunct between B and C, releases tools and development Starting with the managers produces an components on the Internet. initial set of 300. Applying the manager/ but also an implicit conjunct between A A.KEY Here are some recent releases: department conjunct produces 500 and C because must equal C.KEY. intermediate rows. The department/ IB Objects NOD conjunct reduces the final result to 6 Redundant indexes are indexes on Jason Wharton one. columns for which other indexes have already been included. Consider a table A suite of shareware components for 32-bit Starting with department/NOD, Delphi, providing a visual component layer produces one row; applying the with a non-unique index on A (descending) and another on B around the InterBase API. By optimizing department/manager conjunct still these components to the InterBase API produces only one row. That’s the join (ascending), plus a unique ascending index on A,B and a unique descending rather than conforming to BDE or ODBC, order with the lowest intermediate IB Objects provides a superior solution for product. index on B,A—don’t snicker, I’ve seen worse, much worse. A query that client/server application programming. 4 Decision tree pruning is throwing out includes values for A and B would, prior http://www.ibobjects.com/ unpromising results without analyzing to V5, use all four indexes, when either them completely. The query above can of the unique indexes would produce a FreeIBComponents be resolved in one of four ways; see single value. Gregory Deatz Table 3. Choices 2 and 3 would be discarded after the first conjunct was 7 Unnecessary indexes are indexes A set of freeware Delphi components, evaluated because even if the next applied even though they don’t restrict implemented with the TDataSet conjuncts were unique equalities, they’d the result. Redundant indexes are component, to provide transparent native still have intermediate results as large as unnecessary, but not all unnecessary InterBase access to familiar Delphi data- or larger than the first case. Cases where indexes are redundant. Consider a table aware components. Alpha release. with a unique indexed column A and a NOD and managers are considered www.interbase.com/download/ together before departments are added non-unique indexed column B. If your components.html aren’t considered at all because there is query includes values for both A and B, no conjunct between them. The prior to V5 InterBase would use both FreeUDFLib optimizer builds up the longest strings indexes, even though the index on A Gregory Deatz of good choices and then, if none of the reduces the result set to one row at most. A library of user-defined functions freely strings include all the inputs, it adds sort contributed for use with InterBase on merge joins for non-indexed conjuncts Windows platforms. or natural joins if there are no conjuncts at all. www.interbase.com/download/ udf.html 5 A conjunct is a relationship between the data in one table and the data in Marathon another. Conjuncts are expressed in the Gimbal Software Services WHERE clause of SQL89 and the ON Marathon is a commercial SQL Tool that allows you to create and manage SQL TABLE 3. Decision tree resolutions Database metadata. It is a sophisticated First evaluation Second evaluation Third evaluation Cost analysis replacement for the “Notepad and ISQL" managers departments ‘NOD’ 300 / 500 / 1 development methods. www.sub.net.au/~pokeeffe/ departments managers ‘NOD’ 500 / 500 / 1 marathon.html departments ‘NOD’ managers 500 / 1 / 1 Continued on page 8 ‘NOD’ departments managers 1 / 1 / 1

InterCom 7 NEW TOOLS—Continued from page 7 Contributing authors and editors: Replication Engine Credits James Arias-La Rheir An example replication solution, InterCom is a quarterly publication of Amelia Arnett contributed by Borland engineers. InterBase Software Corporation. It is Chip Handley www.interbase.dthomas.co.uk/ mailed to members of the InterBase VAR Ann Harrison files/ib_repl.zip Program, and also published on the world- Bill Karwin wide web. Rhea Tolman The source code is now available: ® www.interbase.dthomas.co.uk/ Bill Karwin, editor InterBase is a registered trademark of files/repl_src.zip InterBase Software Corporation InterBase Software Corporation. 1800 Green Hills Road, Suite 150 InterClient™ and InterServer™ are IBPerl Scotts Valley, CA 95066 trademarks of InterBase Software Bill Karwin Email: [email protected] Corporation. All other trademarks are property of their respective owners. A Perl 5 module that provides an object-  oriented interface to the InterBase API. 1997 InterBase Software Corporation. All rights reserved. www.interbase.com/download/ ibperl.html

InterBase at Borland Conference 1998

This year’s Borland Conference in Denver, Colorado has more InterBase presence than ever: 4InterBase product address 4Full track of 15 technical presentations 4Pre-conference tutorial 4New booth—more space, more product, more people

Register for BorCon 1998: call 1-800-350-4244 Get more information at http://www.borland.com/borcon98/

InterBase Software Corporation 1800 Green Hills Road, Suite 150 Scotts Valley, 95066