Asp.net mysql hosting
It Takes a Database
Once you've been sold on using the Web to get information to and from your visitors, someone will no doubt urge you to move a lot of that information into a database. That's good advice. Because databases are designed to handle the storage and retrieval of constantly updated information, they let you incorporate data that changes a lot, such as e-commerce transactions, into your Web site without making the site as slow as molasses.
Your best bet is an SQL (Structured Query Language) database. SQL is the industry-standard tool for extracting information from relational databases. SQL isn't easy, but implementing it pays off in the long run. Using a database as your Web site's back end separates your ever-changing data from the look and feel of your site.
For such a system to work, a number of pieces of technology have to fit together. We'll describe Web/database architecture in general, then take a look at the three approaches that dominate the Web today.
In general, you can't connect a remote user's Web browser directly to a database system. There are exceptions to this (Java applets are one way around it), but in most cases, the browser talks to a program running on the Web server that is an intermediary to the database. This program can be a CGI (Common Gateway Interface) script, a Java servlet, or some code that lives inside an ASP (Active Server Pages) or JSP (JavaServer Pages) document. The user doesn't know whether the page is an ordinary HTML document or the output of some script that generates HTML.
Figure 1 shows the typical interaction between a user and a Web-based database system. First, the user fills out a form on a Web page and clicks the Submit button (step 1). The browser sends the information from the form to the Web server, which passes it on to a CGI script (step 2). Next, the CGI script loads a library that lets it talk to an SQL database server, and it uses that library to send SQL commands to the database server (step 3). The database server stores the information and tells the CGI script that everything went okay (step 4). Next, the CGI script generates an HTML document, which serves as a confirmation, then writes the HTML document to the Web server (step 5), which sends it back to the remote user (step 6), and everything is finished.
The Open-Source Solution
LAMP is an acronym that encompasses a variety of technology. It stands for Linux, Apache, MySQL, and P*, which you can replace with Perl, Python, or PHP (three programming languages that support Web database development).
Linux is one of the most popular platforms for serving Web content, and this popularity has been increasing steadily. Linux is free and reliable, and it scales acceptably well for busy Web sites. Although Linux has been criticized for its performance on systems with more than four processors, it has proven to be a reliable operating system in a load-balanced situation, where multiple servers share the work needed to support visitors to a single Web address. In time, Linux, whose developers have historically been able to isolate and eliminate performance bottlenecks, will be able to shrug off criticisms of its performance. The recently released Linux 2.4 addresses the multiple processor performance concerns.
As with Linux, the Apache Web server is free. Also as with Linux, major Internet players such as IBM have taken a huge interest in Apache and have participated in its development. The Apache Foundation (www.apache.org) is composed of independent open-source developers and representatives from corporations interested in Apache's future. Its efforts have resulted in a stable Web server that meets the high standards of open-source enthusiasts as well as high-end corporate users. For example, IBM's WebSphere (www.ibm.com/websphere) is based on a customized version of Apache.
MySQL (www.mysql.com), as its name suggests, is the SQL database server portion of the LAMP mix. Once it appeared on the scene, MySQL quickly became a favorite of Unix-based Web hosting providers, because it is fast, stable, and extremely easy to administer. Although MySQL started life as a lightweight database similar to Mini SQL (www.hughes.com.au), its developers have cautiously added more advanced features, taking care not to do anything that would adversely impact MySQL's performance.
Perl, Python, and PHP (PHP Hypertext Preprocessor) are three open-source programming languages that work very well on the Web. Perl (www.perl.com) is an interpreted scripting language that is useful on many platforms. It is especially good for text manipulation and databases, and it is extremely popular for server-based programming. When you use Perl on the LAMP architecture, you can use CGI, the original protocol for developing Web applications, or mod_perl (perl.apache.org), an advanced way to integrate Perl directly into the Apache Web server.
Perl is probably the most common language for writing CGI programs, but its alternatives are worth exploring. Python (www.python.org) is a powerful programming language touted for its clean syntax and relaxed learning curve. Python is also the basis of Zope (www.zope.org), a powerful framework for Web development that includes an object-oriented database as well as support for MySQL and other databases.
PHP (www.php.net) is a language you embed in Web pages. It is similar to ASP and JSP in that the Web server alternates between serving up the HTML in your PHP documents and the output of programs written in PHP. What the users see is a combination of static HTML and HTML that was generated dynamically by snippets of PHP (see PHP Example).
Perl, Python, and PHP each include facilities for connecting to SQL databases. An excellent starting point for LAMP is www.onlamp.com.
The Java Approach
J2EE (java.sun.com/j2ee) is the Java 2 Enterprise Edition, a set of technologies based around the Java 2 platform. J2EE includes, among other things, Java servlets, JSP, and JDBC (Java Database Connectivity). Java servlets are Web-enabled Java classes that can run on your Web server. Remote users connect to servlets using the same protocol as CGI scripts, which makes it easy to integrate servlets into your Web architecture. JSP lets you embed Java code directly into Web pages, and it supports components called JavaBeans that hide complicated functionality behind a simple interface. Instead of updating your Web pages every time you change programming logic, you just update the bean and copy it to your Web server. You don't even need to restart the server. JDBC is a set of libraries that connect Java programs (including servlets and JSPs) to SQL databases.
A good starting point for the Web/database portions of J2EE is Tomcat, the official reference implementation of Java servlets. Tomcat is an open source Apache Foundation project available at jakarta.apache.org/tomcat. It requires the Java 2 SDK (java.sun.com/j2se), which is available for many operating systems including AIX, Linux, Mac OS X, Windows, and Solaris. James Goodwill's article on Tomcat installation, available at www.oreillynet.com/pub/ct/33, can help you through the installation. The article includes installation instructions for both Linux and Windows. The Linux instructions should apply to most flavors of Unix as well.
Microsoft's Entry
Right now, the Microsoft solution for Web databases consists of ASP (Active Server Pages), ADO (ActiveX Data Objects), and IIS (Internet Information Server), but this is about to change. Many developers are preparing for Microsoft's new Windows technology, .NET (www.microsoft.com/net). The .NET platform moves all Windows programming to a Web-centric model where applications communicate with each other using the Web's HTTP (HyperText Transfer Protocol) and XML (eXtensible Markup Language).
IIS is Microsoft's Web server. The full version is available with Windows NT Server and Windows 2000. If you are running Windows 95, 98, Me, or NT Workstation, you can install Personal Web Server (PWS). Personal Web Server is available either on your operating system CD-ROM or as part of the Windows NT Option Pack (even if you're using Windows 95, 98, or Me!), which you can get at www.microsoft.com/ntserver/nts/
downloads/recommended/NT4OptPk/. Note that though it is possible to run PWS on Windows Me, Microsoft does not support it, so you run it at your own risk.
Both IIS and PWS include support for ASP, which is similar to JSP and PHP. ASP documents differ from JSP and PHP in that you can write the programs in any ActiveX scripting language, including VBScript, JScript, Perl, Python, and others. ActiveX scripting versions of Perl and Python are available from ActiveState (www.activestate.com).