Professional Visual Basic 6 Databases

( 1 )

Overview

Visual Basic is the #1 programming tool in the world and 70% of VB applications involve a database. However, there is little advanced information for VB database programmers that has been proven in the real world.

This book has broad coverage of many issues relating to professional database design and implementation using VB6. The author shows how to use SQL to manipulate data and investigates advanced topics such as data-warehousing (archiving data to larger database stores) ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (21) from $1.99   
  • New (2) from $36.79   
  • Used (19) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$36.79
Seller since Tue Jan 01 01:01:01 EST 2008

Feedback rating:

(171)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
1861002025 BRAND NEW NEVER USED IN STOCK 125,000+ HAPPY CUSTOMERS SHIP EVERY DAY WITH FREE TRACKING NUMBER

Ships from: fallbrook, CA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$60.00
Seller since Tue Oct 07 09:37:03 EDT 2014

Feedback rating:

(184)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

Visual Basic is the #1 programming tool in the world and 70% of VB applications involve a database. However, there is little advanced information for VB database programmers that has been proven in the real world.

This book has broad coverage of many issues relating to professional database design and implementation using VB6. The author shows how to use SQL to manipulate data and investigates advanced topics such as data-warehousing (archiving data to larger database stores) and data-mining (retrieving the valuable data from these warehouses).

Finally, these concepts are brought together with a range of 2 and 3 tier solutions which demonstrate the techniques learned in a practical way. Sections on using VB to create and modify SQL Server 7 and Oracle 8 databases are also included.

Read More Show Less

Product Details

  • ISBN-13: 9781861002020
  • Publisher: Wrox Press, Inc.
  • Publication date: 6/28/1999
  • Series: Professional Series
  • Pages: 800
  • Product dimensions: 7.24 (w) x 9.08 (h) x 1.90 (d)

Read an Excerpt

Chapter 1: The Client-Server Model

Everyone can take advantage of the benefits that come from using a client-server model. To create an application using the client-server model you need as little as one PC with an Access database and a front-end written in Visual Basic. In this book, we will learn how to create such an application and then go on to discover how hundreds or even thousands of computers (and hence users) can be involved in the client-server model. This chapter will cover the basic theory behind the client-server model and its many implementations. The knowledge that you gain in this chapter therefore forms the lynchpin upon which everything we cover in the rest of the book is based.

In particular, this chapter will cover:

  • The difference between desktop databases and database servers
  • What the client-server model is
  • The 2-tier architecture
  • The 3-tier architecture and beyond
  • The role of the middle tier
  • How to achieve server-side processing

Without further ado, let's begin by discussing the server in our client-server model, the database...

Desktop Databases

Today, desktop PCs are being used all over the world by corporations, small shops and in the home. They offer ease of use and plenty of organization power.

One of the most popular of the desktop databases is Microsoft Access. This product quickly became the de facto standard after its second release and it continues to hold strong presence in the market today. A user with average computer skills can quickly build a database to store and organize just about any type of information, then build queries to extract the datawithout even knowing a word of Structured Query Language (SQL). Access also provides a wizard to build reports and forms for easy data entry and organized viewing. There is one other feature that made Access irresistible - its price. Because Access was so affordable, smaller companies could afford to buy it to store client information and larger companies could place the product on many machines. Access was the first database that successfully penetrated the Home PC market. This was primarily a result of the fact that most PC's are installed with Microsoft Office and hence Access, allowing home users to organize addresses, recipes or whatever they liked,

Of course, Access isn't the only desktop database on the market. Lotus, for example, packages its own Approach desktop database with their SmartSuite. In addition, if you look for them, you can find desktop databases that are customized for just about any task, such as storing and retrieving client contacts or taking inventory in your office or home.

Of course, Access has evolved greatly over the years and much to the credit of Visual FoxPro. If Microsoft had not purchased Fox, Access today would be entirely different. As many would argue, the architecture behind FoxPro provides for the fastest desktop database available.

The structure of the desktop database makes it very flexible and portable. Each database file (containing the tables, queries, forms, etc.) is stored as a file on a hard drive, in a similar manner to the way a Microsoft Word document is saved. For example, when an Access database is stored it has an extension of .mdb (for Microsoft Database). This file can be copied, moved or deleted very simply using Windows Explorer. Furthermore, if stored on a file server, multiple PCs can load the database into their own workspace, sharing the data with other colleagues.


Sharing a single desktop database on a network can be quite challenging, not to mention that they're vulnerable to corruption. For most, this is the time to consider using a database designed for multiple users. We'll cover this in the next section (Database Servers).

When a copy of this database file (e.g. .mdb) is opened using a compatible database application (Access), a virtual copy of the database is made leaving the original intact. Typically, the database application will only load the required resources into memory, however some applications will load the entire file whether it is needed or not. This is typically a problem of older released products, such as early releases of Access. As an example, you might apply a SQL statement against a table to extract some data. That table is loaded into the local PC's memory and the database engine will process the data, displaying only the requested fields.

A database engine is the software program that actually manages the information in the database. Men we are trying to find all of the products associated with a particular company, it is the database engine that we make request to. It is the engine that actually retrieves the information we want from the database and performs any manipulation of data we desire.

However, if the table is quite large, you may still find yourself exhausting the available memory resources. This is primarily because the database application on your desktop must open the file and navigate through all of the records to locate the ones requested. Indexes, which we discussed in the Introduction, can play a big role in speeding up the requests by allowing your database application the ability to move directly to the locations of each record.

When the first individual opens a desktop database in their workspace, they have the option of restricting other users from opening it concurrently. The original copy still maintains control over additions, so if this first user decides to share the data, two or more instances of the database can be opened. By default, when a record is being modified, any attempt to edit that same record by the second user will result in receiving an error message indicating that the record is being edited by another user. This protects users from overwriting each other's changes. In later chapters, we'll see how databases can be modified to force updates to the records being modified. When a record is successfully updated, the other users are able to view the data when a refresh is made to the current recordset (or after the database application refreshes the recordset.


A recordset is a virtual table, containing a number of records in a spreadsheet style format. A recordset represents the content (or a portion of the content) of one or more tables. Updates can be made through recordsets by first populating the recordset, making changes, and then publishing the changes to the database file.

One key point to make about desktop databases is that the actual database application does not need to be installed on the client PC or any server PC. The only requirement is that the client application understands how to open and modify the database file. Visual Basic and most other application development tools can use ADO (ActiveX Data Objects) to open and modify the database file. As long as the development tool of your choice supports ActiveX (those which do include Visual C++ and Visual Basic), you can use ADO to connect to and alter the database file.


If you're developing a self-contained application, meaning that it has its own copy of a database file (such as mdb for Access), that file can be installed with the new application during the setup process (e.g. when using Visual Basic's Package & Deployment Wizard).

One consideration to keep in mind with desktop databases is that both the number of concurrent connections and the number of transactions to be processed may vary in number. This can cause a wide range of processing requirements. As an example, you may have an Access .mdb file located on a file server, allowing over 1000 employees access to it. Initially, this sounds like it would cause an enormous overhead. Well, yes, this could cause a great deal of overhead, but what if the users are only processing requests periodically? Possibly the application is a corporate phone book. Most users may only need to took up a phone number three or four times a day. This translates to approximately 4000 requests per day. Each request would require the client to open the database, execute a request, wait for a response and then close the database. Given that the requests were not all executed simultaneously, the database should be able to handle the requests without significant wait time. We'll take a closer look at the limitations of a sample desktop database (such as Access) in Chapter 5.

Database Servers

As we have already discovered, the design of the desktop database includes loading an instance of the database file on the local PC. Database server files are stored and updated slightly differently. The user application doesn't communicate with the database files directly, but through a service running behind the scenes (see the following diagram). When the database is queried, the request is passed to the service and the service coordinates the request. The results of the request are then passed back to the requesting client. One of the major advantages with this setup is that only the requested fields are passed to the client, thus saving memory resources. With a desktop database, as you may remember, the entire table is passed to the client for processing by the local PC.

This structure offers greater speed and flexibility. Because the service is communicating with the database and is managing all requests, multiple applications attempting to apply changes don't bog down the server. The service will listen passively for requests and when a request is received, will manage the resources to complete the request.


Huge sums of money have been invested in optimizing the way data is stored and retrieved from server database packages. A record can be located in a matter of milliseconds from a stack of over a million records. We'll cover some of the benchmarks of SQL Server in Chapter 5 and discuss when it might be better to use a desktop database over a server. You should note that the speed of any response depends on the processing power available.

Database server packages (known as Relational Database Management Systems or RDBMS) have come a long way with security. Desktop database packages do offer some security but the database files are exposed for the user to copy. A server database offers advanced security in a number of ways:

  • The databases are typically stored on a network that requires a login. This allows you to restrict direct access to the server containing the database.
  • Each database can require logins that impose advanced restrictions by function or by table. For example, user X may have access to a table with salary information but is restricted from updating the contents of the table. Many desktop databases are capable of imposing similar restrictions, but database servers have historically provided more advanced control mechanisms.
  • Views can be created which allow the user access to the data in a specified table based on specific criteria. We'll learn more about views later in this chapter and again in Chapter 8. Views can also be found in many desktop databases. Access, for example, allows you to store and call queries that are predefined.
  • Server databases can't be copied or moved without the proper authority. Most database management systems provide a utility that allows the user to backup and restore the database. Any unauthorized attempt will result in an error message.

One of the greatest advantages of these database servers is that they are capable of storing a great amount of data. They are limited only by the amount of storage space on the server. This is especially important now that corporations are storing more data for the purposes of auditing and research. This is not to say that desktop databases cannot hold a lot of data, but many restrict the amount of data to 1 or 2 Gigabytes. There are other ways to get around this limitation, but this is a point where you may want to think about using a database server.

So who are the players? Well, like the desktop database packages, there are many database server vendors from which to choose. The more common names include:

  • Sybase SQL Server
  • SQL Server by Microsoft (PC version of Sybase SQL Server)
  • SQL Anywhere by Sybase (A scaled down PC version of Sybase SQL Server)
  • ORACLE by Oracle
  • DB2 by IBM

There is no clear path to, choosing your RDBMS. For many, the familiar will always prevail. Others may spend large amounts of time and money carefully weighing each one's capabilities and weaknesses.

Here are a few considerations to make when choosing a RDBMoblem is especially common with the 3Com Impact adapter running firmware version 2.02. If you think the second telephone number might be the problem, try reconfiguring your adapter to use only one of your ISDN numbers.

Drivers are not supported in Windows 98.

ISDN drivers from the ISDN version 1.0 Accelerator Pack are not supported in Windows 98. Contact your ISDN adapterc;

  • Firstly, what are the requirements for data storage? How many records do you handle at present time and how much growth is expected? If you're not sure that the RDBMS can handle the job, don't use it, even if you're comfortable with the product.
  • Secondly, always consider which server will be most compatible with your needs. If your project is going to be sitting in the Windows NT Server environment and you plan to build your client applications with a Microsoft tool, such as Visual Basic, then you might be inclined to choose Microsoft's SQL Server. With the emergence of ODBC and OLE DB, this has become less of an issue. However, you should keep in mind that many development tools have been designed to connect easily to specific database servers. With ADO it's even less of an issue. As already mentioned, ADO is quite flexible with respect to the programming environment and the database to which it connects.
  • Thirdly, consider training and maintenance issues. If your staff are familiar with one product, you can save money and time by not choosing the unfamiliar product. Your product win be much stronger if it doesn't suffer from a training curve. In addition, experience would enable the avoidance of pitfalls throughout the development process....
Read More Show Less

Customer Reviews

Average Rating 5
( 1 )
Rating Distribution

5 Star

(1)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted Sat Oct 27 00:00:00 EDT 2001

    The best Visual Basic book on databases

    I found Professional Visual Basic 6 Database to be the best book on databases. I truly learned a lot from the examples the author provides. This is also a very easy to follow book. I recomend this book to anybody who truly wants to learn VB6.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)