DATABASE PUBLISHING

While on the subject of databases, let’s discuss how you might use a database to create and to maintain your website’s content. While you might be feeling a little overwhelmed by now, setting up your website with a database is a big step towards building a flexible, scalable site. Stay with me as I try to simplify things a bit. There are two types of web pages — static and dynamic. They both have the same goal — the use of information stored in databases.

The action of a website that collects data from a database and then builds pages from that data is referred to as “database publishing.” With the right interface, even a novice user can go into a database to update information that can be made available immediately.

Maintenance is easy in the database-publishing world — for example, one can create an HTML template once and merge that template with new content to provide a reliable way to put information on your website in a consistent layout.

Security is also easier since databases allow you to keep the wrong content off a website through the enforcement of security checks, such as “hide” flags, checking the date against the date a document is set to be posted, the date a product is set for delivery, etc.

Though database publishing can help you manage your website, it may take some time for you to learn all the ins and outs of the related software tools. Database publishing requires not only a database, but also it may require extra web server software and an application server.

NOTE
When using database publishing software be sure to perform a number of tests before going “live.” During the tests, check for slow pages, heavy pages, small pages, missing graphics, etc.

Static Database Publishing

The static website’s information is already prepared in the desired format for use by the customer. Some website operators will begin their venture into e-commerce by creating a simple static website paired with a database. This technique is often referred to as “static database publishing.” With static database publishing, a visitor can’t search through the database on demand, nor perform many of the fancier dynamic-site tricks. But, by using a minimal database approach, you ease the burden of data management, while leaving open the opportunity to move to a full-blown dynamic database-driven site later when business demands a more dynamic environment.

NOTE
A static website displays infrequently changing information or data. It’s like putting a snapshot of your business’ information onto your website. The contents of a static site can be marketing brochures, white papers, monthly newsletters, software, or even a small product catalog, etc. This information is not interactive, nor does it change very often.

Static database publishing “automatically” generates static HTML pages from a database, although changes to the database will only show up on the website when new pages are generated manually and uploaded to the web server. The advantage of this type of website content management is that you need very little technical expertise and the site is easy to maintain because static database publishing can be performed with any web server — there is no requirement for special features such as CGI scripts. Thus, if you are using a web-hosting service for your website, you will always be able to use this method irrespective of who your web-hosting provider may be.

The disadvantage of static database publishing is 1) the manual interaction required to upload the newly generated files to the web server and 2) the ability for visitors to update their information isn’t available.

Tools for Static Database Publishing:

DBtoHTML (www.xlinesoft.com). This product can be used to generate web pages automatically from any ODBC compliant database making it an excellent tool for creating static HTML pages from a database. Since DBtoHTML doesn’t allow you to create an overview of the database’s full contents (and it has no search function), this product is better suited for databases with a few large records. Cost — $129.

NOTE
Open Database Connectivity (ODBC), which is a Microsoft standard database access method, is a database common interface. ODBC, in simple terms, inserts a middle layer (a database driver) between an application and the RDBMS to translate the application’s data queries into commands that the RDBMS understands. For an ODBC interface to work, however, both the application and the RDBMS must be ODBC-compliant.

GDIDB Professional (www.gdidb.com). This product allows you to publish any ODBC compliant database (or spreadsheet) to your website. GDIDB Professional enables you to create a large easy-to-maintain website by separating the site design from the site content since you keep the content in a database. You can even design your website so its content is driven from your live business database. With GDIDB Professional you can format your content on your web pages any way you want it, create any HTML link structure that you can imagine from your relational database, publish web pages at the click of a button, minimize upload times by only uploading files that have changed since the last publication, and automatically publish your database to a pre-set schedule of unattended publishing. One feature that is particularly interesting is the ability to add form data automatically to the database (with some additional help from you). Cost — $76 to $220.

The best scenario in which to use static database publishing is when you have a website that has static content, i.e. it is not changed often. Many brochureware sites fit this scenario.

Dynamic Database Publishing

Dynamic database publishing differs from its static counterpart in that dynamic publishing requires the use of certain parameters or keys to search a database in real-time. Then when the desired data is found, a web page is created for the customer’s use. Dynamic database publishing also requires Java scripts, CGI programming, ISAPI, NSAPI, and more. ColdFusion MX, Lasso, and WBSP are some of the more popular application server software used to transform a database’s data into dynamic web pages.

A dynamic website can be an online store with an ever-changing product catalog so that when a customer requests information, a database can provide not only the product but also the current price, colors, sizes and the availability. Car dealerships, real estate, and ezine (online magazines) sites use dynamic data.

Figure 21: This graphic shows a typical interaction between a customer’s PC and a website when the website is built upon a database-driven architecture.

Dynamic database publishing requires that the website be built upon a database-driven architecture so the website can produce web pages that instantly respond to a customer’s query. That means such websites are more difficult to implement and use than those built via static database publishing techniques because they require that you and/or your staff possess more technical knowledge and capabilities. There are also other downsides to building a web-based business around dynamic database publishing. They include:

  • Unless you carefully design and institute a good maintenance system, a large volume of traffic on your website can cause data traffic congestion and performance problems.
  • The web server needs additional features to support dynamic database publishing. For instance, in order to create dynamic pages your web pages must be able to interact with a supporting program, script, or applet and need to be supported by the web server via, e.g. CGI scripts, ISAPI, NSAPI, ASP, PHP or JSP (For more information about these methods, please see Table 5).

    Table 5: Detailed explanation of how a website using dynamic database publishing might communicate
    with the database to generate the necessary dynamic web pages.
    CGI Common Gateway Interface
    A standard method of extending web server functionality. CGI works by executing programs or scripts on the web server when a web browser request is received. CGI lets you create web pages that can return information based upon a customer’s input by calling a compiled C program or Perl script to access a database or another data source. However, CGI is inefficient, since it causes the server to launch a new process to run executable programs every time a new user makes a request. If you have a lot of traffic, your website’s performance will suffer. Still, CGI is a tried and true interface and is the most common way to connect with web servers. Here’s an example of how CGI might work: A web browser sends form data to a CGI script on the web server; the script integrates the data with a database, and sends back a results page as HTML.
    ISAPI Internet Server Application Programming Interface
    A web server application development interface that can be used instead of CGI.
    NSAPI Netscape Server Application Programming Interface
    A web server application development interface, developed by Netscape Communications Corporations.
    ASP Active Server Page
    This Microsoft technology dynamically creates web pages with an .ASP extension using ActiveX scripting (usually VB Script or Jscript code). When a web browser requests an ASP page, the web server generates a page with HTML code and sends it back to the browser. Thus ASP pages are similar to CGI scripts, and are usually used when it is desirable to enable Visual Basic programmers to work with familiar tools.
    JSP Java Server Page
    Sun’s Java Server Page (JSP) technology controls the content or appearance of web pages through the use of servlets (small programs that are specified in the web page and run on the web server to modify the web page before it is sent to the requested user). JSP is comparable to Microsoft’s Active Server Page (ASP) technology.
    PHP Hypertext Preprocessor
    PHP is a script language and interpreter that is freely available and used primarily on Linux web servers. PHP (originally known as “Personal Home Page”) is an alternative to Microsoft’s Active Server Page (ASP) technology. As with ASP, the PHP script is embedded within your web pages along with the HTML. Before the page is sent to a requesting user, the web server calls PHP to interpret and perform the operations called for in the PHP script.

While dynamic database publishing offers far more features than static database publishing, it requires a lot more time and effort to build such a website. Still, if you have content that will change frequently (e.g. a news site, an auction site, or want to provide your customers with dynamically generated pages in response to their queries) dynamic database publishing is your best choice.

NOTE
Java and Java Database Connectivity (JDBC) from Sun Microsystems is also a viable way to publish a database on the Web. JDBC is a Java Application Program Interface (API) that enables Java programs to execute SQL statements, which, in turn, let Java programs interact with SQL-compliant databases (nearly all RDBMSs support SQL). Java runs on most platforms, therefore JDBC makes it possible for a web operator to write a single database application that can run on different platforms and interact with different RDBMSs. At this time, the tools and drivers needed for Java database development are in their infancy. However, you do need to know that JDBC is a lot like ODBC but is new enough that some databases don’t offer a direct interface. If you plan to use Java now, one solution is to use a JDBC-ODBC bridge that allows a Java application using JDBC to connect to an ODBC database.

Tools for dynamic database publishing:

Baserunner (www.baserunner.com). This product creates data-driven, dynamic web applications from any information stored in a dbf format database such as FoxPro and dBaseIV (a popular non-relational database program). As such, baserunner provides a fast, inexpensive, small-scale solution that permits simple template-based development and avoids the overhead associated with such technologies as ODBC and the complexity of SQL, PHP, or ASP. (It is noted, however, that Baserunner 4.6 introduced support for relational databases and for using multiple tables within a template.) The best thing about this template-based, stand-alone CGI executable is that it provides flexible control of your online data. It works as an extension to HTML, providing new tags and processing directives that enhance your web design by giving you easy access to dynamic content. While this makes it a relatively easy-to-use tool, it also requires that you possess more than a bit of technical knowledge to use it to its best advantage. Cost — Free.

THE ROLE OF APPLICATION SERVERS IN DATABASE PUBLISHING

Some e-commerce website operators will opt for a different method to enable dynamic database publishing; they will use application server softer to transform the database data into dynamic web pages. To achieve this you must install software such as ColdFusion MX (www.macromedia.com), Lasso (www.blueworld.com), or WBSP (www.whizbase.com) to pull information out of the database to create HTML pages on demand. This, in turn, means that you must run not only a web server and a database server, but also an applications server.

KazTrix DataBuilder 1.0 (www.instabase.com). This product allows you to publish data from about any program (including personal information managers) or database (including Microsoft’s Access). It is easy to use, and although it gives you many of the advantages of dynamic database publishing, it only requires the user to possess minimal technical knowledge. KazTrixR DataBuilder requires no CGI scripting or any other plug-ins on the server side. However, it is also not customizable and it lacks some of the advanced features found in other dynamic database publishing products. Cost — $149.

Dynamic Websites and the Search Engine Dilemma

A search engine has three parts. The first is a spider (also called a “bot”) that goes to every page on every website that wants to be searchable and reads it. Every search engine has its own criteria that its spiders use when crawling a website. The second component is a program that creates a huge database of the keywords in the pages that have been read by the spider. Finally, there’s an access program sitting on a portal that can take millions of search requests from users, compare them to the entries in the database, and return results.

Although dynamically generated web pages are easier for the web operator to manage, they are difficult for some search engines to index and incorporate into their database. The simplest answer to this problem is to use static pages as often as possible. Use the database to update the pages instead of generating them on the fly. Another little bit of advice: Search engines hate the “?” symbol, so don’t use it in your URL.



The Complete E-Commerce Book. Design, Build & Maintain a Successful Web-based Business
The Complete E-Commerce Book, Second Edition: Design, Build & Maintain a Successful Web-based Business
ISBN: B001KVZJWC
EAN: N/A
Year: 2004
Pages: 159

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net