Skip to Main Content

Getting Started with Database-Enabled Websites

Posted on 1.03.2013

The flow and pace of information and, more importantly, the knowledge within an organization, related to specific projects, continues to increase rapidly. Without the right tools, it can often seem overwhelming.

Before addressing the technology aspect, let’s review what new business requirements might dictate the evolution of a website. A short list of the functionality it is possible to achieve with a Web database include: a product catalog (searchable by product name, model #, category, etc.), an information request form (customer service, tech support, quote request, etc.) — or searchable store locations (by city, state, zip, etc.).

In order to implement database functionality, you’ll have to move beyond HTML, CSS and Javascript and write a bit of server-side code using PHP, Perl, Python, Java, .NET C#, just to name a few. When invoked, these pages connect to the database, and normally use SQL (structured query language) to manipulate the data records: allowing you to select for display, as well as add, edit or delete records.

Which server-side programming language you’ll need to learn is dependent on what’s supported by your hosting provider. SQL, on the other hand, is commonly used regardless of platform (nearly all databases speak SQL).

One facility my company always builds into every Web database implementation is an administrative website used by company officials to manage the data content exposed on the website. The main feature of the admin site would be a maintenance page used to add, edit, delete and maybe upload/download data records. The admin site comes in very handy, for example, if bogus data (or even abusive, foul or illegal language) is posted to a live Web database.

Hosting Requirements

If you have a simple, small business website, chances are you’re using a low-end, sharedserver hosting plan. Hosting providers typically offer such plans that include database functionality. The plans provide database software solutions like MySQL, MS SQL and MS Access. Plans are typically priced by the number and size of the database(s), and most offer some kind of database backup service (more on backup later).

Another hosting option to consider is a “database in the cloud” solution such as HostedDatabase.com. This and other cloud solutions (Quickbase by Intuit, Caspio and Database.com by Salesforce) provide simplified paths for adding Web databases without any knowledge of server-side programming or SQL. Services like this, however, require a paid subscription separate from your hosting platform.

Initial Data Import: Once you’ve defined your Web database structure (tables, fields, sorting order, indexes, etc.) and have developed the server-side code pages to utilize the data content, it is time to import some live data before placing your site into production use. My small business clients traditionally use Excel as their local data manager, so exporting the data from Excel is the first step. Comma separated value or CSV files tend to be the lingua franca of computers, and most programs like Excel are able to export to CSV format. This is a fairly easy step. Next, you must import the CSV data into the SQL database for your website. Usually, your website hosting provider or cloud database provider will have the tools needed to import the data. You may need to refresh the Web database on occasion by repeating this process when local data content gets out of sync with the Web database.

Backup: Having your business data hosted and managed off premises causes a bit of concern for many business owners. If your website provides the means to update data records this means the only place your valuable data exists is on the Web server hosting your site. As a matter of protection, you should make sure your database is backed up on a frequent basis. Beware that it is common for hosting providers to offer “file backup” methods that do not include database files (because the files are typically open and backup programs cannot make copies). To circumvent this, you can manually make backups via FTP. Generally, a weekly backup is sufficient unless the Web database is updated more frequently.

A Real Life Example: Now let’s take a look at a real life example of a small business website that incorporates a database. My company built a database-enabled website for a Los Angeles company called The New Mart (www.newmart.net), which owns a building in the fashion district and rents space to many showrooms.

To see the database functionality just click on the Showrooms button. Notice you have several options: Search, Browse and List. These are really just different ways to search for the showroom you’re looking for. The Search option is the most interesting, so let’s take a closer look. Normally, a catalog needs a search-by-keyword feature using one more fields in the database like company, name, description, etc. If your data includes a category field, many users will want to search by “Skirts” or “Menswear” for example. To initiate the search process, you click on a Search button, which triggers the server-side code to prepare a SQL SELECT query, submit it to the database, retrieve the results for display on the page and format using HTML for ease-of-reviewing by the user.

Let’s Build: A Web database addition to your static website is a significant step forward in providing your users with dynamic features that make the site more useful. Integrating a Web database, if managed properly, can be a very straightforward process, but it will take some planning and an outside consultant with the necessary skillset may be required.

About the Author: Daniel D. Gutierrez is President of AMULET Development Corp., a Los Angeles based developer of websites, database-enabled Web applications and e-commerce solutions. Dan has authored three computer industry books including, “Web Database Development.” He taught database technology courses at UCLA Extension for 15 years. Dan holds a BS degree in Computer Science from UCLA.

Leave Your Comment

Login to Comment

Become a Member

Not already a part of our community?
Sign up to participate in the discussion. It's free and quick.

Sign Up

 

Leave a comment
    Load more comments
    New code
  •