The relational database was defined in 1971 at IBM by E.F. Codd as a database "where data appears as a collection of tables." These tables can contain video, sound and text. The power of a relational database, as opposed to more primitive storage methods, is that data can be queried in any possible combination. Thus for the adult content provider, a relational database allows for an infinite number of ways that data can be served to a given customer.
Ben Richards, a web-design consultant who has built a large number of successful adult sites, can't imagine building a large adult website without using a relational database to manage the endless number of files and requests. "You are managing huge amounts of content in the adult industry, and without a relational database you will simply be hardcoding file system information into your application," Richards said.
Database Security
Aside from flexibility, a relational database affords the webmaster a higher degree of security. In this era, many adult websites rely on their hosting service to provide login authentication information. This is usually done through the Apache web server and the use of an .htaccess file to authenticate customers that are current members.
The drawback of this method is that someone can hack into this file if they gain access to your computer. If instead your web server authenticates directly through a relational database, hackers must now break into your computer and into the database that stores your authentication information and digital images. Thus, relational databases add a layer of security to any e-commerce system.
Another advantage of using a relational database to serve web pages and streaming media is that customer preferences can be correlated with the presentation of web pages and digital content. Large Internet merchants such as Amazon.com, using the Oracle RDBMS (Relational Database Management System), have mastered the art of providing specific customer preferences during the actual display of data and web pages.
An adult website might record the category of streaming media that a given customer requests. Over time, patterns and preferences will emerge. Using a relational database, each customer can be presented a different content based on their past desires.
For instance, as time passes, one customer that visits your website may prefer blondes. By using a relational database to track this information, you can now target this customer with a plethora of fair-haired images and banner ads to other sites that cater to such Nordic whims.
Adult website customers shouldn't need to search around a maze of web pages to fulfill their desires — content should be served to them based on past behavior. This already is the case with more traditional e-commerce sites that track customer preferences.
With a relational database, any possible relationship can be queried using the SQL language in real-time, thus any obscure type of preference can be gleaned. Sites with a great deal of data and content can make split-second decisions as to what actually is displayed by using a relational database to relate customer data to real-time events.
Government regulations, such as John Ashcroft's proposal step up enforcement of 18 USC Section 2257, which requires adult websites to relate all adult images to identification documents, also lend themselves to solutions using a relational database.
Configuring a relational database to comply with 2257, simply requires creating something similar to a UPC (Universal Product Code) for each image and then storing a table of these primary keys along with any information the government now requires.
With a relational database, data can be queried in any format, so a government or accounting request for any combination of information can be easily satisfied with the SQL language. For instance, credit card information can be encrypted in most relational databases and queried in any order required, including complex summations.
The next question for the webmaster is which relational database to purchase? Of course, the most cost-effective choice is one of the open-source relational databases, such as MySQL. Today MySQL and PHP are the tools of choice for adult webmasters because of their opensource licenses, ease-of-use, and small footprint.
If you are providing content within the Microsoft world, using .net and a tool like Visual Basic, it may be a wiser choice to use the SQL Server relational database offered by Microsoft. The drawback of this solution is the cost of the Microsoft software and the fact that you will be dependent on one company for your software and security.
Oracle RDBMS
The Cadillac of relational databases is the Oracle RDBMS. The Oracle database will run on all platforms and is by far the most sophisticated
and fastest database for applications with large amounts of data. The Oracle database also ships fully integrated with the Apache web server.
The drawback with the Oracle database is the cost when compared to an open-source solution such as MySQL. The Oracle database also results in a very large installation and requires a huge amount of memory — it should only be considered if you want to serve large amounts of data to many simultaneous users.
Regardless of which relational database you choose, relational data will be a step up from hard-coding file name paths in your application. Using a relational database will allow you to store and categorize user information and behavior.
Over time, this information will transform your business as you learn more about your customers simply from the patterns they trace in your data as they enjoy your content.
James Edwards is an independent Oracle software developer. He can be reached at relationalwizard@aol.com.