?? ch28.htm
字號:
<HTML><HEAD><TITLE>Chapter 28 -- Using Web-to-Database Query Tools</TITLE><META></HEAD><BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#CE2910"><H1><FONT SIZE=6 COLOR=#FF0000>Chapter 28</FONT></H1><H1><FONT SIZE=6 COLOR=#FF0000>Using Web-to-Database Query Tools</FONT></H1><HR><P><CENTER><B><FONT SIZE=5><A NAME="CONTENTS">CONTENTS</A></FONT></B></CENTER><UL><LI><A HREF="#HowWebtoDatabaseQueryToolsWork">How Web-to-Database Query Tools Work</A></UL><HR><P>The most important information on an intranet typically is housedin databases. These databases can be on a single site, althoughtypically, they can be found all across an entire intranet.<P>Most of these databases have been around since long before theInternet became popular, and before any corporate intranets werebuilt. That means that they've been built without TCP/IP in mind,without HTML in mind, and without taking into account any otherintranet technologies. Before the intranet was built, they wereaccessed in a variety of ways, depending on the particular kindof database and access software used.<P>An intranet can theoretically make it much easier to get at allthat corporate data. The use of HTML means that it's relativelyeasy to build search forms that anyone can use to easily get atdata-data that in order to get at, people previously may havebeen required to know a database programming language.<P>However, while it's easy to build HTML search forms that let peopletype in queries, it's not so easy to actually have those queriesbe sent out to search through a database, and then to have theresults be delivered back to whoever did the searching.<P>That's what Web-to-database query tools are designed to do. They'redesigned to let anyone, without having to understand databaselanguages, easily get at the vast corporate resources locked upin databases.<P>Since the databases typically were built before the intranet,some means of getting at them from an intranet, and specificallyfrom the Web, needs to be designed. There are many different waysof accessing corporate databases from an intranet. A popular oneis to use the Common Gateway Interface (CGI). CGI enables peopleon the Web to access resources that aren't directly located onthe Web. Through the use of CGI scripts, an intranet programmercan allow someone from the Web to query a database, and have thatdatabase send back information that is put into a preformattedHTML page. This makes it easy for anyone, using a standard Webbrowser such as Netscape Navigator or Internet Explorer, to accesscorporate databases.<P>What will undoubtedly prove to be popular is the Structured QueryLanguage (SQL). SQL is a database language that works on a client/servermodel, as does much of the Web. In the SQL model, the databaseitself is separate from the software that accesses the data-inother words, the software used to access the database is the client,while the database itself is the server. There can be many differentkinds of clients to access the same underlying database. One suchclient can be a CGI script that takes the input form on the corporateWeb, converts its contents into an SQL query, and submits it tothe database server. Another client could be a Java applet thatallows for the creation of more complex queries and better datadisplay than standard HTML.<H2><A NAME="HowWebtoDatabaseQueryToolsWork"><FONT SIZE=5 COLOR=#FF0000>How Web-to-Database Query Tools Work</FONT></A></H2><P>The most important information on most intranets exists on databasesthat were created long before the Internet became popular, andbefore intranets were ever created. They use technology builtwithout the TCP/IP protocols or the HTML language in mind. However,there needs to be some way for people on an intranet to accessand use that data. A variety of techniques have been developedfor doing this that involve allowing people to search the databasesfrom within a Web browser.<OL><LI>When someone on an intranet wants to gain access to a corporatedatabase, he or she will typically use a Web browser and visita particular home page. This home page sits on a Web server thatessentially acts as a front end to the database. The databasein fact sits on another computer on the intranet, not the Webserver.<LI>When someone wants to search a database, they use a form builtwith HTML. After they type in search terms, the search terms aresent using a Common Gateway Interface (CGI) script. CGI is a methodthat enables databases and other resources to be accessed fromthe Web. CGI scripts can be written with a number of differenttools and programming languages, including UNIX's Perl, or theC programming language.<LI>The CGI script is programmed to take the information enteredon the Web form and translate it into a properly formed SQL querythe database server can process.<LI>The CGI script now acts as a client to the database server. It makes a connection to the database and submits the SQL queryit created. To the database server it appears to be just anotherclient connecting rather than a connection via a Web browser.<LI>The database performs the requested query and sends the matchingrecords back to the CGI script. These results are properly reformattedthrough the addition of HTML tags.<LI>The formatted information from the database is sent back tothe browser that requested it. The user can now use that HTMLpage like any other HTML page. </OL><HR><CENTER><P><A HREF="ch27.htm"><IMG SRC="PC.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="#CONTENTS"><IMG SRC="CC.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="contents.htm"><IMG SRC="HB.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="ch29.htm"><IMG SRC="NC.GIF" BORDER=0 HEIGHT=88 WIDTH=140></A><HR WIDTH="100%"></P></CENTER></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -