Linux is a complete operating system that is similar but not identical to Unix. It runs on a wide variety of hardware, ranging from Intel and AMD CPUs to more exotic hardware such as Digital Alpha computers, PowerPCs, and Silicon Graphics workstations. Probably the most unique characteristic of Linux is that it is freely distributable. Freely distributable means that the source code for the kernel and most software cannot be withheld. It does not mean that companies cannot charge for it. By means of comparison, hosting a website on Unix or Linux is nearly identical.
There are many options available when it comes to writing CGI scripts on a Linux machine. The most common at the time of this writing are PHP and PERL. There are many introductions, tutorials, and even sample scripts available on the Internet when it comes to PHP and PERL.
Database types available for Linux, depends mostly on the web hosting provider you select to host your website. There are many flavors of databases that run on Linux, but the most prevalent among web host providers are mSQL, MySQL., and PostgreSQL. These databases are all relational in nature, and allow highly optimized communication with your website for quick retrieval of information.
If you plan to host the site yourself, and you own the web servers or the software on them, then Linux (or Unix) would definitely be a less expensive option. If you plan to sign up with a web hosting company, and they own the servers and the software installed on them, you will find that there are excellent hosting options available for each platform at very comparable prices.