
Case Study: E-commerce Site - Restructuring the Database
Ecommerce Site Makeover 2
In order to integrate the catalog and order form, I felt the first step was to create a database-driven template for the catalog, to replace the separate, hand-coded HTML pages for each item. I created a database for product descriptions, linked to prices by the item number, and built an administrative back-end to assist in product updates.
I also added indexing to the databases to prevent duplicate product numbers or other issues, and to make the new catalog template able to access product information quickly. Then I cleaned up extraneous or duplicate data in the pricing database, and imported all product ids and categories to the descriptions database.
Finally, I began building a user interface for the database. Previously, the site administrative had updated information using PHP-MyAdmin. While that’s fine for quick and simple changes, it provides no error checking (except as determined by the database indices), and tells you nothing about how the data will be displayed on the site for the customer. The administrative backend I built prevents discrepencies between catagory names or product numbers in the pricing and description databases, and, with the built-in image uploading module (which automatically renames and resizes images and creates thumbnails), ensures product images are named in a way that allows both the order form and catalog to find them. Once I had the backend built, I began copying information from the existing HTML pages into it, testing and modifying the user interface in the process.