In general, Web software is not particularly database friendly-it often happens that valuable corporate information is not always accessible to many people who need it.
In the earliest days of the Web, it was exceedingly difficult for anyone to gain access to those databases. As technology developed, however, and it became easier to access databases, an increasing number of databases became available, both on the Internet and then later on intranets as well. Web server software was developed to make it easier to access databases for the Web.
There are a number of ways in which someone from an intranet can tap into corporate databases. An exceedingly popular one is called the Common Gateway Interface (CGI). CGI allows any executable to run and have its output sent back to the requesting client. Therefore, it allows intranet programmers to write programs and scripts that will allow people on an intranet to use their Web browsers to easily query databases by filling out forms on Web pages-and they will then send those results back in HTML form that the browsers can understand.
Essentially, CGI is an interface that delivers information from the server to your program and from your program back to the requesting client. It is not a programming language. The program does all the processing. CGI only gets data to the program. On an intranet, the data accessed is often from a database of some sort. You've no doubt used CGI many times without knowing it. On the Internet, for example, if you've filled out a form on a Web page in order to register to use a site, and then later received an e-mail notification with a password for you to use, you've probably used CGI. CGI most likely took the information you filled in the form, performed several actions on it (including putting the information in a database), automatically created a password, and then automatically sent you mail.
On your corporate intranet, if you have one, you may well have used CGI programs or scripts as well. If you've queried a corporate database from a Web page and gotten information from it, then there's a good chance that a CGI program or script is what did the work for you.
Intranet programmers can use a variety of technologies to make use of CGI. One of the simplest is to use what's called an interpreted language. An interpreted language, such as the popular Perl used on UNIX systems, is often favored because scripts written with them are easy to debug, modify, and maintain.
CGI can also be accessed with more sophisticated computer languages, such as C, C++, or Fortran. When a programmer writes a program in a language such as C to be accessed by CGI, the program must first be compiled. That means running it through a program called a compiler that can change the application into a machine-readable language that the computer can understand.
Essentially, CGI is an interface that delivers information from the server to your program and from your program back to the requesting client. It is not a programming language. The program does all the processing. CGI only gets data to the program. CGI is a standard that allows programmers to write programs that can access information servers and databases, and then send the information to users on an intranet. Using CGI, Web-based intranet technologies can communicate with non-TCP/IP resources and databases. Using CGI, an intranet programmer can write an application that searches a database and displays the result in HTML format. CGI is used to allow people to fill out corporate forms on an intranet, and have that information entered into a database.