Database Reference
In-Depth Information
In this topic, we will take a vendor-neutral approach and use technologies that can be
used with any operating system or DBMS. We will use the PHP language. PHP, which is an
abbreviation for PHP: Hypertext Processor (and that was previously known as the Personal
Hypertext Processor ), is a scripting language that can be embedded in Web pages. Although
PHP started as purely a scripting language, it now also has object-oriented programming
elements, but we will not cover those in this topic.
PHP is extremely popular. In the summer of 2007, more than 2 million Internet domains
had servers running PHP, 2 and the April 2013 TIOBE Programming Community Index ranked
PHP as the sixth most popular programming language ( following, in order, C, Java, C++,
Objective C, and C#). 3 PHP is easy to learn and can be used in most Web server environments
and with most databases. As an added bonus, it is an open-source product available for free
download from the PHP Web site ( www.php.net ) .
Although Microsoft would probably prefer that you use ASP.NET for Web applications, there
is still good information on using PHP in a Microsoft environment on the Microsoft Web site (e.g.,
see Running PHP on IIS at http://php.iis.net ) . Both Oracle DBMS products—Oracle Database 11 g
Release 2 and MySQL 5.6—enthusiastically support PHP. Oracle publishes the Oracle Database
2 Day + PHP Developer's Guide (available in both HTML and PDF format at www.oracle.com/pls/
db112/homepage ) , which is an excellent reference for using PHP with Oracle Database 11 g Release
2. Because PHP is often the P in AMP, LAMP, and WAMP, many topics are available that discuss
the combination of PHP and MySQL, and the MySQL Web site contains basic documentation on
using PHP with MySQL (e.g., see http://dev.mysql.com/doc/refman/5.6/en/apis-php.html ) .
Web Database Processing with PhP and Eclipse
To start, we need a Web server to store the Web pages that we will build and use. We could use
the Apache HTTP Server (available from the Apache Software Foundation at www.apache.org ) .
This is the most widely used Web server, and there is a version that will run on just about every
operating system in existence. However, because we have been using the Windows operating
system for the DBMS products shown in this topic, we will build a Web site using the Microsoft
IIS Web server. One advantage of using this Web server for users of the Windows 8 and the
Windows Server 2012 operating systems is that IIS is included with the operating system: IIS
version 8.0 is included with both Windows 7 and Windows Server 2008 R2 (IIS version 7.5 is in-
cluded with both Windows 7 and Windows Server 2008 R2). IIS is installed but not operational
by default, but it can easily be made operational at any time. This means that any user can
practice creating and using Web pages on his or her own workstation, as well as working on a
networked Web server. See Appendix I for a detailed discussion of setting up IIS.
By ThE WAy This discussion of Web database processing has been written to be as
widely applicable as possible. With minor adjustments to the follow-
ing steps, you should be able to use the Apache Web server if you have it available.
Whenever possible, we have chosen to use products and technologies that are available
for many operating systems.
When IIS is installed, it creates an inetpub folder on the C: drive as C:\inetpub. Within
the inetpub folder is the wwwroot folder , which is where IIS stores the most basic Web pages
used by the Web server. Figure 11-23 shows this directory structure in Windows Server 2012
after IIS has been installed, with the files in the wwwroot folder displayed in the file pane.
IIS is managed using a program called Internet Information Services Manager as
shown in Figure 11-24 for Windows Server 2012. The location of the program icon varies
depending on the operating system. To open the Internet Information Systems Manager:
For Windows 7, open Control Panel , then open System and Security, and then
open Administrative Tools . The shortcut icon for Internet Information Services
Manager is located in Administrative Tools.
2 See www.php.net/usage.php .
3 See www.tiobe.com/index.php/content/paperinfo/tpci/index.html .
 
Search WWH ::




Custom Search